source: branches/with_autoconf/test_regression/30032005/Makefile @ 29

Last change on this file since 29 was 1, checked in by buchmann, 17 years ago

Initial import from CVS repository

File size: 2.9 KB
Line 
1include ../env.mk
2
3SYSTEM    = system.cpp system2.cpp system3.cpp
4EXE_SCASS = $(SYSTEM:.cpp=_systemcass.x)
5EXE_SC    = $(SYSTEM:.cpp=_systemc.x)
6EXE       = ${EXE_SCASS} ${EXE_SC}
7LOG       = $(SYSTEM:.cpp=.log)
8OBJECTS   = $(EXE:.x=.o)
9LINKS     = $(OBJECTS:.o=.cpp)
10
11PREFIX = $(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
34main : $(EXE) 
35
36#diff : ${DIFF}
37
38test : ${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.
56
57
58
59%.gif : %.dot
60        dot -Tgif -o $*.gif $*.dot
61
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
68include Makefile.deps
69
70%_systemc.cpp : %.cpp
71        ln -s $*.cpp $*_systemc.cpp
72
73%_systemcass.cpp : %.cpp
74        ln -s $*.cpp $*_systemcass.cpp
75
76%_systemc.o : %_systemc.cpp
77        $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps
78        $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o
79
80%_systemcass.o : %_systemcass.cpp
81        $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps
82        $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o
83
84clean :
85        -echo > Makefile.deps
86        -rm -f *.o gmon.out
87        -rm -f *~
88        -rm -f ${LOG}
89        -rm -f signal_order.txt module_order.dot signal_graph.dot
90        -rm -f module_order.gif signal_graph.gif
91        -rm -f $(EXE) $(OBJECTS) 
92        -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null
93        -rm -f core*
94        -rm -rf generated_by_systemcass
95        -rm -rf tracesystem_systemcass.x.vcd tracesystem_systemc.x.vcd
96       
Note: See TracBrowser for help on using the repository browser.