[1] | 1 | include ../env.mk |
---|
| 2 | |
---|
| 3 | EXE = system_systemc.x system_systemcass.x |
---|
| 4 | OBJECTS = $(EXE:.x=.o) |
---|
| 5 | LINKS = $(OBJECTS:.o=.cpp) |
---|
| 6 | |
---|
| 7 | .SECONDARY: |
---|
| 8 | |
---|
| 9 | main : $(EXE) |
---|
| 10 | |
---|
| 11 | test : system-23.vcd system-23_reference.vcd |
---|
| 12 | -diff system-23.vcd system-23_reference.vcd |
---|
| 13 | @echo Test OK. |
---|
| 14 | |
---|
| 15 | system-23.vcd : system_systemcass.x |
---|
| 16 | ./system_systemcass.x system 23 |
---|
| 17 | tail -n +8 system.vcd > system-23.vcd |
---|
| 18 | rm system.vcd |
---|
| 19 | |
---|
| 20 | system-23_reference.vcd : system_systemc.x |
---|
| 21 | ./system_systemc.x system 23 |
---|
| 22 | tail -n +8 system.vcd > system-23_reference.vcd |
---|
| 23 | rm system.vcd |
---|
| 24 | |
---|
| 25 | %_systemc.x : %_systemc.o $(SYSTEMC_LIB) |
---|
| 26 | $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) |
---|
| 27 | |
---|
| 28 | %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) |
---|
| 29 | $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) |
---|
| 30 | |
---|
[13] | 31 | -include Makefile.deps |
---|
[1] | 32 | |
---|
| 33 | %_systemc.cpp : %.cpp |
---|
| 34 | ln -s $*.cpp $*_systemc.cpp |
---|
| 35 | |
---|
| 36 | %_systemcass.cpp : %.cpp |
---|
| 37 | ln -s $*.cpp $*_systemcass.cpp |
---|
| 38 | |
---|
| 39 | %_systemc.o : %_systemc.cpp |
---|
| 40 | $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps |
---|
| 41 | $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o |
---|
| 42 | |
---|
| 43 | %_systemcass.o : %_systemcass.cpp |
---|
| 44 | $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps |
---|
| 45 | $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o |
---|
| 46 | |
---|
| 47 | clean : |
---|
[15] | 48 | rm -f Makefile.deps |
---|
[1] | 49 | -rm -f *.o gmon.out |
---|
| 50 | -rm -f *.txt |
---|
| 51 | -rm -f $(EXE) $(OBJECTS) |
---|
| 52 | -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null |
---|
| 53 | -rm -f core* |
---|
| 54 | -rm -f *~ |
---|
| 55 | -rm -rf generated_by_systemcass |
---|
| 56 | -rm -rf trace_system_systemcass.x.vcd trace_system_systemc.x.vcd |
---|
| 57 | -rm -rf system-23.vcd |
---|
| 58 | -rm -rf system_systemcass.log |
---|
| 59 | |
---|