Skip to content

Commit 6913537

Browse files
committed
random stuff ig
1 parent 081f9d8 commit 6913537

File tree

3 files changed

+366
-957
lines changed

3 files changed

+366
-957
lines changed

Makefile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,33 @@ OPENSSL_VERSION=3.0.16-1
3434
XZ_VERSION=5.6.4-1
3535

3636
# Supported OS
37-
OS_LIST=macOS iOS tvOS watchOS xrOS
37+
OS_LIST=macOS iOS tvOS watchOS visionOS
3838

3939
CURL_FLAGS=--disable --fail --location --create-dirs --progress-bar
4040

4141
# macOS targets
4242
TARGETS-macOS=macosx.x86_64 macosx.arm64
43+
TRIPLE_OS-macOS=macos
4344
VERSION_MIN-macOS=11.0
4445

4546
# iOS targets
4647
TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64
48+
TRIPLE_OS-iOS=ios
4749
VERSION_MIN-iOS=13.0
4850

4951
# tvOS targets
5052
TARGETS-tvOS=appletvsimulator.x86_64 appletvsimulator.arm64 appletvos.arm64
53+
TRIPLE_OS-tvOS=tvos
5154
VERSION_MIN-tvOS=12.0
5255

5356
# watchOS targets
5457
TARGETS-watchOS=watchsimulator.x86_64 watchsimulator.arm64 watchos.arm64_32
58+
TRIPLE_OS-watchOS=watchos
5559
VERSION_MIN-watchOS=4.0
5660

57-
TARGETS-xrOS=xrsimulator.arm64 xros.arm64
58-
VERSION_MIN-xrOS=1.0
61+
TARGETS-visionOS=xrsimulator.arm64 xros.arm64
62+
TRIPLE_OS-visionOS=xros
63+
VERSION_MIN-visionOS=2.0
5964

6065
# The architecture of the machine doing the build
6166
HOST_ARCH=$(shell uname -m)
@@ -125,17 +130,18 @@ target=$1
125130
os=$2
126131

127132
OS_LOWER-$(target)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]')
133+
TRIPLE_OS-$(target)=$$(TRIPLE_OS-$(os))
128134

129135
# $(target) can be broken up into is composed of $(SDK).$(ARCH)
130136
SDK-$(target)=$$(basename $(target))
131137
ARCH-$(target)=$$(subst .,,$$(suffix $(target)))
132138

133139
ifneq ($(os),macOS)
134140
ifeq ($$(findstring simulator,$$(SDK-$(target))),)
135-
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))
141+
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(target))$$(VERSION_MIN-$(os))
136142
IS_SIMULATOR-$(target)=False
137143
else
138-
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator
144+
TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(TRIPLE_OS-$(target))$$(VERSION_MIN-$(os))-simulator
139145
IS_SIMULATOR-$(target)=True
140146
endif
141147
endif
@@ -403,14 +409,15 @@ sdk=$1
403409
os=$2
404410

405411
OS_LOWER-$(sdk)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]')
412+
TRIPLE_OS-$(sdk)=$$(TRIPLE_OS-$(os))
406413

407414
SDK_TARGETS-$(sdk)=$$(filter $(sdk).%,$$(TARGETS-$(os)))
408415
SDK_ARCHES-$(sdk)=$$(sort $$(subst .,,$$(suffix $$(SDK_TARGETS-$(sdk)))))
409416

410417
ifeq ($$(findstring simulator,$(sdk)),)
411-
SDK_SLICE-$(sdk)=$$(OS_LOWER-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g")
418+
SDK_SLICE-$(sdk)=$$(TRIPLE_OS-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g")
412419
else
413-
SDK_SLICE-$(sdk)=$$(OS_LOWER-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g")-simulator
420+
SDK_SLICE-$(sdk)=$$(TRIPLE_OS-$(sdk))-$$(shell echo $$(SDK_ARCHES-$(sdk)) | sed "s/ /_/g")-simulator
414421
endif
415422

416423
# Expand the build-target macro for target on this OS

0 commit comments

Comments
 (0)