2021-03-26 14:56:30 +01:00
|
|
|
diff --git a/Makefile b/Makefile
|
2022-10-05 13:31:02 +02:00
|
|
|
index 695be54..9d4f4a4 100644
|
2021-03-26 14:56:30 +01:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
2022-10-05 13:31:02 +02:00
|
|
|
@@ -7,8 +7,11 @@
|
2021-09-03 08:25:14 +02:00
|
|
|
# - watchOS - build everything for watchOS
|
2021-09-06 09:37:58 +02:00
|
|
|
# - OpenSSL-macOS - build OpenSSL for macOS
|
|
|
|
# - OpenSSL-iOS - build OpenSSL for iOS
|
2021-09-03 08:25:14 +02:00
|
|
|
+# - OpenSSL-iOS-simulator - build OpenSSL for iOS-simulator
|
2021-09-06 09:37:58 +02:00
|
|
|
# - OpenSSL-tvOS - build OpenSSL for tvOS
|
2021-09-03 08:25:14 +02:00
|
|
|
+# - OpenSSL-tvOS-simulator - build OpenSSL for tvOS-simulator
|
2021-09-06 09:37:58 +02:00
|
|
|
# - OpenSSL-watchOS - build OpenSSL for watchOS
|
2021-09-03 08:25:14 +02:00
|
|
|
+# - OpenSSL-watchOS-simulator - build OpenSSL for watchOS-simulator
|
|
|
|
# - BZip2-macOS - build BZip2 for macOS
|
|
|
|
# - BZip2-iOS - build BZip2 for iOS
|
|
|
|
# - BZip2-tvOS - build BZip2 for tvOS
|
2022-10-05 13:31:02 +02:00
|
|
|
@@ -30,37 +33,51 @@ PYTHON_VERSION=2.7.14
|
|
|
|
PYTHON_VER=$(basename $(PYTHON_VERSION))
|
|
|
|
|
|
|
|
OPENSSL_VERSION_NUMBER=1.0.2
|
|
|
|
-OPENSSL_REVISION=n
|
|
|
|
+OPENSSL_REVISION=u
|
|
|
|
OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
|
|
|
|
|
2021-09-03 08:25:14 +02:00
|
|
|
BZIP2_VERSION=1.0.6
|
|
|
|
|
|
|
|
# Supported OS
|
|
|
|
-OS=macOS iOS tvOS watchOS
|
|
|
|
+OS=macOS iOS iOS-simulator tvOS tvOS-simulator watchOS watchOS-simulator
|
|
|
|
|
|
|
|
# macOS targets
|
|
|
|
-TARGETS-macOS=macosx.x86_64
|
|
|
|
+TARGETS-macOS=macosx.arm64 macosx.x86_64
|
|
|
|
+PYTHON_TARGETS-macOS=macOS
|
|
|
|
CFLAGS-macOS=-mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
|
|
|
|
|
|
|
|
# iOS targets
|
|
|
|
-TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.i386 iphoneos.armv7 iphoneos.armv7s iphoneos.arm64
|
|
|
|
+TARGETS-iOS=iphoneos.armv7 iphoneos.armv7s iphoneos.arm64
|
|
|
|
CFLAGS-iOS=-mios-version-min=7.0
|
2022-09-30 13:57:03 +02:00
|
|
|
-CFLAGS-iphoneos.armv7=-fembed-bitcode
|
|
|
|
-CFLAGS-iphoneos.armv7s=-fembed-bitcode
|
|
|
|
-CFLAGS-iphoneos.arm64=-fembed-bitcode
|
|
|
|
+CFLAGS-iphoneos.armv7=
|
|
|
|
+CFLAGS-iphoneos.armv7s=
|
|
|
|
+CFLAGS-iphoneos.arm64=
|
2022-10-05 13:31:02 +02:00
|
|
|
+
|
2021-09-03 08:25:14 +02:00
|
|
|
+# iOS-simulator targets
|
|
|
|
+TARGETS-iOS-simulator=iphonesimulator.x86_64 iphonesimulator.i386 iphonesimulator.arm64
|
|
|
|
+CFLAGS-iOS-simulator=-mios-simulator-version-min=7.0
|
2022-10-05 13:31:02 +02:00
|
|
|
|
2021-09-03 08:25:14 +02:00
|
|
|
# tvOS targets
|
|
|
|
-TARGETS-tvOS=appletvsimulator.x86_64 appletvos.arm64
|
|
|
|
+TARGETS-tvOS=appletvos.arm64
|
|
|
|
CFLAGS-tvOS=-mtvos-version-min=9.0
|
2022-09-30 13:57:03 +02:00
|
|
|
-CFLAGS-appletvos.arm64=-fembed-bitcode
|
|
|
|
+CFLAGS-appletvos.arm64=
|
2021-03-26 14:56:30 +01:00
|
|
|
PYTHON_CONFIGURE-tvOS=ac_cv_func_sigaltstack=no
|
|
|
|
|
2021-09-03 08:25:14 +02:00
|
|
|
+# tvOS-simulator targets
|
|
|
|
+TARGETS-tvOS-simulator=appletvsimulator.x86_64 appletvsimulator.arm64
|
|
|
|
+CFLAGS-tvOS-simulator=-mtvos-simulator-version-min=9.0
|
|
|
|
+
|
2021-03-26 14:56:30 +01:00
|
|
|
# watchOS targets
|
|
|
|
-TARGETS-watchOS=watchsimulator.i386 watchos.armv7k
|
2021-09-03 08:25:14 +02:00
|
|
|
+TARGETS-watchOS=watchos.armv7k watchos.arm64_32
|
2021-03-26 14:56:30 +01:00
|
|
|
CFLAGS-watchOS=-mwatchos-version-min=4.0
|
2022-09-30 13:57:03 +02:00
|
|
|
-CFLAGS-watchos.armv7k=-fembed-bitcode
|
|
|
|
+CFLAGS-watchos.armv7k=
|
|
|
|
+CFLAGS-watchos.arm64_32=
|
2021-03-26 14:56:30 +01:00
|
|
|
PYTHON_CONFIGURE-watchOS=ac_cv_func_sigaltstack=no
|
|
|
|
|
2021-09-03 08:25:14 +02:00
|
|
|
+# watchOS-simulator targets
|
|
|
|
+TARGETS-watchOS-simulator=watchsimulator.i386 watchsimulator.x86_64 watchsimulator.arm64
|
|
|
|
+CFLAGS-watchOS-simulator=-mwatchos-simulator-version-min=4.0
|
|
|
|
+
|
2021-03-26 14:56:30 +01:00
|
|
|
# override machine types for arm64
|
2021-09-03 08:25:14 +02:00
|
|
|
MACHINE_DETAILED-arm64=aarch64
|
|
|
|
MACHINE_SIMPLE-arm64=arm
|
|
|
|
@@ -194,9 +211,11 @@ endif
|
|
|
|
|
|
|
|
# Configure the build
|
|
|
|
ifeq ($2,macOS)
|
|
|
|
+ # Patch openssl-darwin-arm64
|
|
|
|
+ cd $$(OPENSSL_DIR-$1) && git apply ../../../../openssl-1.0.2n-darwin-arm64.patch
|
|
|
|
cd $$(OPENSSL_DIR-$1) && \
|
|
|
|
CC="$$(CC-$1)" MACOSX_DEPLOYMENT_TARGET=$$(MACOSX_DEPLOYMENT_TARGET) \
|
|
|
|
- ./Configure darwin64-x86_64-cc --openssldir=$(PROJECT_DIR)/build/$2/openssl
|
|
|
|
+ ./Configure darwin64-$$(ARCH-$1)-cc --openssldir=$(PROJECT_DIR)/build/$2/openssl
|
|
|
|
else
|
|
|
|
cd $$(OPENSSL_DIR-$1) && \
|
|
|
|
CC="$$(CC-$1)" \
|
2022-10-05 13:31:02 +02:00
|
|
|
@@ -216,7 +235,10 @@ $$(OPENSSL_DIR-$1)/libssl.a $$(OPENSSL_DIR-$1)/libcrypto.a: $$(OPENSSL_DIR-$1)/M
|
|
|
|
CC="$$(CC-$1)" \
|
|
|
|
CROSS_TOP="$$(dir $$(SDK_ROOT-$1)).." \
|
|
|
|
CROSS_SDK="$$(notdir $$(SDK_ROOT-$1))" \
|
|
|
|
- make all && make install
|
|
|
|
+ make build_libs && \
|
|
|
|
+ mkdir -p "$(PROJECT_DIR)/build/$2" && \
|
|
|
|
+ cp libcrypto.a libssl.a "$(PROJECT_DIR)/build/$2" && \
|
|
|
|
+ make install_sw
|
|
|
|
|
|
|
|
# Unpack BZip2
|
|
|
|
$$(BZIP2_DIR-$1)/Makefile: downloads/bzip2-$(BZIP2_VERSION).tgz
|