Lines 32-43
Link Here
|
32 |
EXPORT_KEY = -Wl,--version-script, |
32 |
EXPORT_KEY = -Wl,--version-script, |
33 |
LIBDL = -ldl |
33 |
LIBDL = -ldl |
34 |
|
34 |
|
35 |
CPLUS = g++ |
35 |
CPLUS := $(CXX) |
36 |
CONLY = gcc |
36 |
CONLY := $(CC) |
37 |
LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY) |
37 |
LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY) |
38 |
LIBS += -lpthread -lrt |
38 |
LIBS += -lpthread -lrt |
39 |
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic |
39 |
LINK_FLAGS = -Wl,-rpath-link=. -rdynamic |
40 |
C_FLAGS = $(CPLUS_FLAGS) |
40 |
C_FLAGS := $(CPLUS_FLAGS) |
41 |
# gcc 4.4 and higher support -std=c++0x |
41 |
# gcc 4.4 and higher support -std=c++0x |
42 |
ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[4-9]|[5-9])")) |
42 |
ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[4-9]|[5-9])")) |
43 |
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X |
43 |
CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X |
Lines 54-60
Link Here
|
54 |
endif |
54 |
endif |
55 |
|
55 |
|
56 |
ifeq ($(cfg), release) |
56 |
ifeq ($(cfg), release) |
57 |
CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD |
57 |
CPLUS_FLAGS = $(ITT_NOTIFY) -g -DUSE_PTHREAD |
58 |
endif |
58 |
endif |
59 |
ifeq ($(cfg), debug) |
59 |
ifeq ($(cfg), debug) |
60 |
CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD |
60 |
CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD |
Lines 74-97
Link Here
|
74 |
|
74 |
|
75 |
ifeq (intel64,$(arch)) |
75 |
ifeq (intel64,$(arch)) |
76 |
ITT_NOTIFY = -DDO_ITT_NOTIFY |
76 |
ITT_NOTIFY = -DDO_ITT_NOTIFY |
77 |
CPLUS_FLAGS += -m64 $(RTM_KEY) |
77 |
CPLUS_FLAGS += $(RTM_KEY) |
78 |
LIB_LINK_FLAGS += -m64 |
|
|
79 |
endif |
78 |
endif |
80 |
|
79 |
|
81 |
ifeq (ia32,$(arch)) |
80 |
ifeq (ia32,$(arch)) |
82 |
ITT_NOTIFY = -DDO_ITT_NOTIFY |
81 |
ITT_NOTIFY = -DDO_ITT_NOTIFY |
83 |
CPLUS_FLAGS += -m32 -march=pentium4 $(RTM_KEY) |
82 |
CPLUS_FLAGS += $(RTM_KEY) |
84 |
LIB_LINK_FLAGS += -m32 |
|
|
85 |
endif |
86 |
|
87 |
ifeq (ppc64,$(arch)) |
88 |
CPLUS_FLAGS += -m64 |
89 |
LIB_LINK_FLAGS += -m64 |
90 |
endif |
91 |
|
92 |
ifeq (ppc32,$(arch)) |
93 |
CPLUS_FLAGS += -m32 |
94 |
LIB_LINK_FLAGS += -m32 |
95 |
endif |
83 |
endif |
96 |
|
84 |
|
97 |
ifeq (bg,$(arch)) |
85 |
ifeq (bg,$(arch)) |
Lines 99-110
Link Here
|
99 |
CONLY = mpicc |
87 |
CONLY = mpicc |
100 |
endif |
88 |
endif |
101 |
|
89 |
|
102 |
# for some gcc versions on Solaris, -m64 may imply V9, but perhaps not everywhere (TODO: verify) |
|
|
103 |
ifeq (sparc,$(arch)) |
104 |
CPLUS_FLAGS += -mcpu=v9 -m64 |
105 |
LIB_LINK_FLAGS += -mcpu=v9 -m64 |
106 |
endif |
107 |
|
108 |
# automatically generate "IT" instructions when compiling for Thumb ISA |
90 |
# automatically generate "IT" instructions when compiling for Thumb ISA |
109 |
ifeq (armv7,$(arch)) |
91 |
ifeq (armv7,$(arch)) |
110 |
CPLUS_FLAGS += -Wa,-mimplicit-it=thumb |
92 |
CPLUS_FLAGS += -Wa,-mimplicit-it=thumb |
Lines 113-125
Link Here
|
113 |
#------------------------------------------------------------------------------ |
95 |
#------------------------------------------------------------------------------ |
114 |
# Setting assembler data. |
96 |
# Setting assembler data. |
115 |
#------------------------------------------------------------------------------ |
97 |
#------------------------------------------------------------------------------ |
116 |
ASM = as |
98 |
ASM := $(AS) |
117 |
ifeq (intel64,$(arch)) |
|
|
118 |
ASM_FLAGS += --64 |
119 |
endif |
120 |
ifeq (ia32,$(arch)) |
121 |
ASM_FLAGS += --32 |
122 |
endif |
123 |
ifeq ($(cfg),debug) |
99 |
ifeq ($(cfg),debug) |
124 |
ASM_FLAGS += -g |
100 |
ASM_FLAGS += -g |
125 |
endif |
101 |
endif |