2
0
mirror of synced 2025-02-23 14:58:12 +00:00
mobile/example/libhello/make.bash
David Crawshaw 7dcf08fb02 go.mobile/example/libhello: make example self-contained
This example now uses the pre-L build system.
A gradle-based example will follow as soon as
I am testing on Android L devices.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/143900043
2014-09-12 10:54:02 -04:00

22 lines
657 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright 2014 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
if [ ! -f make.bash ]; then
echo 'make.bash must be run from $GOPATH/src/code.google.com/p/go.mobile/example/libhello'
exit 1
fi
mkdir -p libs/armeabi-v7a src/go/hi
ANDROID_APP=$PWD
(cd ../.. && ln -sf $PWD/app/*.java $ANDROID_APP/src/go)
(cd ../.. && ln -sf $PWD/bind/java/Seq.java $ANDROID_APP/src/go)
ln -sf $PWD/hi/*.java src/go/hi
CGO_ENABLED=1 GOOS=android GOARCH=arm GOARM=7 \
go build -ldflags="-shared" .
mv -f libhello libs/armeabi-v7a/libgojni.so
ant debug