aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-17 00:23:11 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-17 00:23:11 +0100
commitd775682ef42c0e096bf75d5a82a01f0d50fc63c0 (patch)
treecb041bca05d2d1ccfe9238b0cb90d12a6cec1dd4
parentFurther generalize makefile (diff)
downloadwireguard-apple-d775682ef42c0e096bf75d5a82a01f0d50fc63c0.tar.xz
wireguard-apple-d775682ef42c0e096bf75d5a82a01f0d50fc63c0.zip
More proper way to get sdk root directory
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--wireguard-go-bridge/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/wireguard-go-bridge/Makefile b/wireguard-go-bridge/Makefile
index 6c281536..3cba7dcb 100644
--- a/wireguard-go-bridge/Makefile
+++ b/wireguard-go-bridge/Makefile
@@ -5,7 +5,7 @@
# These are generally passed to us by xcode, but we set working defaults for standalone compilation too.
ARCHS ?= arm64 armv7
SDK_NAME ?= iphoneos
-SDKROOT ?= $(shell xcrun --sdk $(SDK_NAME) --show-sdk-path)
+SDK_DIR ?= $(shell xcrun --sdk $(SDK_NAME) --show-sdk-path)
CONFIGURATION_BUILD_DIR ?= $(CURDIR)/out
CONFIGURATION_TEMP_DIR ?= $(CURDIR)/.tmp
@@ -16,7 +16,7 @@ BUILDDIR ?= $(CONFIGURATION_TEMP_DIR)/wireguard-go-bridge
UPSTREAM_FILES := $(filter-out %/main.go %/queueconstants.go,$(wildcard ../wireguard-go/*/*.go) $(wildcard ../wireguard-go/*.go)) ../wireguard-go/go.mod ../wireguard-go/go.sum
DOWNSTREAM_FILES := $(wildcard src/*.go) $(wildcard src/*/*.go)
-CFLAGS_PREFIX := $(DEPLOYMENT_TARGET_CLANG_FLAG_PREFIX)$($(DEPLOYMENT_TARGET_CLANG_ENV_NAME)) -isysroot $(SDKROOT) -arch
+CFLAGS_PREFIX := $(DEPLOYMENT_TARGET_CLANG_FLAG_PREFIX)$($(DEPLOYMENT_TARGET_CLANG_ENV_NAME)) -isysroot $(SDK_DIR) -arch
GOARCH_arm64 := arm64
GOARCH_armv7 := arm
GOARCH_x86_64 := amd64