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