| 1 |
|
| 2 |
# This file should allow ACE to be built on Linux, using the Intel compiler. |
| 3 |
|
| 4 |
AR = xiar |
| 5 |
|
| 6 |
include $(ACE_ROOT)/include/makeinclude/platform_linux_common.GNU |
| 7 |
|
| 8 |
fast ?= 0 |
| 9 |
ipo ?= 0 |
| 10 |
|
| 11 |
ifeq ($(insure),0) |
| 12 |
CC = icc |
| 13 |
CXX = icpc |
| 14 |
endif |
| 15 |
|
| 16 |
ifndef CXX_VERSION |
| 17 |
CXX_VERSION := $(shell $(CXX) --version) |
| 18 |
endif |
| 19 |
|
| 20 |
ifeq (8.0,$(findstring 8.0,$(CXX_VERSION))) |
| 21 |
CFLAGS += -wd1476,1505 |
| 22 |
endif |
| 23 |
ifeq (8.1,$(findstring 8.1,$(CXX_VERSION))) |
| 24 |
CFLAGS += -wd1476,1505,1572 -no-gcc |
| 25 |
endif |
| 26 |
ifeq (9.0,$(findstring 9.0,$(CXX_VERSION))) |
| 27 |
CFLAGS += -wd1684 |
| 28 |
endif |
| 29 |
ifeq (9.1,$(findstring 9.1,$(CXX_VERSION))) |
| 30 |
CFLAGS += -wd1684 |
| 31 |
endif |
| 32 |
ifeq (10.0,$(findstring 10.0,$(CXX_VERSION))) |
| 33 |
CFLAGS += -wd1684 |
| 34 |
endif |
| 35 |
ifeq (10.1,$(findstring 10.1,$(CXX_VERSION))) |
| 36 |
CFLAGS += -wd1684 |
| 37 |
endif |
| 38 |
ifeq (11.0,$(findstring 11.0,$(CXX_VERSION))) |
| 39 |
CFLAGS += -wd1684 |
| 40 |
endif |
| 41 |
ifeq (12.0,$(findstring 12.0,$(CXX_VERSION))) |
| 42 |
no_hidden_visibility ?= 0 |
| 43 |
endif |
| 44 |
|
| 45 |
no_hidden_visibility ?= 1 |
| 46 |
|
| 47 |
ifeq ($(inline),0) |
| 48 |
CPPFLAGS += -fno-inline |
| 49 |
endif |
| 50 |
|
| 51 |
ifeq ($(fast),1) |
| 52 |
CPPFLAGS += -fast |
| 53 |
endif |
| 54 |
|
| 55 |
ifeq ($(ipo),1) |
| 56 |
CPPFLAGS += -ipo |
| 57 |
endif |
| 58 |
|
| 59 |
CFLAGS += -w1 |
| 60 |
ifeq ($(threads),1) |
| 61 |
CPPFLAGS += -D_REENTRANT |
| 62 |
endif # threads |
| 63 |
|
| 64 |
CCFLAGS += $(CFLAGS) -ip |
| 65 |
DCFLAGS += -g -debug full |
| 66 |
DLD = $(CXX) |
| 67 |
LD = $(CXX) |
| 68 |
LIBS += -ldl |
| 69 |
|
| 70 |
ifeq ($(threads),1) |
| 71 |
LIBS += -lpthread |
| 72 |
LIBS += -lrt |
| 73 |
endif |
| 74 |
|
| 75 |
OCFLAGS += -O3 |
| 76 |
|
| 77 |
# Disable floating point optimizer solves problem with |
| 78 |
# min/max float values in the TAO_IDL compiler tests |
| 79 |
# If these options are not passed we can get overflows |
| 80 |
# when testing min/max |
| 81 |
CPPFLAGS += -fp-model double |
| 82 |
|
| 83 |
ifeq ($(coverage),1) |
| 84 |
FLAGS_C_CC += -prof-gen |
| 85 |
endif |
| 86 |
|
| 87 |
ifeq ($(optimize),0) |
| 88 |
# Disable all optimizing in code |
| 89 |
CPPFLAGS += -O0 |
| 90 |
endif |
| 91 |
|
| 92 |
SOFLAGS += $(CPPFLAGS) -shared |
| 93 |
SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \ |
| 94 |
$(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o |
| 95 |
PRELIB = @true |
| 96 |
|
| 97 |
ifeq ($(shared_libs), 1) |
| 98 |
ifneq ($static_libs_only), 1) |
| 99 |
LDFLAGS += -Wl,-E |
| 100 |
ifneq ($(no_hidden_visibility),1) |
| 101 |
CCFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden |
| 102 |
else |
| 103 |
CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0 |
| 104 |
endif # no_hidden_visibility |
| 105 |
endif |
| 106 |
endif |
| 107 |
|
| 108 |
|
| 109 |
# Added line below to support "Executable Shared Object" files (as |
| 110 |
# needed by the service configurator). |
| 111 |
# Marius Kjeldahl <[email protected], [email protected]> |
| 112 |
ifeq ($(threads),1) |
| 113 |
ESOBUILD = $(COMPILEESO.cc) $(PIC) -shared -o $(VSHDIR)$*.so $< |
| 114 |
ifndef PRELIB |
| 115 |
PRELIB = @true |
| 116 |
endif # ! PRELIB |
| 117 |
endif |