2014-02-22 17:12:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-05-12 16:54:26 +00:00
|
|
|
echo "Building native syncthing"
|
|
|
|
|
2014-02-22 17:12:05 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
mkdir -p libs/armeabi-v7a
|
|
|
|
mkdir -p obj/local/armeabi-v7a
|
|
|
|
CC="$NDK_ROOT/bin/arm-linux-androideabi-gcc"
|
2014-04-19 23:36:26 +00:00
|
|
|
CC=$CC GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=1 ../go/bin/go install $GOFLAGS -v -ldflags="-android -shared -extld $CC -extldflags '-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16'" -tags android github.com/calmh/syncthing/cmd/syncthing
|
2014-02-22 17:12:05 +00:00
|
|
|
cp $GOPATH/bin/linux_arm/syncthing libs/armeabi-v7a/libsyncthing.so
|
|
|
|
cp $GOPATH/bin/linux_arm/syncthing obj/local/armeabi-v7a/libsyncthing.so
|