5
5
# - iOS - build everything for iOS
6
6
# - tvOS - build everything for tvOS
7
7
# - watchOS - build everything for watchOS
8
- # - BZip2 - build Bzip2 for all platforms
8
+ # - BZip2 - build BZip2 for all platforms
9
9
# - BZip2-macOS - build BZip2 for macOS
10
10
# - BZip2-iOS - build BZip2 for iOS
11
11
# - BZip2-tvOS - build BZip2 for tvOS
@@ -35,9 +35,6 @@ PROJECT_DIR=$(shell pwd)
35
35
36
36
BUILD_NUMBER =custom
37
37
38
- # This version limit will only be honored on x86_64 builds.
39
- MACOSX_DEPLOYMENT_TARGET =10.15
40
-
41
38
# Version of packages that will be compiled by this meta-package
42
39
# PYTHON_VERSION is the full version number (e.g., 3.10.0b3)
43
40
# PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0)
@@ -46,23 +43,23 @@ PYTHON_VERSION=3.10.4
46
43
PYTHON_MICRO_VERSION =$(shell echo $(PYTHON_VERSION ) | grep -Eo "\d+\.\d+\.\d+")
47
44
PYTHON_VER =$(basename $(PYTHON_VERSION ) )
48
45
49
- OPENSSL_VERSION_NUMBER =1.1.1
50
- OPENSSL_REVISION =o
51
- OPENSSL_VERSION =$(OPENSSL_VERSION_NUMBER )$(OPENSSL_REVISION )
52
-
53
46
BZIP2_VERSION =1.0.8
54
47
55
48
XZ_VERSION =5.2.5
56
49
50
+ OPENSSL_VERSION_NUMBER =1.1.1
51
+ OPENSSL_REVISION =o
52
+ OPENSSL_VERSION =$(OPENSSL_VERSION_NUMBER )$(OPENSSL_REVISION )
53
+
57
54
LIBFFI_VERSION =3.4.2
58
55
59
- # Supported OS
56
+ # Supported OS and products
60
57
PRODUCTS =BZip2 XZ OpenSSL libFFI Python
61
58
OS_LIST =macOS iOS tvOS watchOS
62
59
63
60
# macOS targets
64
61
TARGETS-macOS =macosx.x86_64 macosx.arm64
65
- CFLAGS-macOS=-mmacosx-version-min =$( MACOSX_DEPLOYMENT_TARGET )
62
+ CFLAGS-macOS=-mmacosx-version-min =10.15
66
63
CFLAGS-macosx.x86_64 =
67
64
CFLAGS-macosx.arm64 =
68
65
SLICE-macosx =macos-arm64_x86_64
@@ -106,8 +103,6 @@ MACHINE_SIMPLE-arm64=arm
106
103
MACHINE_DETAILED-arm64_32 =aarch64
107
104
MACHINE_SIMPLE-arm64_32 =arm
108
105
109
-
110
-
111
106
# The architecture of the machine doing the build
112
107
HOST_ARCH =$(shell uname -m)
113
108
@@ -117,7 +112,7 @@ all: $(OS_LIST)
117
112
.PHONY : \
118
113
all clean distclean update-patch vars \
119
114
$(foreach product,$(PRODUCTS ) ,$(foreach os,$(OS_LIST ) ,$(product ) $(product ) -$(os ) clean-$(product ) ) ) \
120
- $(foreach os,$(OS_LIST ) ,$(os ) vars-$(os ) )
115
+ $(foreach os,$(OS_LIST ) ,$(os ) clean- $( os ) vars-$(os ) )
121
116
122
117
# Clean all builds
123
118
clean :
@@ -328,7 +323,6 @@ $$(XZ_DIR-$(target))/Makefile: downloads/xz-$(XZ_VERSION).tgz
328
323
tar zxf downloads/xz-$(XZ_VERSION ) .tgz --strip-components 1 -C $$(XZ_DIR-$(target ) )
329
324
# Configure the build
330
325
cd $$(XZ_DIR-$(target ) ) && \
331
- MACOSX_DEPLOYMENT_TARGET=$$(MACOSX_DEPLOYMENT_TARGET-$$(ARCH-$(target ) ) ) \
332
326
./configure \
333
327
CC="$$(CC-$(target ) ) " \
334
328
LDFLAGS="$$(LDFLAGS-$(target ) ) " \
@@ -373,7 +367,6 @@ endif
373
367
ifeq ($(os ) ,macOS)
374
368
cd $$(OPENSSL_DIR-$(target)) && \
375
369
CC="$$(CC-$(target))" \
376
- MACOSX_DEPLOYMENT_TARGET=$$(MACOSX_DEPLOYMENT_TARGET-$$(ARCH-$(target))) \
377
370
./Configure darwin64-$$(ARCH-$(target))-cc no-tests \
378
371
--prefix="$(PROJECT_DIR)/$$(OPENSSL_DIR-$(target))/_install" \
379
372
--openssldir=/etc/ssl \
@@ -391,8 +384,8 @@ endif
391
384
# The OpenSSL Makefile is... interesting. Invoking `make all` or `make
392
385
# install` *modifies the Makefile*. Therefore, we can't use the Makefile as
393
386
# a build dependency, because building/installing dirties the target that
394
- # was a dependency. To compensate, create a dummy file as a marker for
395
- # whether OpenSSL has been configured, and use *that* as a reference.
387
+ # was used as a dependency. To compensate, create a dummy file as a marker
388
+ # for whether OpenSSL has been configured, and use *that* as a reference.
396
389
date > $$(OPENSSL_DIR-$(target ) ) /is_configured
397
390
398
391
$$(OPENSSL_DIR-$(target ) ) /libssl.a: $$(OPENSSL_DIR-$(target ) ) /is_configured
@@ -536,7 +529,6 @@ vars-$(target):
536
529
537
530
endef # build-target
538
531
539
-
540
532
# ##########################################################################
541
533
# Build for specified sdk (extracted from the base names in $(TARGETS-*))
542
534
# ##########################################################################
@@ -801,7 +793,6 @@ $$(PYTHON_DIR-$(os))/Makefile: \
801
793
> $$(PYTHON_DIR-$(os ) ) /Modules/Setup.local
802
794
# Configure target Python
803
795
cd $$(PYTHON_DIR-$(os ) ) && \
804
- MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET ) \
805
796
./configure \
806
797
CC=" $( CC-macosx) " LD=" $( CC-macosx) " \
807
798
--prefix=" $( PROJECT_DIR) /$$ (PYTHON_DIR-$( os) )/_install" \
@@ -879,7 +870,10 @@ $(os): dist/Python-$(PYTHON_VER)-$(os)-support.$(BUILD_NUMBER).tar.gz
879
870
880
871
clean-$(os ) :
881
872
@echo ">>> Clean $(os ) build products"
882
- rm -rf build/$(os )
873
+ rm -rf \
874
+ build/$(os ) \
875
+ dist/Python-$(PYTHON_VER ) -$(os ) -support.$(BUILD_NUMBER ) .tar.gz \
876
+ dist/Python-$(PYTHON_VER ) -$(os ) -support.test-$(BUILD_NUMBER ) .tar.gz \
883
877
884
878
# ##########################################################################
885
879
# Build: Debug
0 commit comments