| OLD | NEW |
| (Empty) |
| 1 :: Copyright 2014 The Go Authors. All rights reserved. | |
| 2 :: Use of this source code is governed by a BSD-style | |
| 3 :: license that can be found in the LICENSE file. | |
| 4 | |
| 5 @echo off | |
| 6 | |
| 7 setlocal | |
| 8 | |
| 9 if not exist make.bat goto error-invalid-path | |
| 10 | |
| 11 if not exist jni\armeabi mkdir jni\armeabi | |
| 12 | |
| 13 set CGO_ENABLED=1 | |
| 14 set GOOS=android | |
| 15 set GOARCH=arm | |
| 16 set GOARM=7 | |
| 17 | |
| 18 go build -ldflags="-shared" -o jni/armeabi/libbasic.so . | |
| 19 if errorlevel 1 goto error-go-build | |
| 20 | |
| 21 if defined NDK_ROOT goto ndk-build | |
| 22 echo NDK_ROOT path not defined | |
| 23 goto end | |
| 24 | |
| 25 :ndk-build | |
| 26 call %NDK_ROOT%\ndk-build.cmd NDK_DEBUG=1 >nul | |
| 27 | |
| 28 if defined ANT_HOME goto ant-build | |
| 29 echo ANT_HOME path not defined | |
| 30 goto end | |
| 31 | |
| 32 :ant-build | |
| 33 call %ANT_HOME%\bin\ant.bat debug >nul | |
| 34 goto end | |
| 35 | |
| 36 :error-invalid-path | |
| 37 echo make.bat must be run from example\basic | |
| 38 goto end | |
| 39 | |
| 40 :error-go-build | |
| 41 echo Error building go lib | |
| 42 goto end | |
| 43 | |
| 44 | |
| 45 :end | |
| OLD | NEW |