Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #104 from Jigsaw-Code/eacrh/catalyst
Browse files Browse the repository at this point in the history
fix(apple, build): add separate Catalyst target
  • Loading branch information
elenadoty authored Jan 19, 2023
2 parents 2767d25 + 4fde1ac commit 50907fd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ GOMOBILE=$(GOBIN)/gomobile
GOBIND=env PATH="$(GOBIN):$(PATH)" "$(GOMOBILE)" bind
IMPORT_PATH=github.com/Jigsaw-Code/outline-go-tun2socks

.PHONY: android apple linux windows intra clean clean-all
.PHONY: android apple apple_future linux windows intra clean clean-all

all: intra android linux apple windows
all: intra android linux apple windows apple_future

# Don't strip Android debug symbols so we can upload them to crash reporting tools.
ANDROID_BUILD_CMD=$(GOBIND) -a -ldflags '-w' -target=android -tags android -work
Expand All @@ -25,13 +25,17 @@ $(BUILDDIR)/android/tun2socks.aar: $(GOMOBILE)
mkdir -p "$(BUILDDIR)/android"
$(ANDROID_BUILD_CMD) -o "$@" $(IMPORT_PATH)/outline/android $(IMPORT_PATH)/outline/shadowsocks


apple: $(BUILDDIR)/apple/Tun2socks.xcframework

$(BUILDDIR)/apple/Tun2socks.xcframework: $(GOMOBILE)
# MACOSX_DEPLOYMENT_TARGET and -iosversion should match what outline-client supports.
# TODO(fortuna): -s strips symbols and is obsolete. Why are we using it?
export MACOSX_DEPLOYMENT_TARGET=10.14; $(GOBIND) -iosversion=9.0 -target=ios,iossimulator,macos -o $@ -ldflags '-s -w' -bundleid org.outline.tun2socks $(IMPORT_PATH)/outline/apple $(IMPORT_PATH)/outline/shadowsocks
export MACOSX_DEPLOYMENT_TARGET=10.14; $(GOBIND) -iosversion=11.0 -target=ios,iossimulator,macos -o $@ -ldflags '-s -w' -bundleid org.outline.tun2socks $(IMPORT_PATH)/outline/apple $(IMPORT_PATH)/outline/shadowsocks

apple_future: $(BUILDDIR)/apple_future/Tun2socks.xcframework

$(BUILDDIR)/apple_future/Tun2socks.xcframework: $(GOMOBILE)
$(GOBIND) -iosversion=13.1 -target=ios,iossimulator,maccatalyst -o $@ -ldflags '-s -w' -bundleid org.outline.tun2socks $(IMPORT_PATH)/outline/apple $(IMPORT_PATH)/outline/shadowsocks


XGO=$(GOBIN)/xgo
Expand Down

0 comments on commit 50907fd

Please sign in to comment.