Update build script for Android/iOS

This commit is contained in:
Neil Alexander 2021-06-13 16:52:14 +01:00
parent da82308d7c
commit 1083131533

14
build
View File

@ -32,18 +32,16 @@ fi
if [ $IOS ]; then if [ $IOS ]; then
echo "Building framework for iOS" echo "Building framework for iOS"
gomobile bind -target ios -tags mobile -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \ go get golang.org/x/mobile/bind
github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil \ gomobile bind -target ios -tags mobile -o Yggdrasil.framework -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \
github.com/yggdrasil-network/yggdrasil-go/src/config \
github.com/yggdrasil-network/yggdrasil-extras/src/mobile \ github.com/yggdrasil-network/yggdrasil-extras/src/mobile \
github.com/yggdrasil-network/yggdrasil-extras/src/dummy github.com/yggdrasil-network/yggdrasil-go/src/config
elif [ $ANDROID ]; then elif [ $ANDROID ]; then
echo "Building aar for Android" echo "Building aar for Android"
gomobile bind -target android -tags mobile -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \ go get golang.org/x/mobile/bind
github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil \ gomobile bind -target android -tags mobile -o yggdrasil.aar -ldflags="$LDFLAGS $STRIP" -gcflags="$GCFLAGS" \
github.com/yggdrasil-network/yggdrasil-go/src/config \
github.com/yggdrasil-network/yggdrasil-extras/src/mobile \ github.com/yggdrasil-network/yggdrasil-extras/src/mobile \
github.com/yggdrasil-network/yggdrasil-extras/src/dummy github.com/yggdrasil-network/yggdrasil-go/src/config
else else
for CMD in yggdrasil yggdrasilctl ; do for CMD in yggdrasil yggdrasilctl ; do
echo "Building: $CMD" echo "Building: $CMD"