include ../env.mk SYSTEM = system.cpp EXE_SCASS = $(SYSTEM:.cpp=_systemcass.x) EXE_SC = $(SYSTEM:.cpp=_systemc.x) EXE = ${EXE_SCASS} ${EXE_SC} LOG = $(SYSTEM:.cpp=.log) OBJECTS = $(EXE:.x=.o) LINKS = $(OBJECTS:.o=.cpp) .SECONDARY: main : $(EXE) test : system.vcd system_systemcass.x-60_reference.vcd -diff system.vcd system_systemcass.x-60_reference.vcd %.vcd : %_systemcass.x %_systemc.x ./$*_systemcass.x $*_systemcass.x 60 tail -n +8 $*_systemcass.x.vcd > $*.vcd rm $*_systemcass.x.vcd %.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) -include Makefile.deps %_systemc.cpp : %.cpp ln -s $*.cpp $*_systemc.cpp %_systemcass.cpp : %.cpp ln -s $*.cpp $*_systemcass.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) -MM $*_systemcass.cpp >> Makefile.deps $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o clean : rm -f Makefile.deps -rm -f *.o gmon.out *~ -rm -f ${LOG} -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 generated_by_systemcass -rm -rf system_systemcass.x.vcd system_systemc.x.vcd