aboutsummaryrefslogtreecommitdiff
path: root/android/native/jni/Application.mk
diff options
context:
space:
mode:
authorNeroBurner <pyro4hell@gmail.com>2021-06-21 21:51:42 +0200
committerrubenwardy <rw@rubenwardy.com>2021-10-18 18:11:33 +0100
commit27f4195471fbbac33b5cdc19025ec5aa6c118a75 (patch)
tree193758bcafe425e7dcb9d77796ec3674eea182b6 /android/native/jni/Application.mk
parentb2596eda32a41a8008b6979d7a29e0c225421a3a (diff)
downloadminetest-27f4195471fbbac33b5cdc19025ec5aa6c118a75.tar.gz
minetest-27f4195471fbbac33b5cdc19025ec5aa6c118a75.tar.bz2
minetest-27f4195471fbbac33b5cdc19025ec5aa6c118a75.zip
Move build/android directory to root of project (#11283)
Diffstat (limited to 'android/native/jni/Application.mk')
-rw-r--r--android/native/jni/Application.mk32
1 files changed, 32 insertions, 0 deletions
diff --git a/android/native/jni/Application.mk b/android/native/jni/Application.mk
new file mode 100644
index 000000000..82f0148f0
--- /dev/null
+++ b/android/native/jni/Application.mk
@@ -0,0 +1,32 @@
+APP_PLATFORM := ${APP_PLATFORM}
+APP_ABI := ${TARGET_ABI}
+APP_STL := c++_shared
+NDK_TOOLCHAIN_VERSION := clang
+APP_SHORT_COMMANDS := true
+APP_MODULES := Minetest
+
+APP_CPPFLAGS := -Ofast -fvisibility=hidden -fexceptions -Wno-deprecated-declarations -Wno-extra-tokens
+
+ifeq ($(APP_ABI),armeabi-v7a)
+APP_CPPFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb
+endif
+
+#ifeq ($(APP_ABI),x86)
+#APP_CPPFLAGS += -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32 -funroll-loops
+#endif
+
+ifndef NDEBUG
+APP_CPPFLAGS := -g -D_DEBUG -O0 -fno-omit-frame-pointer -fexceptions
+endif
+
+APP_CFLAGS := $(APP_CPPFLAGS) -Wno-parentheses-equality #-Werror=shorten-64-to-32
+APP_CXXFLAGS := $(APP_CPPFLAGS) -frtti -std=gnu++17
+APP_LDFLAGS := -Wl,--no-warn-mismatch,--gc-sections,--icf=safe
+
+ifeq ($(APP_ABI),arm64-v8a)
+APP_LDFLAGS := -Wl,--no-warn-mismatch,--gc-sections
+endif
+
+ifndef NDEBUG
+APP_LDFLAGS :=
+endif