[1] | 1 | include ../env.mk |
---|
| 2 | |
---|
| 3 | SYSTEM = system.cpp system2.cpp system3.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 : main |
---|
| 16 | ./system_systemcass.x || eval ${failcom} ; \ |
---|
| 17 | ./system2_systemcass.x ; \ |
---|
| 18 | if [ $$? -ne 29 ] ; then eval ${failcom} ; fi ; \ |
---|
| 19 | ./system3_systemcass.x ; \ |
---|
| 20 | if [ $$? -ne 29 ] ; then eval ${failcom} ; fi ; \ |
---|
| 21 | echo Test OK. |
---|
| 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) 2>&1 | $(CPPFILT) |
---|
| 28 | |
---|
| 29 | %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) |
---|
| 30 | $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT) |
---|
| 31 | |
---|
[13] | 32 | -include Makefile.deps |
---|
[1] | 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) -Wno-deprecated -MM $*_systemc.cpp >> Makefile.deps |
---|
| 42 | $(CXX) $(CFLAGS_SYSTEMC) -Wno-deprecated -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 : |
---|
[15] | 49 | rm -f Makefile.deps |
---|
[1] | 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 | |
---|