1 | include ../env.mk |
---|
2 | |
---|
3 | SYSTEM = system.cpp system2.cpp system3.cpp system4.cpp |
---|
4 | EXE_SCASS = $(SYSTEM:.cpp=_systemcass.x) |
---|
5 | EXE_SC = $(SYSTEM:.cpp=_systemc.x) |
---|
6 | EXE_SVIEW = $(SYSTEM:.cpp=_socview.x) |
---|
7 | EXE = ${EXE_SCASS} |
---|
8 | OBJECTS = $(EXE:.x=.o) |
---|
9 | LINKS = $(OBJECTS:.o=.cpp) |
---|
10 | |
---|
11 | .SECONDARY: |
---|
12 | |
---|
13 | main : $(EXE) |
---|
14 | |
---|
15 | test : main |
---|
16 | @./system_systemcass.x --p ; \ |
---|
17 | if [ $$? -ne 6 ] ; then eval ${failcom} ; fi ; \ |
---|
18 | echo Bug detection OK |
---|
19 | @./system2_systemcass.x --p || eval ${failcom} |
---|
20 | @./system3_systemcass.x --p || eval ${failcom} |
---|
21 | @./system4_systemcass.x --p || eval ${failcom} |
---|
22 | |
---|
23 | |
---|
24 | %.gif : %.dot |
---|
25 | dot -Tgif -o $*.gif $*.dot |
---|
26 | |
---|
27 | %_systemc.x : %_systemc.o $(SYSTEMC_LIB) |
---|
28 | $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) |
---|
29 | |
---|
30 | %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) |
---|
31 | $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) |
---|
32 | |
---|
33 | %_socview.x : %_socview.o $(SOCVIEW_LIB) |
---|
34 | $(CXX) -o $@ $*_socview.o $(LFLAGS_SOCVIEW) |
---|
35 | |
---|
36 | include Makefile.deps |
---|
37 | |
---|
38 | %_systemc.cpp : %.cpp |
---|
39 | ln -s $*.cpp $*_systemc.cpp |
---|
40 | |
---|
41 | %_systemcass.cpp : %.cpp |
---|
42 | ln -s $*.cpp $*_systemcass.cpp |
---|
43 | |
---|
44 | %_socview.cpp : %.cpp |
---|
45 | ln -s $*.cpp $*_socview.cpp |
---|
46 | |
---|
47 | %_systemc.o : %_systemc.cpp |
---|
48 | $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps |
---|
49 | $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o |
---|
50 | |
---|
51 | %_systemcass.o : %_systemcass.cpp |
---|
52 | $(CXX) $(CFLAGS_SYSTEMCASS) -DCHECK_MULTIWRITING2PORT -MM $*_systemcass.cpp >> Makefile.deps |
---|
53 | $(CXX) $(CFLAGS_SYSTEMCASS) -DCHECK_MULTIWRITING2PORT -c $*_systemcass.cpp -o $*_systemcass.o |
---|
54 | |
---|
55 | %_socview.o : %_socview.cpp |
---|
56 | $(CXX) $(CFLAGS_SOCVIEW) -MM $*_socview.cpp >> Makefile.deps |
---|
57 | $(CXX) $(CFLAGS_SOCVIEW) -c $*_socview.cpp -o $*_socview.o |
---|
58 | |
---|
59 | clean : |
---|
60 | -echo > Makefile.deps |
---|
61 | -rm -f *.o gmon.out *~ |
---|
62 | -rm -f results |
---|
63 | -rm -f signal_order.txt module_order.dot signal_graph.dot |
---|
64 | -rm -f module_order.gif signal_graph.gif |
---|
65 | -rm -f $(EXE) $(OBJECTS) |
---|
66 | -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null |
---|
67 | -rm -f core* |
---|
68 | -rm -rf system_systemcass.x.vcd system_systemc.x.vcd |
---|
69 | -rm -rf generated_by_systemcass |
---|
70 | |
---|