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 CXX_MAJOR_VERSION := $(firstword $(subst ., ,$(CXX_VERSION)))
17 # clang 16 and newer default to C++17
18 ifeq ($(CXX_MAJOR_VERSION),$(filter $(CXX_MAJOR_VERSION),4 5 6 7 8 9 10 11 12 13 14 15))
40 CCFLAGS += -std=$(c++std)
41 else ifeq ($(c++20),1)
43 else ifeq ($(c++17),1)
47 ifeq ($(no_deprecated),1)
48 CCFLAGS += -Wno-deprecated-declarations
51 SOFLAGS += $(CPPFLAGS) -shared
52 SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \
53 $(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o
56 # Visibility doesn't seem to work with clang 2.8, default to off
57 no_hidden_visibility ?= 1
59 ifeq ($(shared_libs), 1)
60 ifneq ($static_libs_only), 1)
62 ifneq ($(no_hidden_visibility),1)
63 CCFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
65 CPPFLAGS += -DACE_HAS_CUSTOM_EXPORT_MACROS=0
66 endif # no_hidden_visibility
70 # Added line below to support "Executable Shared Object" files (as
71 # needed by the service configurator).
72 # Marius Kjeldahl <mariusk@sn.no, marius@funcom.com>
74 ESOBUILD = $(COMPILEESO.cc) $(PIC) -shared -o $(VSHDIR)$*.so $<