2021-01-30 07:51:39 +01:00
|
|
|
#
|
|
|
|
# iPhone
|
|
|
|
#
|
|
|
|
# Build settings for iPhone OS, using Apple's iPhone SDK
|
2021-08-22 17:07:06 +02:00
|
|
|
#
|
2021-01-30 07:51:39 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# General Settings
|
|
|
|
#
|
|
|
|
# iPhone OS does not allow dynamic linking to user libraries
|
|
|
|
#
|
|
|
|
LINKMODE ?= STATIC
|
|
|
|
|
|
|
|
#
|
|
|
|
# If the SDK is defined use it
|
|
|
|
# Otherwise find the latest version installed
|
|
|
|
#
|
|
|
|
# IPHONE_SDK_VERSION = 2.2.1
|
|
|
|
|
|
|
|
# if IPHONE_SDK_VERSION_MIN is defined use that
|
2021-08-22 17:07:06 +02:00
|
|
|
# Otherwise use the version found.
|
2021-01-30 07:51:39 +01:00
|
|
|
|
|
|
|
IPHONE_SDK ?= iPhoneOS
|
|
|
|
IPHONE_SDK_ROOT ?= $(shell xcode-select -print-path)/Platforms/$(IPHONE_SDK).platform/Developer/SDKs
|
|
|
|
IPHONE_SDK_ROOT_DIR = $(IPHONE_SDK_ROOT)/$(IPHONE_SDK)
|
|
|
|
IPHONE_SDK_BASE = $(shell ls -d $(IPHONE_SDK_ROOT_DIR)$(IPHONE_SDK_VERSION)*.sdk | tail -1)
|
|
|
|
IPHONE_SDK_VERSION_MIN ?= $(patsubst %.sdk,%,$(patsubst $(IPHONE_SDK_ROOT_DIR)%,%,$(IPHONE_SDK_BASE)))
|
|
|
|
|
|
|
|
POCO_TARGET_OSNAME ?= $(IPHONE_SDK)
|
|
|
|
POCO_TARGET_OSARCH ?= arm64
|
|
|
|
TOOL_PREFIX ?= $(shell xcode-select -print-path)/Platforms/$(IPHONE_SDK).platform/Developer/usr/bin
|
|
|
|
ifneq ($(POCO_TARGET_OSARCH),arm64)
|
|
|
|
THUMB = -mthumb
|
|
|
|
endif
|
|
|
|
OSFLAGS ?= -arch $(POCO_TARGET_OSARCH) -isysroot $(IPHONE_SDK_BASE) $(THUMB) -miphoneos-version-min=$(IPHONE_SDK_VERSION_MIN) -fembed-bitcode
|
|
|
|
|
|
|
|
#
|
|
|
|
# Tools
|
|
|
|
#
|
|
|
|
|
|
|
|
CC = $(shell xcrun -find clang)
|
|
|
|
CXX = $(shell xcrun -find clang++)
|
|
|
|
|
|
|
|
LINK = $(CXX) -bind_at_load
|
|
|
|
LIB = libtool -static -o
|
|
|
|
RANLIB = ranlib
|
|
|
|
SHLIB = $(CXX) $(OSFLAGS) -dynamiclib -Wl,-install_name,$@ -o $@
|
2021-08-22 17:07:06 +02:00
|
|
|
DYLIB = $(CXX) $(OSFLAGS) -dynamic -bundle -read_only_relocs suppress -Wl,-bind_at_load -o $@
|
2021-01-30 07:51:39 +01:00
|
|
|
SHLIBLN = $(POCO_BASE)/build/script/shlibln
|
2021-08-22 17:07:06 +02:00
|
|
|
STRIP =
|
2021-01-30 07:51:39 +01:00
|
|
|
DEP = $(POCO_BASE)/build/script/makedepend.gcc
|
|
|
|
SHELL = sh
|
|
|
|
RM = rm -rf
|
|
|
|
CP = cp
|
|
|
|
MKDIR = mkdir -p
|
|
|
|
|
|
|
|
#
|
|
|
|
# Extension for Shared Libraries
|
|
|
|
#
|
|
|
|
SHAREDLIBEXT = .$(target_version).dylib
|
|
|
|
SHAREDLIBLINKEXT = .dylib
|
|
|
|
|
|
|
|
#
|
|
|
|
# Compiler and Linker Flags
|
|
|
|
#
|
|
|
|
CFLAGS = $(OSFLAGS) -std=gnu99
|
|
|
|
CFLAGS32 =
|
|
|
|
CFLAGS64 =
|
2021-08-22 17:07:06 +02:00
|
|
|
CXXFLAGS = $(OSFLAGS) -std=gnu++14 -stdlib=libc++ -Wall -Wno-sign-compare
|
2021-01-30 07:51:39 +01:00
|
|
|
CXXFLAGS32 =
|
2021-08-22 17:07:06 +02:00
|
|
|
CXXFLAGS64 =
|
2021-01-30 07:51:39 +01:00
|
|
|
LINKFLAGS = $(OSFLAGS) -stdlib=libc++
|
|
|
|
LINKFLAGS32 =
|
|
|
|
LINKFLAGS64 =
|
|
|
|
STATICOPT_CC =
|
|
|
|
STATICOPT_CXX =
|
|
|
|
STATICOPT_LINK =
|
2021-08-22 17:07:06 +02:00
|
|
|
SHAREDOPT_CC = -fPIC
|
2021-01-30 07:51:39 +01:00
|
|
|
SHAREDOPT_CXX = -fPIC
|
2021-08-22 17:07:06 +02:00
|
|
|
SHAREDOPT_LINK =
|
2021-01-30 07:51:39 +01:00
|
|
|
DEBUGOPT_CC = -g -D_DEBUG=$(DEBUGLEVEL)
|
2021-08-22 17:07:06 +02:00
|
|
|
DEBUGOPT_CXX = -g -D_DEBUG=$(DEBUGLEVEL)
|
2021-01-30 07:51:39 +01:00
|
|
|
DEBUGOPT_LINK =
|
|
|
|
RELEASEOPT_CC = -DNDEBUG -O2
|
2021-08-22 17:07:06 +02:00
|
|
|
RELEASEOPT_CXX = -DNDEBUG -O
|
2021-01-30 07:51:39 +01:00
|
|
|
RELEASEOPT_LINK =
|
|
|
|
|
|
|
|
#
|
|
|
|
# System Specific Flags
|
|
|
|
#
|
|
|
|
SYSFLAGS = -DPOCO_HAVE_IPv6 -DPOCO_SOCKETADDRESS_DONT_PREFER_IPV4 -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_STAT64 -DPOCO_NO_SHAREDLIBS -DPOCO_NO_NET_IFTYPES
|
|
|
|
|
|
|
|
#
|
|
|
|
# System Specific Libraries
|
|
|
|
#
|
|
|
|
SYSLIBS = -ldl
|