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 3 ) 2>&1 | grep "Cycle Accurate System Simulator") || eval ${failcom} |
---|
15 | (./system_systemcass.x --nobanner 3 ) 2>&1 | grep "Cycle Accurate System Simulator" ; \ |
---|
16 | if [ $$? -ne 1 ] ; then eval ${failcom} ; fi |
---|
17 | @echo Test OK. |
---|
18 | |
---|
19 | %.png : %.dot |
---|
20 | dot -Tpng -o $*.png $*.dot |
---|
21 | |
---|
22 | %_systemc.x : %_systemc.o $(SYSTEMC_LIB) |
---|
23 | $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) 2>&1 | $(CPPFILT) |
---|
24 | |
---|
25 | %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) |
---|
26 | $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT) |
---|
27 | |
---|
28 | include Makefile.deps |
---|
29 | |
---|
30 | %_systemc.cpp : %.cpp |
---|
31 | ln -s $*.cpp $*_systemc.cpp |
---|
32 | |
---|
33 | %_systemcass.cpp : %.cpp |
---|
34 | ln -s $*.cpp $*_systemcass.cpp |
---|
35 | |
---|
36 | %_systemc.o : %_systemc.cpp |
---|
37 | $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps |
---|
38 | $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o |
---|
39 | |
---|
40 | %_systemcass.o : %_systemcass.cpp |
---|
41 | $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps |
---|
42 | $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o |
---|
43 | |
---|
44 | clean : |
---|
45 | -echo > Makefile.deps |
---|
46 | -rm -f *.o gmon.out |
---|
47 | -rm -f signal_order.txt module_order.dot signal_graph.dot port_graph.dot |
---|
48 | -rm -f module_graph.dot process_order.dot |
---|
49 | -rm -f $(EXE) $(OBJECTS) |
---|
50 | -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null |
---|
51 | -rm -f core* |
---|
52 | -rm -rf generated_by_systemcass |
---|
53 | -rm -rf tracesystem_systemcass.x.vcd tracesystem_systemc.x.vcd |
---|
54 | |
---|