mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-04 16:11:11 +01:00
Switch from cmake to ndk-build
We switch from cmake to ndk-build to make it easier for builders in not requiring an additional tool installed. The JNI build is so simple so we don't really need much of a build tool anyway.
This commit is contained in:
parent
8314a2756c
commit
3480bf7346
3 changed files with 13 additions and 7 deletions
|
|
@ -1,5 +0,0 @@
|
||||||
cmake_minimum_required(VERSION 3.4.1)
|
|
||||||
|
|
||||||
add_library(termux SHARED src/main/jni/termux.c)
|
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wall -Wextra -Os -fno-stack-protector -Wl,--gc-sections")
|
|
||||||
|
|
@ -16,6 +16,12 @@ android {
|
||||||
versionCode 42
|
versionCode 42
|
||||||
versionName "0.42"
|
versionName "0.42"
|
||||||
|
|
||||||
|
externalNativeBuild {
|
||||||
|
ndkBuild {
|
||||||
|
cFlags "-std=c11 -Wall -Wextra -Werror -Os -fno-stack-protector -Wl,--gc-sections"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
||||||
}
|
}
|
||||||
|
|
@ -30,8 +36,8 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
ndkBuild {
|
||||||
path "CMakeLists.txt"
|
path "src/main/jni/Android.mk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
app/src/main/jni/Android.mk
Normal file
5
app/src/main/jni/Android.mk
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE:= libtermux
|
||||||
|
LOCAL_SRC_FILES:= termux.c
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue