include ../env.mk SYSTEM = system.cpp system2.cpp system3.cpp system4.cpp EXE_SCASS = $(SYSTEM:.cpp=_systemcass.x) EXE_SC = $(SYSTEM:.cpp=_systemc.x) EXE_SVIEW = $(SYSTEM:.cpp=_socview.x) EXE = ${EXE_SCASS} OBJECTS = $(EXE:.x=.o) LINKS = $(OBJECTS:.o=.cpp) .SECONDARY: main : $(EXE) test : main @./system_systemcass.x --p ; \ if [ $$? -ne 6 ] ; then eval ${failcom} ; fi ; \ echo Bug detection OK @./system2_systemcass.x --p || eval ${failcom} @./system3_systemcass.x --p || eval ${failcom} @./system4_systemcass.x --p || eval ${failcom} %.gif : %.dot dot -Tgif -o $*.gif $*.dot %_systemc.x : %_systemc.o $(SYSTEMC_LIB) $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) %_socview.x : %_socview.o $(SOCVIEW_LIB) $(CXX) -o $@ $*_socview.o $(LFLAGS_SOCVIEW) -include Makefile.deps %_systemc.cpp : %.cpp ln -s $*.cpp $*_systemc.cpp %_systemcass.cpp : %.cpp ln -s $*.cpp $*_systemcass.cpp %_socview.cpp : %.cpp ln -s $*.cpp $*_socview.cpp %_systemc.o : %_systemc.cpp $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o %_systemcass.o : %_systemcass.cpp $(CXX) $(CFLAGS_SYSTEMCASS) -DCHECK_MULTIWRITING2PORT -MM $*_systemcass.cpp >> Makefile.deps $(CXX) $(CFLAGS_SYSTEMCASS) -DCHECK_MULTIWRITING2PORT -c $*_systemcass.cpp -o $*_systemcass.o %_socview.o : %_socview.cpp $(CXX) $(CFLAGS_SOCVIEW) -MM $*_socview.cpp >> Makefile.deps $(CXX) $(CFLAGS_SOCVIEW) -c $*_socview.cpp -o $*_socview.o clean : rm -f Makefile.deps -rm -f *.o gmon.out *~ -rm -f results -rm -f signal_order.txt module_order.dot signal_graph.dot -rm -f module_order.gif signal_graph.gif -rm -f $(EXE) $(OBJECTS) -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null -rm -f core* -rm -rf system_systemcass.x.vcd system_systemc.x.vcd -rm -rf generated_by_systemcass