File tree Expand file tree Collapse file tree 5 files changed +16
-21
lines changed
vulkandraw/vulkandraw_android Expand file tree Collapse file tree 5 files changed +16
-21
lines changed Original file line number Diff line number Diff line change 1
- ANDROID_TOOLCHAIN_DIR ?= $( shell pwd) /toolchain
2
- ANDROID_API ?= 21
3
- ANDROID_SYSROOT = $(NDK ) /platforms/android- $( ANDROID_API ) /arch-arm
1
+ OS =linux
2
+ ANDROID_API ?= 23
3
+ ANDROID_TOOLCHAIN_DIR ? = $(ANDROID_NDK_HOME ) /toolchains/llvm/prebuilt/ $( OS ) -x86_64/bin
4
4
5
- all : toolchain build apk
6
-
7
- toolchain :
8
- $(NDK ) /build/tools/make_standalone_toolchain.py \
9
- --api=$(ANDROID_API ) --install-dir=$(ANDROID_TOOLCHAIN_DIR ) \
10
- --arch=arm --stl libc++
5
+ all : build apk
11
6
12
7
build :
13
8
mkdir -p android/jni/lib
14
- CC=" $( ANDROID_TOOLCHAIN_DIR) /bin/arm-linux-androideabi-gcc" \
15
- CXX=" $( ANDROID_TOOLCHAIN_DIR) /bin/arm-linux-androideabi-g++" \
16
- CGO_CFLAGS=" -march=armv7-a" \
9
+ CC=" $( ANDROID_TOOLCHAIN_DIR) /aarch64-linux-android$( ANDROID_API) -clang" \
10
+ CXX=" $( ANDROID_TOOLCHAIN_DIR) /aarch64-linux-android$( ANDROID_API) -clang++" \
17
11
GOOS=android \
18
- GOARCH=arm \
19
- GOARM=7 \
12
+ GOARCH=arm64 \
20
13
CGO_ENABLED=1 \
21
14
go build -buildmode=c-shared -o android/jni/lib/libvulkandraw.so
22
15
Original file line number Diff line number Diff line change 3
3
android : versionCode =" 1"
4
4
android : versionName =" 1.0" >
5
5
6
- <uses-sdk android : minSdkVersion =" 21 " />
6
+ <uses-sdk android : minSdkVersion =" 23 " />
7
7
8
8
<application android : label =" VulkanDraw" android : hasCode =" false" >
9
9
<activity android : name =" android.app.NativeActivity"
Original file line number Diff line number Diff line change 1
1
all : project build
2
2
3
3
build :
4
- ndk-build
5
4
ant debug
6
5
7
6
install :
8
- ndk-build
9
7
ant debug install
10
8
11
9
project :
12
- # (required) go get github.com/xlab/android-go/cmd/android-project
10
+ # command "android-project" require installation:
11
+ # go get github.com/xlab/treeprint
12
+ # go get github.com/jawher/mow.cli
13
+ # go install github.com/xlab/android-go/cmd/android-project
14
+
13
15
android-project update --target android-23 --name VulkanDraw --path .
14
16
15
17
project-n :
Original file line number Diff line number Diff line change 1
- APP_PLATFORM := android-21
2
- APP_ABI := armeabi armeabi-v7a
1
+ APP_PLATFORM := android-23
2
+ APP_ABI := arm64-v8a
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package main
3
3
import (
4
4
"log"
5
5
6
- "github.com/vulkan-go/demos/ vulkandraw"
6
+ "vulkandraw"
7
7
vk "github.com/vulkan-go/vulkan"
8
8
"github.com/xlab/android-go/android"
9
9
"github.com/xlab/android-go/app"
You can’t perform that action at this time.
0 commit comments