[1] | 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 : main |
---|
| 14 | ./system_systemc.x ; \ |
---|
| 15 | ./system_systemcass.x --p --t || eval ${failcom} ; \ |
---|
[18] | 16 | ((tail --lines=+3 signal_graph.dot | diff signal_graph_reference.dot -) || (tail -n +3 signal_graph.dot | diff signal_graph_reference2.dot -)) || eval ${failcom} |
---|
[1] | 17 | tail --lines=+3 process_order.dot | diff process_order_reference.dot - |
---|
| 18 | diff signal_order_reference.txt signal_order.txt |
---|
| 19 | @echo Test OK. |
---|
| 20 | |
---|
| 21 | %_systemc.x : %_systemc.o $(SYSTEMC_LIB) |
---|
| 22 | $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) |
---|
| 23 | |
---|
| 24 | %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) |
---|
| 25 | $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) |
---|
| 26 | |
---|
[13] | 27 | -include Makefile.deps |
---|
[1] | 28 | |
---|
| 29 | %_systemc.cpp : %.cpp |
---|
| 30 | ln -s $*.cpp $*_systemc.cpp |
---|
| 31 | |
---|
| 32 | %_systemcass.cpp : %.cpp |
---|
| 33 | ln -s $*.cpp $*_systemcass.cpp |
---|
| 34 | |
---|
| 35 | %_systemc.o : %_systemc.cpp |
---|
| 36 | $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps |
---|
| 37 | $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o |
---|
| 38 | |
---|
| 39 | %_systemcass.o : %_systemcass.cpp |
---|
| 40 | $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps |
---|
| 41 | $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o |
---|
| 42 | |
---|
| 43 | %.gif : %.dot |
---|
| 44 | dot -Tgif -o $*.gif $*.dot |
---|
| 45 | |
---|
| 46 | clean : |
---|
[15] | 47 | rm -f Makefile.deps |
---|
[1] | 48 | -rm -f *.o gmon.out |
---|
| 49 | -rm -f port_graph.dot signal_order.txt process_order.dot signal_graph.dot |
---|
| 50 | -rm -f $(EXE) $(OBJECTS) |
---|
| 51 | -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null |
---|
| 52 | -rm -f core* |
---|
| 53 | -rm -f *~ |
---|
| 54 | -rm -rf generated_by_systemcass |
---|
| 55 | -rm -rf tracesystem_systemcass.x.vcd tracesystem_systemc.x.vcd |
---|
| 56 | |
---|