Changeset 55 for sources/test_regression/30032005a/Makefile
- Timestamp:
- May 28, 2013, 11:17:14 AM (11 years ago)
- Location:
- sources/test_regression/30032005a
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
sources/test_regression/30032005a/Makefile
r15 r55 1 1 2 include ../env.mk 3 SIGNAL_GRAPH = signal_graph.dot 4 PROCESS_ORDER = process_order.dot 5 MODULE_GRAPH = module_graph.dot 6 PORT_GRAPH = port_graph.dot 7 SIGNAL_ORDER = signal_order.txt 8 ERASE = $(SIGNAL_GRAPH) $(PROCESS_ORDER) $(SIGNAL_ORDER) $(MODULE_GRAPH) $(PORT_GRAPH) 9 include ../Makefile.common 2 10 3 SYSTEM = system.cpp system2.cpp system3.cpp 4 EXE_SCASS = $(SYSTEM:.cpp=_systemcass.x) 5 EXE_SC = $(SYSTEM:.cpp=_systemc.x) 6 EXE = ${EXE_SCASS} ${EXE_SC} 7 LOG = $(SYSTEM:.cpp=.log) 8 OBJECTS = $(EXE:.x=.o) 9 LINKS = $(OBJECTS:.o=.cpp) 11 SIGNAL_GRAPH_REF = signal_graph_ref.dot 12 PROCESS_ORDER_REF = process_order_ref.dot 13 SIGNAL_ORDER_REF = signal_order_ref.txt 14 MODULE_GRAPH_REF = module_graph_ref.dot 10 15 11 PREFIX = $(SYSTEM:.cpp=) 12 13 #DIFF = $(SYSTEM:.cpp=.diff) 14 15 .SECONDARY: 16 17 #%.diff : %_module_graph_reference.dot %_module_graph.dot 18 # diff $*_module_graph_reference.dot $*_module_graph.dot 19 # diff $*_signal_graph_reference.dot $*_signal_graph.dot 20 # diff $*_module_order_reference.dot $*_module_order.dot 21 # diff $*_signal_order_reference.dot $*_signal_order.dot 22 23 #%_signal_graph_reference.dot %_signal_graph.dot \ 24 # %_module_order_reference.dot %_module_order.dot \ 25 # %_signal_order_reference.dot %_signal_order.dot 26 27 #%_module_graph.dot : %_systemcass.x 28 # $*_systemcass.x --t 29 # mv module_graph.dot $*_module_graph.dot 30 31 #%_module_order.dot %_signal_graph.dot %_signal_order.dot : %_systemcass.x 32 # $*_systemcass.x --t --p 33 34 main : $(EXE) 35 36 #diff : ${DIFF} 37 38 test : ${EXE} 39 for i in ${PREFIX} ; do \ 40 echo Testing $$i... ; \ 41 (./$${i}_systemcass.x --t) || eval ${failcom}; \ 42 tail -n +3 module_graph.dot | diff $${i}_module_graph_reference.dot - || eval ${failcom}; \ 43 ./$${i}_systemcass.x --p --t || eval ${failcom}; \ 44 tail -n +3 signal_graph.dot | diff $${i}_signal_graph_reference.dot - \ 45 || tail -n +3 signal_graph.dot | diff $${i}_signal_graph_reference2.dot - \ 46 || eval ${failcom}; \ 47 tail -n +3 process_order.dot | diff $${i}_process_order_reference.dot - || eval ${failcom}; \ 48 diff signal_order.txt $${i}_signal_order_reference.txt \ 49 || diff signal_order.txt $${i}_signal_order_reference2.txt \ 50 || eval ${failcom}; \ 51 done 52 (./system_systemc.x) || eval ${failcom} 53 (./system2_systemc.x) || eval ${failcom} 54 (./system3_systemc.x) || eval ${failcom} 55 @echo Test OK. 16 test : $(EXE_SCASS) 17 @echo -ne "| Testing $$(basename $$(pwd)): " ; \ 18 ./$(EXE_SCASS) --t 2> /dev/null || res=1 ; \ 19 (tail -n +3 $(MODULE_GRAPH) | diff $(MODULE_GRAPH_REF) -) > /dev/null || res=1 ; \ 20 ./$(EXE_SCASS) --p --t 2> /dev/null || res=1 ; \ 21 (tail -n +3 $(SIGNAL_GRAPH) | diff $(SIGNAL_GRAPH_REF) -) > /dev/null || res=1 ; \ 22 (tail -n +3 $(PROCESS_ORDER) | diff $(PROCESS_ORDER_REF) -) > /dev/null || res=1 ; \ 23 diff $(SIGNAL_ORDER_REF) $(SIGNAL_ORDER) > /dev/null || res=1 ; \ 24 if [ x"$$res" = x ] ; then echo "OK" ; else echo "KO" ; fi ; 25 56 26 57 27 58 59 %.gif : %.dot60 dot -Tgif -o $*.gif $*.dot61 62 %_systemc.x : %_systemc.o $(SYSTEMC_LIB)63 $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) 2>&1 | $(CPPFILT)64 65 %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB)66 $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT)67 68 -include Makefile.deps69 70 %_systemc.cpp : %.cpp71 ln -s $*.cpp $*_systemc.cpp72 73 %_systemcass.cpp : %.cpp74 ln -s $*.cpp $*_systemcass.cpp75 76 %_systemc.o : %_systemc.cpp77 $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps78 $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o79 80 %_systemcass.o : %_systemcass.cpp81 $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps82 $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o83 84 clean :85 rm -f Makefile.deps86 -rm -f *.o gmon.out87 -rm -f *~88 -rm -f ${LOG}89 -rm -f signal_order.txt module_order.dot signal_graph.dot90 -rm -f module_order.gif signal_graph.gif91 -rm -f $(EXE) $(OBJECTS)92 -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null93 -rm -f core*94 -rm -rf generated_by_systemcass95 -rm -rf tracesystem_systemcass.x.vcd tracesystem_systemc.x.vcd96
Note: See TracChangeset
for help on using the changeset viewer.