1 | #TARGET_ARCH = linux |
---|
2 | BFD_LIBERTY = -lbfd -liberty |
---|
3 | SOCLIB_LIB = $(SOCLIB)/lib/libsoclib.a |
---|
4 | SOCLIB_INCLUDE = $(SOCLIB)/include |
---|
5 | #SYSTEMC = /users/outil/systemc/systemc-2.0.1 |
---|
6 | #SYSTEMC = /dsk/l1/misc/richard/systemc_2_1.oct_12_2004.beta |
---|
7 | #SYSTEMCASS = /users/cao/buchmann/systemcass/systemcass |
---|
8 | SYSTEMC_INC = $(SYSTEMC)/include |
---|
9 | SYSTEMCASS_INC = $(SYSTEMCASS)/include |
---|
10 | SYSTEMC_LIB = $(SYSTEMC)/lib-$(TARGET_ARCH)/libsystemc.a |
---|
11 | SYSTEMCASS_LIB = $(SYSTEMCASS)/lib-$(TARGET_ARCH)/libsystemc_$(firstword $(CXX)).a |
---|
12 | |
---|
13 | #CXX = g++ |
---|
14 | #CXX = icc -w1 |
---|
15 | CPPFILT = c++filt |
---|
16 | #DEBUG = -g -DDEBUG |
---|
17 | OPT = -O2 -UENABLE_TRACE -UENABLE_PAT |
---|
18 | #PROF = -pg # gcc |
---|
19 | #PROF = -qp # icc |
---|
20 | CFLAGS = $(PROF) $(DEBUG) $(OPT) -I. -I$(SOCLIB)/include |
---|
21 | LFLAGS = $(PROF) $(SOCLIB_LIB) $(BFD_LIBERTY) -ldl |
---|
22 | |
---|
23 | CFLAGS_SYSTEMC = $(CFLAGS) -I$(SYSTEMC_INC) |
---|
24 | CFLAGS_SYSTEMCASS = $(CFLAGS) -I$(SYSTEMCASS_INC) -rdynamic #-Wno-deprecated |
---|
25 | LFLAGS_SYSTEMC = $(LFLAGS) $(SYSTEMC_LIB) |
---|
26 | LFLAGS_SYSTEMCASS = $(LFLAGS) -rdynamic $(SYSTEMCASS_LIB) |
---|
27 | |
---|
28 | EXE = system_systemc.x system_systemcass.x |
---|
29 | OBJECTS = $(EXE:.x=.o) |
---|
30 | LINKS = $(OBJECTS:.o=.cpp) |
---|
31 | |
---|
32 | .SECONDARY: |
---|
33 | |
---|
34 | main : $(EXE) |
---|
35 | |
---|
36 | %_systemc.x : %_systemc.o $(SYSTEMC_LIB) |
---|
37 | $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) 2>&1 | $(CPPFILT) |
---|
38 | |
---|
39 | %_systemcass.x : %_systemcass.o $(SYSTEMCASS_LIB) |
---|
40 | $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT) |
---|
41 | |
---|
42 | include Makefile.deps |
---|
43 | |
---|
44 | %_systemc.cpp : %.cpp |
---|
45 | ln -s $*.cpp $*_systemc.cpp |
---|
46 | |
---|
47 | %_systemcass.cpp : %.cpp |
---|
48 | ln -s $*.cpp $*_systemcass.cpp |
---|
49 | |
---|
50 | %_systemc.o : %_systemc.cpp |
---|
51 | $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps |
---|
52 | $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o |
---|
53 | |
---|
54 | %_systemcass.o : %_systemcass.cpp |
---|
55 | $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps |
---|
56 | $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o |
---|
57 | |
---|
58 | %.gif : %.dot |
---|
59 | dot -Tgif -o $*.gif $*.dot |
---|
60 | |
---|
61 | view_%.dot : %.gif |
---|
62 | gqview $*.gif & |
---|
63 | |
---|
64 | |
---|
65 | clean : |
---|
66 | -echo > Makefile.deps |
---|
67 | -rm -f *.o gmon.out |
---|
68 | -rm -f *.txt |
---|
69 | -rm -f $(EXE) $(OBJECTS) |
---|
70 | -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null |
---|
71 | -rm -f core* |
---|
72 | -rm -f trace_file.vcd |
---|
73 | -rm -f trace_file.pat |
---|
74 | -rm -f TTY_* |
---|
75 | -rm -rf code-*.cc code-*.so .libs/ |
---|
76 | |
---|