source: sources/test_regression/08092005/Makefile @ 31

Last change on this file since 31 was 15, checked in by buchmann, 16 years ago

More cleaning

File size: 1.7 KB
Line 
1include ../env.mk
2
3SYSTEM    = system.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
11.SECONDARY:
12
13main : $(EXE) 
14
15test : $(EXE_SCASS)
16        @for i in ${EXE_SCASS} ; do \
17    echo Testing $$i... ; \
18    $$i --p --t ; \
19    if [ $$? -ne 197 ] ; then eval $${failcom} ; fi ; \
20    (tail -n +3 reduced_signal_graph.dot | diff reduced_signal_graph_reference.dot -) || eval ${failcom} ; \
21    diff methodprocess_graph.dot methodprocess_graph_reference.dot || eval ${failcom} ; \
22    echo Bug detection OK ; \
23  done;
24
25%.gif : %.dot
26        dot -Tgif -o $*.gif $*.dot
27
28%_systemc.x : %_systemc.o $(SYSTEMC_LIB)
29        $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) 2>&1 | $(CPPFILT)
30
31%_systemcass.x : %_systemcass.o  $(SYSTEMCASS_LIB)
32        $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT)
33
34-include Makefile.deps
35
36%_systemc.cpp : %.cpp
37        ln -s $*.cpp $*_systemc.cpp
38
39%_systemcass.cpp : %.cpp
40        ln -s $*.cpp $*_systemcass.cpp
41
42%_systemc.o : %_systemc.cpp
43        $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps
44        $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o
45
46%_systemcass.o : %_systemcass.cpp
47        $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps
48        $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o
49
50clean :
51        rm -f Makefile.deps
52        -rm -f *.o gmon.out *~
53        -rm -f ${LOG}
54        -rm -f signal_order.txt module_order.dot signal_graph.dot
55        -rm -f module_order.gif signal_graph.gif
56        -rm -f $(EXE) $(OBJECTS) 
57        -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null
58        -rm -f core*
59        -rm -rf generated_by_systemcass
60        -rm -rf system_systemcass.x.vcd system_systemc.x.vcd
61       
Note: See TracBrowser for help on using the repository browser.