aboutsummaryrefslogtreecommitdiffstats
path: root/wireguard-go-bridge/xcode-build-helper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'wireguard-go-bridge/xcode-build-helper.sh')
-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 0000000..b5b467d
--- /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