|
1 | 1 | # |
2 | 2 | # Useful targets: |
3 | | -# - all - build everything |
4 | | -# - iOS - build everything for iOS |
5 | | -# - tvOS - build everything for tvOS |
6 | | -# - watchOS - build everything for watchOS |
7 | | -# - visionOS - build everything for visionOS |
8 | | -# - BZip2 - build BZip2 for all platforms |
9 | | -# - BZip2-iOS - build BZip2 for iOS |
10 | | -# - BZip2-tvOS - build BZip2 for tvOS |
11 | | -# - BZip2-watchOS - build BZip2 for watchOS |
12 | | -# - BZip2-visionOS - build BZip2 for visionOS |
13 | | -# - XZ - build XZ for all platforms |
14 | | -# - XZ-iOS - build XZ for iOS |
15 | | -# - XZ-tvOS - build XZ for tvOS |
16 | | -# - XZ-watchOS - build XZ for watchOS |
17 | | -# - XZ-xrOS - build XZ for xrOS |
18 | | -# - OpenSSL - build OpenSSL for all platforms |
19 | | -# - OpenSSL-iOS - build OpenSSL for iOS |
20 | | -# - OpenSSL-tvOS - build OpenSSL for tvOS |
21 | | -# - OpenSSL-watchOS - build OpenSSL for watchOS |
22 | | -# - OpenSSL-visionOS- build OpenSSL for visionOS |
23 | | -# - mpdecimal - build mpdecimal for all platforms |
24 | | -# - mpdecimal-iOS - build mpdecimal for iOS |
25 | | -# - mpdecimal-tvOS - build mpdecimal for tvOS |
26 | | -# - mpdecimal-watchOS - build mpdecimal for watchOS |
27 | | -# - mpdecimal-visionOS- build mpdecimal for visionOS |
28 | | -# - libFFI-iOS - build libFFI for iOS |
29 | | -# - libFFI-tvOS - build libFFI for tvOS |
30 | | -# - libFFI-watchOS - build libFFI for watchOS |
31 | | -# - libFFI-visionOS - build libFFI for visionOS |
| 3 | +# - all - build everything |
| 4 | +# - iOS - build everything for iOS |
| 5 | +# - tvOS - build everything for tvOS |
| 6 | +# - watchOS - build everything for watchOS |
| 7 | +# - visionOS - build everything for visionOS |
| 8 | +# - BZip2 - build BZip2 for all platforms |
| 9 | +# - BZip2-iOS - build BZip2 for iOS |
| 10 | +# - BZip2-tvOS - build BZip2 for tvOS |
| 11 | +# - BZip2-watchOS - build BZip2 for watchOS |
| 12 | +# - BZip2-visionOS - build BZip2 for visionOS |
| 13 | +# - XZ - build XZ for all platforms |
| 14 | +# - XZ-iOS - build XZ for iOS |
| 15 | +# - XZ-tvOS - build XZ for tvOS |
| 16 | +# - XZ-watchOS - build XZ for watchOS |
| 17 | +# - XZ-visionOS - build XZ for xrOS |
| 18 | +# - OpenSSL - build OpenSSL for all platforms |
| 19 | +# - OpenSSL-iOS - build OpenSSL for iOS |
| 20 | +# - OpenSSL-tvOS - build OpenSSL for tvOS |
| 21 | +# - OpenSSL-watchOS - build OpenSSL for watchOS |
| 22 | +# - OpenSSL-visionOS - build OpenSSL for visionOS |
| 23 | +# - mpdecimal - build mpdecimal for all platforms |
| 24 | +# - mpdecimal-iOS - build mpdecimal for iOS |
| 25 | +# - mpdecimal-tvOS - build mpdecimal for tvOS |
| 26 | +# - mpdecimal-watchOS - build mpdecimal for watchOS |
| 27 | +# - mpdecimal-visionOS - build mpdecimal for visionOS |
| 28 | +# - libFFI-iOS - build libFFI for iOS |
| 29 | +# - libFFI-tvOS - build libFFI for tvOS |
| 30 | +# - libFFI-watchOS - build libFFI for watchOS |
| 31 | +# - libFFI-visionOS - build libFFI for visionOS |
32 | 32 |
|
33 | 33 | # Current directory |
34 | 34 | PROJECT_DIR=$(shell pwd) |
@@ -64,26 +64,33 @@ CURL_FLAGS=--disable --fail --location --create-dirs --progress-bar |
64 | 64 |
|
65 | 65 | # iOS targets |
66 | 66 | TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64 |
| 67 | +TRIPLE_OS-iOS=ios |
67 | 68 | VERSION_MIN-iOS=13.0 |
68 | 69 | CFLAGS-iOS=-mios-version-min=$(VERSION_MIN-iOS) |
69 | 70 |
|
70 | 71 | # tvOS targets |
71 | 72 | TARGETS-tvOS=appletvsimulator.x86_64 appletvsimulator.arm64 appletvos.arm64 |
| 73 | +TRIPLE_OS-tvOS=tvos |
72 | 74 | VERSION_MIN-tvOS=9.0 |
73 | 75 | CFLAGS-tvOS=-mtvos-version-min=$(VERSION_MIN-tvOS) |
74 | 76 | PYTHON_CONFIGURE-tvOS=ac_cv_func_sigaltstack=no |
75 | 77 |
|
76 | 78 | # watchOS targets |
77 | 79 | TARGETS-watchOS=watchsimulator.x86_64 watchsimulator.arm64 watchos.arm64_32 |
| 80 | +TRIPLE_OS-watchOS=watchos |
78 | 81 | VERSION_MIN-watchOS=4.0 |
79 | 82 | CFLAGS-watchOS=-mwatchos-version-min=$(VERSION_MIN-watchOS) |
80 | 83 | PYTHON_CONFIGURE-watchOS=ac_cv_func_sigaltstack=no |
81 | 84 |
|
82 | 85 | # visionOS targets |
83 | 86 | TARGETS-visionOS=xrsimulator.arm64 xros.arm64 |
| 87 | +TRIPLE_OS-visionOS=xros |
84 | 88 | VERSION_MIN-visionOS=2.0 |
85 | | -# Apple made lives harder by NOT having a -version-min flag |
86 | | -PYTHON_CONFIGURE-xrOS=ac_cv_func_sigaltstack=no |
| 89 | +# visionOS doesn't expose -mxros-version-min or similar; it uses the version |
| 90 | +# number in the -target triple, or a definition like: |
| 91 | +# CFLAGS-visionOS=-arch arm64 -mtargetos=xros$(VERSION_MIN-visionOS) |
| 92 | +# For consistency with existing tooling, we use the -target form. |
| 93 | +PYTHON_CONFIGURE-visionOS=ac_cv_func_sigaltstack=no |
87 | 94 |
|
88 | 95 | # The architecture of the machine doing the build |
89 | 96 | HOST_ARCH=$(shell uname -m) |
@@ -177,16 +184,14 @@ define build-target |
177 | 184 | target=$1 |
178 | 185 | os=$2 |
179 | 186 |
|
180 | | -OS_LOWER-$(target)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]') |
181 | | - |
182 | 187 | # $(target) can be broken up into is composed of $(SDK).$(ARCH) |
183 | 188 | SDK-$(target)=$$(basename $(target)) |
184 | 189 | ARCH-$(target)=$$(subst .,,$$(suffix $(target))) |
185 | 190 |
|
186 | 191 | ifeq ($$(findstring simulator,$$(SDK-$(target))),) |
187 | | -TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os)) |
| 192 | +TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(os))$$(VERSION_MIN-$(os)) |
188 | 193 | else |
189 | | -TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator |
| 194 | +TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(os))$$(VERSION_MIN-$(os))-simulator |
190 | 195 | endif |
191 | 196 |
|
192 | 197 | SDK_ROOT-$(target)=$$(shell xcrun --sdk $$(SDK-$(target)) --show-sdk-path) |
@@ -506,8 +511,6 @@ os=$2 |
506 | 511 |
|
507 | 512 | OS_LOWER-$(sdk)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]') |
508 | 513 |
|
509 | | -WHEEL_TAG-$(sdk)=py3-none-$$(shell echo $$(OS_LOWER-$(sdk))_$$(VERSION_MIN-$(os))_$(sdk) | sed "s/\./_/g") |
510 | | - |
511 | 514 | SDK_TARGETS-$(sdk)=$$(filter $(sdk).%,$$(TARGETS-$(os))) |
512 | 515 | SDK_ARCHES-$(sdk)=$$(sort $$(subst .,,$$(suffix $$(SDK_TARGETS-$(sdk))))) |
513 | 516 |
|
|
0 commit comments