1 | include ../env.mk |
---|
2 | |
---|
3 | EXE_SCASS = system_systemcass.x |
---|
4 | EXE_SC = system_systemc.x |
---|
5 | EXE = ${EXE_SCASS} ${EXE_SC} |
---|
6 | OBJECTS = $(EXE:.x=.o) |
---|
7 | LINKS = $(OBJECTS:.o=.cpp) |
---|
8 | |
---|
9 | .SECONDARY: |
---|
10 | |
---|
11 | main : $(EXE) |
---|
12 | |
---|
13 | test : ${EXE} |
---|
14 | ./system_systemcass.x --a --t --k; \ |
---|
15 | (tail -n +3 module_graph.dot | diff module_graph_cass_reference.dot -) || eval ${failcom} |
---|
16 | ./system_systemcass.x --m --t --k; \ |
---|
17 | (tail -n +3 port_graph.dot | diff port_graph_reference.dot -) || eval ${failcom} ; \ |
---|
18 | (tail -n +3 signal_graph.dot | diff signal_graph_reference.dot -) || eval ${failcom} ; \ |
---|
19 | (tail -n +3 process_order.dot | diff process_order_mouchard_reference.dot -) || eval ${failcom} |
---|
20 | ./system_systemcass.x --p --t --k; \ |
---|
21 | (tail -n +3 port_graph.dot | diff port_graph_reference.dot -) || eval ${failcom} ; \ |
---|
22 | (tail -n +3 signal_graph.dot | diff signal_graph_reference.dot -) || eval ${failcom} ; \ |
---|
23 | (tail -n +3 process_order.dot | diff process_order_buchmann_reference.dot -) || eval ${failcom} |
---|
24 | @echo Test OK. |
---|
25 | |
---|
26 | %.png : %.dot |
---|
27 | dot -Tpng -o $*.png $*.dot |
---|
28 | |
---|
29 | %_systemc.x : %_systemc.o $(SYSTEMC_LIB) |
---|
30 | $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) 2>&1 | $(CPPFILT) |
---|
31 | |
---|
32 | %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) |
---|
33 | $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT) |
---|
34 | |
---|
35 | include Makefile.deps |
---|
36 | |
---|
37 | %_systemc.cpp : %.cpp |
---|
38 | ln -s $*.cpp $*_systemc.cpp |
---|
39 | |
---|
40 | %_systemcass.cpp : %.cpp |
---|
41 | ln -s $*.cpp $*_systemcass.cpp |
---|
42 | |
---|
43 | %_systemc.o : %_systemc.cpp |
---|
44 | $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps |
---|
45 | $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o |
---|
46 | |
---|
47 | %_systemcass.o : %_systemcass.cpp |
---|
48 | $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps |
---|
49 | $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o |
---|
50 | |
---|
51 | clean : |
---|
52 | -echo > Makefile.deps |
---|
53 | -rm -f *.o gmon.out |
---|
54 | -rm -f signal_order.txt module_order.dot signal_graph.dot port_graph.dot |
---|
55 | -rm -f module_graph.dot process_order.dot |
---|
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 tracesystem_systemcass.x.vcd tracesystem_systemc.x.vcd |
---|
61 | |
---|