From c5b510b532ec9464995726ca02288c5edf0d6d2b Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Wed, 12 Aug 2026 22:27:20 +1200 Subject: Get some more basic boilerplate and build stuff working --- .gitignore | 6 ++++++ Makefile | 19 +++++++++++++++++++ jni/Android.mk | 8 +++----- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9837d7a --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +libs/ +obj/ +apk/ +moku-assistant.apk +moku-assistant.apk.idsig +debug.keystore diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7ac6f95 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +.PHONY: all clean + +moku-assistant.apk: AndroidManifest.xml libs/arm64-v8a/libmoku.so debug.keystore + rm -rf apk + mkdir -p apk/libs/arm64-v8a + cp libs/arm64-v8a/libmoku.so apk/libs/arm64-v8a + aapt package -f -M AndroidManifest.xml -I ${ANDROID_SDK_ROOT}/platforms/android-34/android.jar -F moku-assistant.apk apk/ + apksigner sign --ks debug.keystore --ks-pass pass:android moku-assistant.apk + +libs/arm64-v8a/libmoku.so: + ndk-build + +all: moku-assistant.apk + +clean: + rm -rf apk libs obj moku-assistant.apk moku-assistant.apk.idsig debug.keystore + +debug.keystore: + keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=Android Debug, O=Android, C=US" -storepass android -keypass android diff --git a/jni/Android.mk b/jni/Android.mk index d9fbd00..b41aa2e 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -2,12 +2,10 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := moku -LOCAL_SRC_FILES := main.c -LOCAL_LDLIBS := -llog -landroid - -LOCAL_STATIC_LIBRARIES := android_native_app_glue +LOCAL_SRC_FILES := main.c +LOCAL_LDLIBS := -llog -landroid +LOCAL_STATIC_LIBRARIES := android_native_app_glue include $(BUILD_SHARED_LIBRARY) $(call import-module,android/native_app_glue) - -- cgit v1.2.3