1 | include ../env.mk |
---|
2 | |
---|
3 | SYSTEM = system.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) |
---|
10 | |
---|
11 | .SECONDARY: |
---|
12 | |
---|
13 | main : $(EXE) |
---|
14 | |
---|
15 | test : system.vcd system_systemcass.x-60_reference.vcd |
---|
16 | -diff system.vcd system_systemcass.x-60_reference.vcd |
---|
17 | |
---|
18 | %.vcd : %_systemcass.x %_systemc.x |
---|
19 | ./$*_systemcass.x $*_systemcass.x 60 |
---|
20 | tail -n +8 $*_systemcass.x.vcd > $*.vcd |
---|
21 | rm $*_systemcass.x.vcd |
---|
22 | |
---|
23 | %.gif : %.dot |
---|
24 | dot -Tgif -o $*.gif $*.dot |
---|
25 | |
---|
26 | %_systemc.x : %_systemc.o $(SYSTEMC_LIB) |
---|
27 | $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) |
---|
28 | |
---|
29 | %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) |
---|
30 | $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) |
---|
31 | |
---|
32 | -include Makefile.deps |
---|
33 | |
---|
34 | %_systemc.cpp : %.cpp |
---|
35 | ln -s $*.cpp $*_systemc.cpp |
---|
36 | |
---|
37 | %_systemcass.cpp : %.cpp |
---|
38 | ln -s $*.cpp $*_systemcass.cpp |
---|
39 | |
---|
40 | %_systemc.o : %_systemc.cpp |
---|
41 | $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps |
---|
42 | $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o |
---|
43 | |
---|
44 | %_systemcass.o : %_systemcass.cpp |
---|
45 | $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps |
---|
46 | $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o |
---|
47 | |
---|
48 | clean : |
---|
49 | rm -f Makefile.deps |
---|
50 | -rm -f *.o gmon.out *~ |
---|
51 | -rm -f ${LOG} |
---|
52 | -rm -f signal_order.txt module_order.dot signal_graph.dot |
---|
53 | -rm -f module_order.gif signal_graph.gif |
---|
54 | -rm -f $(EXE) $(OBJECTS) |
---|
55 | -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null |
---|
56 | -rm -f core* |
---|
57 | -rm -rf generated_by_systemcass |
---|
58 | -rm -rf system_systemcass.x.vcd system_systemc.x.vcd |
---|
59 | |
---|