|
1 | 1 | #
|
2 | 2 | # Useful targets:
|
3 |
| -# - all-iOS - build everything for iOS |
4 |
| -# - all-tvOS - build everything for tvOS |
5 |
| -# - all-watchOS - build everything for watchOS |
6 |
| -# - OpenSSL.framework-iOS - build OpenSSL.framework for iOS |
7 |
| -# - OpenSSL.framework-tvOS - build OpenSSL.framework for tvOS |
8 |
| -# - OpenSSL.framework-watchOS - build OpenSSL.framework for watchOS |
9 |
| -# - Python.framework-iOS - build Python.framework for iOS |
10 |
| -# - Python.framework-tvOS - build Python.framework for tvOS |
11 |
| -# - Python.framework-watchOS - build Python.framework for watchOS |
12 |
| -# - Python-host - build host python |
| 3 | +# - all - build everything |
| 4 | +# - iOS - build everything for iOS |
| 5 | +# - tvOS - build everything for tvOS |
| 6 | +# - watchOS - build everything for watchOS |
| 7 | +# - OpenSSL.framework-iOS - build OpenSSL.framework for iOS |
| 8 | +# - OpenSSL.framework-tvOS - build OpenSSL.framework for tvOS |
| 9 | +# - OpenSSL.framework-watchOS - build OpenSSL.framework for watchOS |
| 10 | +# - Python.framework-iOS - build Python.framework for iOS |
| 11 | +# - Python.framework-tvOS - build Python.framework for tvOS |
| 12 | +# - Python.framework-watchOS - build Python.framework for watchOS |
| 13 | +# - Python-host - build host python |
13 | 14 |
|
14 | 15 | # Current director
|
15 | 16 | PROJECT_DIR=$(shell pwd)
|
16 | 17 |
|
17 |
| -BUILD_NUMBER=3 |
| 18 | +BUILD_NUMBER=4 |
18 | 19 |
|
19 | 20 | # Version of packages that will be compiled by this meta-package
|
20 |
| -PYTHON_VERSION= 3.4.2 |
| 21 | +PYTHON_VERSION=3.4.2 |
21 | 22 | PYTHON_VER= $(basename $(PYTHON_VERSION))
|
22 | 23 |
|
23 | 24 | OPENSSL_VERSION_NUMBER=1.0.2
|
24 |
| -OPENSSL_REVISION=d |
| 25 | +OPENSSL_REVISION=e |
25 | 26 | OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
|
26 | 27 |
|
27 | 28 | # Supported OS
|
28 | 29 | OS= iOS tvOS watchOS
|
29 | 30 |
|
30 | 31 | # iOS targets
|
31 |
| -TARGETS-iOS= iphonesimulator.x86_64 iphonesimulator.i386\ |
32 |
| - iphoneos.armv7 iphoneos.armv7s iphoneos.arm64 |
33 |
| -CFLAGS-iOS= -miphoneos-version-min=7.0 |
| 32 | +TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.i386 iphoneos.armv7 iphoneos.armv7s iphoneos.arm64 |
| 33 | +CFLAGS-iOS=-miphoneos-version-min=7.0 |
34 | 34 | CFLAGS-iphoneos.armv7= -fembed-bitcode
|
35 | 35 | CFLAGS-iphoneos.armv7s= -fembed-bitcode
|
36 | 36 | CFLAGS-iphoneos.arm64= -fembed-bitcode
|
37 | 37 |
|
38 | 38 | # tvOS targets
|
39 |
| -TARGETS-tvOS= appletvsimulator.x86_64 appletvos.arm64 |
40 |
| -CFLAGS-tvOS= -mtvos-version-min=9.0 |
| 39 | +TARGETS-tvOS=appletvsimulator.x86_64 appletvos.arm64 |
| 40 | +CFLAGS-tvOS=-mtvos-version-min=9.0 |
41 | 41 | CFLAGS-appletvos.arm64= -fembed-bitcode
|
42 | 42 | PYTHON_CONFIGURE-tvOS= ac_cv_func_sigaltstack=no
|
43 | 43 |
|
44 | 44 | # watchOS targets
|
45 |
| -TARGETS-watchOS= watchsimulator.i386 watchos.armv7k |
46 |
| -CFLAGS-watchOS= -mwatchos-version-min=2.0 |
| 45 | +TARGETS-watchOS=watchsimulator.i386 watchos.armv7k |
| 46 | +CFLAGS-watchOS=-mwatchos-version-min=2.0 |
47 | 47 | CFLAGS-watchos.armv7k= -fembed-bitcode
|
48 | 48 | PYTHON_CONFIGURE-watchOS=ac_cv_func_sigaltstack=no
|
49 | 49 |
|
50 | 50 | # override machine for arm64
|
51 |
| -MACHINE-arm64= aarch64 |
| 51 | +MACHINE-arm64=aarch64 |
52 | 52 |
|
53 |
| -all: $(foreach os,$(OS),all-$(os)) |
| 53 | +all: $(foreach os,$(OS),$(os)) |
54 | 54 |
|
55 | 55 | # Clean all builds
|
56 | 56 | clean:
|
@@ -95,8 +95,8 @@ downloads/Python-$(PYTHON_VERSION).tgz:
|
95 | 95 | mkdir -p downloads
|
96 | 96 | if [ ! -e downloads/Python-$(PYTHON_VERSION).tgz ]; then curl -L https://www.python.org/ftp/python/$(PYTHON_VERSION)/Python-$(PYTHON_VERSION).tgz > downloads/Python-$(PYTHON_VERSION).tgz; fi
|
97 | 97 |
|
98 |
| -PYTHON_DIR-host= build/Python-$(PYTHON_VERSION)-host |
99 |
| -PYTHON_HOST= $(PYTHON_DIR-host)/dist/bin/python$(PYTHON_VER) |
| 98 | +PYTHON_DIR-host=build/Python-$(PYTHON_VERSION)-host |
| 99 | +PYTHON_HOST=$(PYTHON_DIR-host)/dist/bin/python$(PYTHON_VER) |
100 | 100 |
|
101 | 101 | Python-host: $(PYTHON_HOST)
|
102 | 102 |
|
@@ -174,9 +174,6 @@ $$(PYTHON_DIR-$1)/Makefile: downloads/Python-$(PYTHON_VERSION).tgz $(PYTHON_HOST
|
174 | 174 | tar zxf downloads/Python-$(PYTHON_VERSION).tgz --strip-components 1 -C $$(PYTHON_DIR-$1)
|
175 | 175 | # Apply target Python patches
|
176 | 176 | cd $$(PYTHON_DIR-$1) && patch -p1 <$(PROJECT_DIR)/patch/Python/Python.patch
|
177 |
| -ifeq ($$(findstring iphone,$$(SDK-$1)),) |
178 |
| - cd $$(PYTHON_DIR-$1) && patch -p1 <$(PROJECT_DIR)/patch/Python/Python-tvos.patch |
179 |
| -endif |
180 | 177 | cp -f $(PROJECT_DIR)/patch/Python/Setup.embedded $$(PYTHON_DIR-$1)/Modules/Setup.embedded
|
181 | 178 | # Configure target Python
|
182 | 179 | cd $$(PYTHON_DIR-$1) && PATH=$(PROJECT_DIR)/$(PYTHON_DIR-host)/dist/bin:$(PATH) ./configure \
|
@@ -223,7 +220,7 @@ OPENSSL_FRAMEWORK-$1= build/$1/OpenSSL.framework
|
223 | 220 | PYTHON_FRAMEWORK-$1= build/$1/Python.framework
|
224 | 221 | PYTHON_RESOURCES-$1= $$(PYTHON_FRAMEWORK-$1)/Versions/$(PYTHON_VER)/Resources
|
225 | 222 |
|
226 |
| -all-$1: dist/Python-$(PYTHON_VERSION)-$1-support.b$(BUILD_NUMBER).tar.gz |
| 223 | +$1: dist/Python-$(PYTHON_VERSION)-$1-support.b$(BUILD_NUMBER).tar.gz |
227 | 224 |
|
228 | 225 | clean-$1:
|
229 | 226 | rm -rf build/$1
|
@@ -283,7 +280,7 @@ ifneq ($(TEST),)
|
283 | 280 | else
|
284 | 281 | mkdir -p $$(PYTHON_RESOURCES-$1)/lib
|
285 | 282 | cd $$(PYTHON_DIR-$$(firstword $$(TARGETS-$1)))/dist/lib/python$(PYTHON_VER) && \
|
286 |
| - zip -x@$(PROJECT_DIR)/python-lib-exclude.lst -r $(PROJECT_DIR)/$$(PYTHON_RESOURCES-$1)/lib/python$(subst .,,$(PYTHON_VER)) * |
| 283 | + zip -x@$(PROJECT_DIR)/patch/Python/lib-exclude.lst -r $(PROJECT_DIR)/$$(PYTHON_RESOURCES-$1)/lib/python$(subst .,,$(PYTHON_VER)) * |
287 | 284 | endif
|
288 | 285 |
|
289 | 286 | # Copy fat library
|
|
0 commit comments