include ../env.mk SYSTEM = system_bug.cpp system_ok.cpp EXE_SCASS = $(SYSTEM:.cpp=_systemcass.x) EXE_SC = $(SYSTEM:.cpp=_systemc.x) EXE = ${EXE_SCASS} OBJECTS = $(EXE:.x=.o) LINKS = $(OBJECTS:.o=.cpp) .SECONDARY: main : $(EXE) test : main @./system_bug_systemcass.x --p ; \ if [ $$? -ne 6 ] ; then eval ${failcom} ; fi ; \ echo Bug detection OK @./system_ok_systemcass.x --p || eval ${failcom} %.gif : %.dot dot -Tgif -o $*.gif $*.dot %_systemc.x : %_systemc.o $(SYSTEMC_LIB) $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) %_socview.x : %_socview.o $(SOCVIEW_LIB) $(CXX) -o $@ $*_socview.o $(LFLAGS_SOCVIEW) -include Makefile.deps %_systemc.cpp : %.cpp ln -s $*.cpp $*_systemc.cpp %_systemcass.cpp : %.cpp ln -s $*.cpp $*_systemcass.cpp %_socview.cpp : %.cpp ln -s $*.cpp $*_socview.cpp %_systemc.o : %_systemc.cpp $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o %_systemcass.o : %_systemcass.cpp $(CXX) $(CFLAGS_SYSTEMCASS) -DCHECK_MULTIWRITING2PORT -MM $*_systemcass.cpp >> Makefile.deps $(CXX) $(CFLAGS_SYSTEMCASS) -DCHECK_MULTIWRITING2PORT -c $*_systemcass.cpp -o $*_systemcass.o %_socview.o : %_socview.cpp $(CXX) $(CFLAGS_SOCVIEW) -MM $*_socview.cpp >> Makefile.deps $(CXX) $(CFLAGS_SOCVIEW) -c $*_socview.cpp -o $*_socview.o clean : rm -f Makefile.deps -rm -f gmon.out *~ -rm -f $(EXE) $(OBJECTS) -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null -rm -f core* -rm -rf generated_by_systemcass