Branch
Hash :
381fd4a9
Author :
Thomas de Grivel
Date :
2025-11-12T11:26:40
wip demo egl android
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
## kc3
## Copyright from 2022 to 2025 kmx.io <contact@kmx.io>
##
## Permission is hereby granted to use this software granted the above
## copyright notice and this permission paragraph are included in all
## copies and substantial portions of this software.
##
## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
## THIS SOFTWARE.
APP_DIR = ${PROJECT_DIR}/app
BUILD_DIR = ${APP_DIR}/build
JNI_DIR = ${APP_DIR}/src/main/jni
GRADLE = gradle
DEBUG_APK = ${BUILD_DIR}/outputs/apk/debug/app-debug.apk
RELEASE_APK = ${BUILD_DIR}/outputs/apk/release/app-release.apk
all: debug
include configure.mk
apk-info:
@if [ -f ${DEBUG_APK} ]; then \
echo "Debug APK info:"; \
aapt dump badging ${DEBUG_APK} | head -20; \
fi
@if [ -f ${RELEASE_APK} ]; then \
echo "Release APK info:"; \
aapt dump badging ${RELEASE_APK} | head -20; \
fi
help:
@echo "KC3 EGL Android Demo - Build Targets"
@echo ""
@echo " make build - Build debug APK"
@echo " make debug - Build debug APK (same as build)"
@echo " make release - Build release APK"
@echo " make install - Build and install debug APK"
@echo " make install-release - Install release APK"
@echo " make uninstall - Uninstall app from device"
@echo " make clean - Clean build artifacts"
@echo " make logcat - Show filtered logcat output"
@echo ""
build: lib
${GRADLE} assembleDebug
@echo "Debug APK built: ${DEBUG_APK}"
clean:
${GRADLE} clean
rm -rf ${BUILD_DIR}
rm -rf .gradle
debug: build
devices:
adb devices -l
install: build
${GRADLE} installDebug
@echo "Debug APK installed"
install-release: release
adb install -r ${RELEASE_APK}
@echo "Release APK installed"
lib:
mkdir -p app/src/main/assets
rsync -aP --delete --exclude .git ${SRC_TOP}/lib app/src/main/assets/
rsync -aP --delete --exclude .git --exclude .travis.yml ${SRC_TOP}/fonts app/src/main/assets/
rsync -aP --delete --exclude .git ${SRC_TOP}/img app/src/main/assets/
cd app/src/main/assets && find lib fonts img \( -name '.*' -prune \) -o -type f -print > index.txt
logcat:
adb logcat | grep -iE "(kc3|egl|nativeactivity|runtimeerror)"
rebuild: clean build
release: lib
${GRADLE} assembleRelease
@echo "Release APK built: ${RELEASE_APK}"
run: install
adb shell am start -n \
io.kmx.kc3.demo/android.app.NativeActivity
uninstall:
adb uninstall io.kmx.kc3.demo || true
.PHONY: all clean build debug release install lib \
uninstall logcat help