Rev | Line | |
---|
[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 | OBJECTS = $(EXE:.x=.o) |
---|
| 8 | LINKS = $(OBJECTS:.o=.cpp) |
---|
| 9 | |
---|
| 10 | .SECONDARY: |
---|
| 11 | |
---|
| 12 | main : $(EXE) |
---|
| 13 | |
---|
| 14 | test : main |
---|
| 15 | ./system_systemcass.x |
---|
| 16 | diff results.txt results_reference.txt |
---|
| 17 | @echo Test OK. |
---|
| 18 | |
---|
| 19 | %.gif : %.dot |
---|
| 20 | dot -Tgif -o $*.gif $*.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 | |
---|
[13] | 28 | -include Makefile.deps |
---|
[1] | 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 : |
---|
[15] | 45 | rm -f Makefile.deps |
---|
[1] | 46 | -rm -f *.o gmon.out *~ |
---|
| 47 | -rm -f results.txt |
---|
| 48 | -rm -f signal_order.txt module_order.dot signal_graph.dot |
---|
| 49 | -rm -f module_order.gif signal_graph.gif |
---|
| 50 | -rm -f $(EXE) $(OBJECTS) |
---|
| 51 | -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null |
---|
| 52 | -rm -f core* |
---|
| 53 | -rm -rf generated_by_systemcass |
---|
| 54 | -rm -rf system_systemcass.x.vcd system_systemc.x.vcd |
---|
| 55 | |
---|
Note: See
TracBrowser
for help on using the repository browser.