include ../env.mk EXE_SCASS = system_systemcass.x EXE_SC = system_systemc.x EXE = ${EXE_SCASS} ${EXE_SC} OBJECTS = $(EXE:.x=.o) LINKS = $(OBJECTS:.o=.cpp) .SECONDARY: main : $(EXE) test : main ./system_systemc.x ; \ ./system_systemcass.x --p --t || eval ${failcom} ; \ ((tail --lines=+3 signal_graph.dot | diff signal_graph_reference.dot -)\ || (tail -n +3 signal_graph.dot | diff signal_graph_reference2.dot -)) \ || eval ${failcom} ; \ tail --lines=+3 process_order.dot | diff process_order_reference.dot - diff signal_order_reference.txt signal_order.txt @echo Test OK. %_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 %.gif : %.dot dot -Tgif -o $*.gif $*.dot clean : -echo > Makefile.deps -rm -f *.o gmon.out -rm -f port_graph.dot signal_order.txt process_order.dot signal_graph.dot -rm -f $(EXE) $(OBJECTS) -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null -rm -f core* -rm -f *~ -rm -rf generated_by_systemcass -rm -rf tracesystem_systemcass.x.vcd tracesystem_systemc.x.vcd