mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 03:05:18 +08: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:
@@ -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
|
||||
versionName "0.42"
|
||||
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
cFlags "-std=c11 -Wall -Wextra -Werror -Os -fno-stack-protector -Wl,--gc-sections"
|
||||
}
|
||||
}
|
||||
|
||||
ndk {
|
||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
@@ -30,8 +36,8 @@ android {
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path "CMakeLists.txt"
|
||||
ndkBuild {
|
||||
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)
|
Reference in New Issue
Block a user