1 | #TARGET_ARCH =Linux.SLA4x |
---|
2 | TARGET_ARCH = linux |
---|
3 | #TARGET_PLATFORM =i386 |
---|
4 | |
---|
5 | ifeq (${TARGET_ARCH},Darwin) |
---|
6 | DYNAMICLIB_FLAG = -dynamic |
---|
7 | ENDIANESS_FLAG = #-mlittle-endian |
---|
8 | else |
---|
9 | DYNAMICLIB_FLAG = -rdynamic |
---|
10 | ENDIANESS_FLAG = |
---|
11 | endif |
---|
12 | ifndef SYSTEMC |
---|
13 | $(error SYSTEMC should be set to SystemC directory (OSCI version) \ |
---|
14 | to compare simulation results.) |
---|
15 | endif |
---|
16 | |
---|
17 | #BFD_LIBERTY = -lbfd -liberty |
---|
18 | #SYSTEMC = /users/outil/systemc/systemc-2.0.1 |
---|
19 | SYSTEMC_INC = $(SYSTEMC)/include |
---|
20 | SYSTEMCASS_INC = $(SYSTEMCASS)/include |
---|
21 | SYSTEMC_LIB = $(SYSTEMC)/lib-${TARGET_ARCH}/libsystemc.a |
---|
22 | SYSTEMCASS_LIB = $(SYSTEMCASS)/lib-linux/libsystemc.a |
---|
23 | #CXX = g++ |
---|
24 | #CXX = icc -w1 |
---|
25 | CPPFILT = c++filt |
---|
26 | DEBUG = -g -DDEBUG |
---|
27 | #OPT = -O2 |
---|
28 | #PROF = -pg # gcc |
---|
29 | #PROF = -qp # icc |
---|
30 | #EFENCE = /users/cao/viaud/bin/lib/libefence.a -lpthread |
---|
31 | CFLAGS = $(PROF) $(DEBUG) $(OPT) \ |
---|
32 | -Wall \ |
---|
33 | -fopenmp \ |
---|
34 | -UENABLE_TRACE -UENABLE_PAT -I. \ |
---|
35 | ${ENDIANESS_FLAG} |
---|
36 | |
---|
37 | LFLAGS = $(PROF) $(BFD_LIBERTY) -ldl -fopenmp |
---|
38 | |
---|
39 | CFLAGS_SYSTEMC = $(CFLAGS) \ |
---|
40 | -I$(SYSTEMC_INC) \ |
---|
41 | |
---|
42 | CFLAGS_SYSTEMCASS = $(CFLAGS) \ |
---|
43 | -I$(SYSTEMCASS_INC) \ |
---|
44 | ${DYNAMICLIB_FLAG} #-Wno-deprecated |
---|
45 | |
---|
46 | LFLAGS_SYSTEMC = $(LFLAGS) \ |
---|
47 | $(SYSTEMC_LIB) |
---|
48 | |
---|
49 | LFLAGS_SYSTEMCASS = $(LFLAGS) \ |
---|
50 | ${DYNAMICLIB_FLAG} $(SYSTEMCASS_LIB) ${EFENCE} |
---|
51 | |
---|
52 | #ifndef TARGET_PLATFORM |
---|
53 | #$(error TARGET_PLATFORM is not defined.) |
---|
54 | #endif |
---|
55 | #ifndef TARGET_ARCH |
---|
56 | #$(error TARGET_ARCH is not defined.) |
---|
57 | #endif |
---|
58 | ifndef SYSTEMC |
---|
59 | $(error SYSTEMC is not defined.) |
---|
60 | endif |
---|
61 | ifndef SYSTEMCASS |
---|
62 | $(error SYSTEMCASS is not defined.) |
---|
63 | endif |
---|
64 | #ifndef SOCVIEW |
---|
65 | #$(error SOCVIEW is not defined. This environment variable is optional.) |
---|
66 | #endif |
---|
67 | |
---|
68 | failcom = 'exit 1' |
---|
69 | |
---|