Last active
December 25, 2015 12:19
-
-
Save arielm/6976066 to your computer and use it in GitHub Desktop.
Patching Poco 1.4.6p1 "basic edition" to support OpenSSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# $Id: //poco/1.4/build/config/Android#3 $ | |
# | |
# Android | |
# | |
# Make settings for Android NDK | |
# | |
# | |
# General Settings | |
# | |
LINKMODE ?= STATIC | |
ANDROID_ABI ?= armeabi | |
POCO_TARGET_OSNAME = Android | |
POCO_TARGET_OSARCH = $(ANDROID_ABI) | |
OPENSSL_INCLUDE = /Users/arielm/Downloads/openFrameworks-master/libs/openssl/include | |
ifeq ($(ANDROID_ABI),armeabi) | |
TOOL = arm-linux-androideabi | |
ARCHFLAGS = -mthumb | |
else | |
ifeq ($(ANDROID_ABI),armeabi-v7a) | |
TOOL = arm-linux-androideabi | |
ARCHFLAGS = -march=armv7-a -mfloat-abi=softfp | |
LINKFLAGS = -Wl,--fix-cortex-a8 | |
else | |
ifeq ($(ANDROID_ABI),x86) | |
TOOL = i686-android-linux | |
ARCHFLAGS = -march=i686 -msse3 -mstackrealign -mfpmath=sse | |
else | |
$(error Invalid ABI specified in ANDROID_ABI) | |
endif | |
endif | |
endif | |
# | |
# Define Tools | |
# | |
CC = $(TOOL)-gcc | |
CXX = $(TOOL)-g++ | |
LINK = $(CXX) | |
STRIP = $(TOOL)-strip | |
LIB = $(TOOL)-ar -cr | |
RANLIB = $(TOOL)-ranlib | |
SHLIB = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@ | |
SHLIBLN = $(POCO_BASE)/build/script/shlibln | |
DEP = $(POCO_BASE)/build/script/makedepend.gcc | |
SHELL = sh | |
RM = rm -rf | |
CP = cp | |
MKDIR = mkdir -p | |
# | |
# Extension for Shared Libraries | |
# | |
SHAREDLIBEXT = .so.$(target_version) | |
SHAREDLIBLINKEXT = .so | |
# | |
# Compiler and Linker Flags | |
# | |
CFLAGS = $(ARCHFLAGS) -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 | |
CFLAGS32 = | |
CFLAGS64 = | |
CXXFLAGS = $(ARCHFLAGS) -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions | |
CXXFLAGS32 = | |
CXXFLAGS64 = | |
LINKFLAGS += | |
LINKFLAGS32 = | |
LINKFLAGS64 = | |
STATICOPT_CC = | |
STATICOPT_CXX = | |
STATICOPT_LINK = -static | |
SHAREDOPT_CC = | |
SHAREDOPT_CXX = | |
SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH) | |
DEBUGOPT_CC = -g -D_DEBUG | |
DEBUGOPT_CXX = -g -D_DEBUG | |
DEBUGOPT_LINK = -g | |
RELEASEOPT_CC = -O3 -DNDEBUG -fomit-frame-pointer | |
RELEASEOPT_CXX = -O2 -DNDEBUG -fomit-frame-pointer | |
RELEASEOPT_LINK = -O2 | |
# | |
# System Specific Flags | |
# | |
SYSFLAGS = -DPOCO_ANDROID -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY -I$(OPENSSL_INCLUDE) | |
# | |
# System Specific Libraries | |
# | |
SYSLIBS = -lstdc++ -lsupc++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# $Id: //poco/1.4/build/config/iPhone-clang-libc++#1 $ | |
# | |
# iPhone-clang-libc++ | |
# | |
# Build settings for iPhone OS, using Apple's iPhone SDK | |
# | |
# | |
# General Settings | |
# | |
# iPhone OS does not allow dynamic linking to user libraries | |
# | |
LINKMODE ?= STATIC | |
OPENSSL_INCLUDE = /Users/arielm/Downloads/openFrameworks-master/libs/openssl/include | |
# | |
# 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 | |
# Otherwise use the version found. | |
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 ?= armv7 | |
TOOL_PREFIX ?= $(shell xcode-select -print-path)/Platforms/$(IPHONE_SDK).platform/Developer/usr/bin | |
OSFLAGS ?= -arch $(POCO_TARGET_OSARCH) -isysroot $(IPHONE_SDK_BASE) -mthumb -miphoneos-version-min=$(IPHONE_SDK_VERSION_MIN) | |
# | |
# Tools | |
# | |
# If GCC_VER is defined then use it. | |
# Otherwise select the latest version | |
# | |
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 $@ | |
DYLIB = $(CXX) $(OSFLAGS) -dynamic -bundle -read_only_relocs suppress -Wl,-bind_at_load -o $@ | |
SHLIBLN = $(POCO_BASE)/build/script/shlibln | |
STRIP = | |
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) | |
CFLAGS32 = | |
CFLAGS64 = | |
CXXFLAGS = $(OSFLAGS) -stdlib=libc++ -Wall -Wno-sign-compare | |
CXXFLAGS32 = | |
CXXFLAGS64 = | |
LINKFLAGS = $(OSFLAGS) -stdlib=libc++ | |
LINKFLAGS32 = | |
LINKFLAGS64 = | |
STATICOPT_CC = | |
STATICOPT_CXX = | |
STATICOPT_LINK = | |
SHAREDOPT_CC = -fPIC | |
SHAREDOPT_CXX = -fPIC | |
SHAREDOPT_LINK = | |
DEBUGOPT_CC = -g -D_DEBUG=$(DEBUGLEVEL) | |
DEBUGOPT_CXX = -g -D_DEBUG=$(DEBUGLEVEL) | |
DEBUGOPT_LINK = | |
RELEASEOPT_CC = -DNDEBUG -O2 | |
RELEASEOPT_CXX = -DNDEBUG -O | |
RELEASEOPT_LINK = | |
# | |
# System Specific Flags | |
# | |
SYSFLAGS = -DPOCO_HAVE_IPv6 -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_STAT64 -DPOCO_NO_SHAREDLIBS -DPOCO_NO_NET_IFTYPES -I$(OPENSSL_INCLUDE) | |
# | |
# System Specific Libraries | |
# | |
SYSLIBS = -ldl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment