aboutsummaryrefslogtreecommitdiffstats
path: root/wireguard-go-bridge
diff options
context:
space:
mode:
authorJeroen Leenarts <jeroen.leenarts@gmail.com>2018-09-27 07:57:42 +0200
committerJeroen Leenarts <jeroen.leenarts@gmail.com>2018-09-27 07:57:42 +0200
commitf118f9ef4b9bc32db9bf34c90ee2fd9e94e167c6 (patch)
treea3a95159d6faf8d748a6f5009dd9f3dd8b0b5777 /wireguard-go-bridge
parentXcode build wireguard go bridge. (diff)
downloadwireguard-apple-f118f9ef4b9bc32db9bf34c90ee2fd9e94e167c6.tar.xz
wireguard-apple-f118f9ef4b9bc32db9bf34c90ee2fd9e94e167c6.zip
Add missing file and fix hard path.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'wireguard-go-bridge')
-rwxr-xr-xwireguard-go-bridge/xcode-build-helper.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/wireguard-go-bridge/xcode-build-helper.sh b/wireguard-go-bridge/xcode-build-helper.sh
new file mode 100755
index 00000000..b5b467dd
--- /dev/null
+++ b/wireguard-go-bridge/xcode-build-helper.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+cd "$PROJECT_DIR"/wireguard-go-bridge
+case $1 in
+ clean)
+ make clean
+ ;;
+ *)
+ if [ -e "$DERIVED_FILE_DIR/libwg-go.a" ]
+ then
+ echo "Clean before building"
+ else
+ make
+ fi
+
+ ;;
+esac
+
+if [ -f "libwg-go.a" ]
+then
+ mkdir -p "$DERIVED_FILE_DIR"
+ mv *.a "$DERIVED_FILE_DIR"
+ ln -sf "$DERIVED_FILE_DIR/libwg-go.a" libwg-go.a
+fi