1 # This file should allow ACE to be built on Linux, using the clang compiler.
3 include $(ACE_ROOT)/include/makeinclude/platform_linux_common.GNU
13 CXX_VERSION := $(shell $(CXX) -dumpversion)
15 ifeq (cmd,$(findstring cmd,$(SHELL)))
16 CXX_MAJOR_VERSION := $(firstword $(subst ., ,$(CXX_VERSION)))
18 CXX_MAJOR_VERSION := $(shell $(CXX) -dumpversion | sed -e 's/[^0-9\.]//g' | sed -e 's/\..*$$//')
21 # clang5/6/7/8 have C++11 as default C++ version, enable this to be C++14
22 ifeq ($(findstring $(CXX_MAJOR_VERSION),5),$(CXX_MAJOR_VERSION))
25 ifeq ($(findstring $(CXX_MAJOR_VERSION),6),$(CXX_MAJOR_VERSION))
28 ifeq ($(findstring $(CXX_MAJOR_VERSION),7),$(CXX_MAJOR_VERSION))
31 ifeq ($(findstring $(CXX_MAJOR_VERSION),8),$(CXX_MAJOR_VERSION))
60 ifeq ($(no_deprecated),1)
61 CCFLAGS += -Wno-deprecated-declarations
64 SOFLAGS += $(CPPFLAGS) -shared
65 SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \
66 $(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o
69 # Visibility doesn't seem to work with clang 2.8, default to off
70 no_hidden_visibility ?= 1
72 ifeq ($(shared_libs), 1)
73 ifneq ($static_libs_only), 1)
75 ifneq ($(no_hidden_visibility),1)
76 CCFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
78 CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
79 endif # no_hidden_visibility
83 # Added line below to support "Executable Shared Object" files (as
84 # needed by the service configurator).
85 # Marius Kjeldahl <mariusk@sn.no, marius@funcom.com>
87 ESOBUILD = $(COMPILEESO.cc) $(PIC) -shared -o $(VSHDIR)$*.so $<