2013-02-27 15:59:40 +01:00
|
|
|
#
|
2017-01-10 16:57:22 +01:00
|
|
|
# Darwin-clang-libc++
|
2013-02-27 15:59:40 +01:00
|
|
|
#
|
2024-08-30 11:54:44 +02:00
|
|
|
# Build settings for Mac OS X 10.13 and later (clang, libc++, x86_64/arm64)
|
2013-02-27 15:59:40 +01:00
|
|
|
# The build settings defined in this file are compatible
|
2017-01-10 16:57:22 +01:00
|
|
|
# with XCode C++ projects.
|
2019-11-26 11:24:26 +01:00
|
|
|
#
|
2013-02-27 15:59:40 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# General Settings
|
|
|
|
#
|
|
|
|
LINKMODE ?= SHARED
|
|
|
|
|
2022-11-17 11:42:13 +01:00
|
|
|
ARCHFLAGS ?= -arch $(POCO_HOST_OSARCH)
|
2021-06-16 08:33:13 +02:00
|
|
|
SANITIZEFLAGS ?=
|
2024-08-30 11:54:44 +02:00
|
|
|
OSFLAGS ?= -mmacosx-version-min=10.15 -isysroot $(shell xcrun --show-sdk-path)
|
2013-02-27 15:59:40 +01:00
|
|
|
|
2022-11-17 11:42:13 +01:00
|
|
|
ifeq ($(POCO_HOST_OSARCH),arm64)
|
|
|
|
OPENSSL_DIR ?= /opt/homebrew/opt/openssl
|
|
|
|
else
|
2017-01-10 16:57:22 +01:00
|
|
|
OPENSSL_DIR ?= /usr/local/opt/openssl
|
2022-11-17 11:42:13 +01:00
|
|
|
endif
|
2015-10-05 09:29:40 +02:00
|
|
|
|
2013-02-27 15:59:40 +01:00
|
|
|
#
|
|
|
|
# Tools
|
|
|
|
#
|
|
|
|
CC = $(shell xcrun -find clang)
|
|
|
|
CXX = $(shell xcrun -find clang++)
|
|
|
|
LINK = $(CXX) -bind_at_load
|
|
|
|
LIB = libtool -static -o
|
|
|
|
RANLIB = ranlib
|
2015-01-13 14:40:52 +01:00
|
|
|
SHLIB = $(CXX) -dynamiclib -Wl,-install_name,$(POCO_LIB_INSTALLDIR)/$(notdir \$@) -o $@
|
2019-11-26 11:24:26 +01:00
|
|
|
DYLIB = $(CXX) -dynamic -bundle $(RORELOCS) -Wl,-bind_at_load -o $@
|
2013-02-27 15:59:40 +01:00
|
|
|
SHLIBLN = $(POCO_BASE)/build/script/shlibln
|
2019-11-26 11:24:26 +01:00
|
|
|
STRIP =
|
2013-02-27 15:59:40 +01:00
|
|
|
DEP = $(POCO_BASE)/build/script/makedepend.clang
|
|
|
|
SHELL = sh
|
|
|
|
RM = rm -rf
|
|
|
|
CP = cp
|
|
|
|
MKDIR = mkdir -p
|
|
|
|
|
|
|
|
#
|
|
|
|
# Extension for Shared Libraries
|
|
|
|
#
|
|
|
|
SHAREDLIBEXT = .$(target_version).dylib
|
|
|
|
SHAREDLIBLINKEXT = .dylib
|
|
|
|
|
|
|
|
#
|
|
|
|
# Compiler and Linker Flags
|
|
|
|
#
|
2021-06-16 08:33:13 +02:00
|
|
|
CFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -std=c11
|
gcc/clang (-fvisibility=hidden): corrections to compile and work properly (#4394)
* fix(ActiveRecord): missing ActiveRecordLib_API definitions for clang/gcc.
* fix(FPEnvironment): export FPEnvironmentImpl classes (#4393, #3331)
* fix(Crypto): export *Impl classes used from inlines (#4393, #3331)
* fix(Dynamic): explicitly instantiate and export Dynamic::Struct for string and int (-fvisibility=hidden) (#4393, #3331)
* fix(JSON): explicitly instantiate and export SharedPtr for JSON::Array and JSON::Object (-fvisibility=hidden) (#4393, #3331)
* enh(CMake): Set symbol visibility to hidden (#4393, #3331)
* enh(configure): user c++17 standard for iphone, Darwin and ARM-Linux.
* fix(UTF): explicitly instantiate and export 16 and 32-bit strings (-fvisibility=hidden) (#4393, #3331)
* fix(RecordSet): make Extraction.h internal and instantiate RecordsSet::column template functions only for supported types. (-fvisibility=hidden) (#4393, #3331)
* fix(UTF): fix explicitly instantiation on Windows (-fvisibility=hidden) (#4393, #3331)
* enh(CMake): Add github jobs for macOS with visibility set to hidden (#4393, #3331)
* fix(CppParser): Add missing declarations for CppParser_API (#4393, #3331)
* enh(CMake): Enable more options in github jobs for macOS with visibility set to hidden (#4393, #3331)
* fix(MongoDB): Add missing MongoDB_API (#4393, #3331)
2024-01-17 14:13:24 +01:00
|
|
|
CXXFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -std=c++17 -stdlib=libc++ -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-unneeded-internal-declaration
|
2021-06-16 08:33:13 +02:00
|
|
|
LINKFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
|
|
|
|
SHLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
|
|
|
|
DYLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
|
2013-02-27 15:59:40 +01:00
|
|
|
STATICOPT_CC =
|
|
|
|
STATICOPT_CXX =
|
|
|
|
STATICOPT_LINK =
|
2019-11-26 11:24:26 +01:00
|
|
|
SHAREDOPT_CC = -fPIC
|
2013-02-27 15:59:40 +01:00
|
|
|
SHAREDOPT_CXX = -fPIC
|
2019-11-26 11:24:26 +01:00
|
|
|
SHAREDOPT_LINK =
|
2013-02-27 15:59:40 +01:00
|
|
|
DEBUGOPT_CC = -O0 -g -gdwarf-2 -fasm-blocks -D_DEBUG=$(DEBUGLEVEL)
|
2019-11-26 11:24:26 +01:00
|
|
|
DEBUGOPT_CXX = -O0 -g -gdwarf-2 -fasm-blocks -D_DEBUG=$(DEBUGLEVEL)
|
2013-02-27 15:59:40 +01:00
|
|
|
DEBUGOPT_LINK =
|
|
|
|
RELEASEOPT_CC = -DNDEBUG -Os -fasm-blocks
|
|
|
|
RELEASEOPT_CXX = -DNDEBUG -O2 -fasm-blocks
|
|
|
|
RELEASEOPT_LINK =
|
|
|
|
|
|
|
|
#
|
|
|
|
# System Specific Flags
|
|
|
|
#
|
2015-10-05 09:29:40 +02:00
|
|
|
SYSFLAGS = -DPOCO_HAVE_IPv6 -DPOCO_NO_STAT64 -I$(OPENSSL_DIR)/include
|
2013-02-27 15:59:40 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# System Specific Libraries
|
|
|
|
#
|
2019-11-26 11:24:26 +01:00
|
|
|
SYSLIBS = -L$(OPENSSL_DIR)/lib -ldl
|