Mirror the iOS layout instead of nesting Android inside dm/host:
- dm/android/app GameActivity app (manifest, java, res, build_apk.sh)
- dm/android/Sources front_app.c, touch_app.c, front_headless.c
- dm/android/Makefile entry point (apk / lib / install / headless / tests);
rules in build.mk (was dm/host/Makefile.android),
run with dm/host as cwd; outputs in dm/android/build/
- dm/android/tests t_vk_perf
- dm/gfx/vulkan nvn_vk.c and friends, next to the Metal backend
Only include paths, build paths and docs change; no code changes.
The Mac / iOS source lists do not pick up gfx/vulkan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
1.4 KiB
Makefile
28 lines
1.4 KiB
Makefile
# Android 入口(仅 Adreno 机型)。规则在 build.mk,以 dm/host 为当前目录跑(宿主共用源码);产物在 build/(不进 git)
|
||
# make = make apk:libd2r.so + d2r.apk(不用 Gradle)
|
||
# make install 装到 adb 连着的手机(会结束正在运行的游戏)
|
||
# make headless 无头宿主 build/dmhost(adb shell 直接跑)
|
||
# make tests Vulkan 后端设备测试 build/tests/t_vk_perf
|
||
# 没有游戏文件生成的表头时:DM_GENH_DIR=<表头目录>;并行:-j8
|
||
# Android entry point (Adreno devices only). The rules are in build.mk, run with dm/host as the current directory (shared host sources); outputs in build/ (not in git)
|
||
# make = make apk: libd2r.so + d2r.apk (no Gradle)
|
||
# make install install onto the phone connected over adb (ends a running game)
|
||
# make headless headless host build/dmhost (run directly from adb shell)
|
||
# make tests Vulkan backend device test build/tests/t_vk_perf
|
||
# Without the headers generated from game files: DM_GENH_DIR=<header dir>; parallel: -j8
|
||
HOST := $(abspath ../host)
|
||
B := $(CURDIR)/build
|
||
apk: lib
|
||
sh app/build_apk.sh
|
||
lib:
|
||
$(MAKE) -C $(HOST) -f $(CURDIR)/build.mk APP=1 $(B)/app/libd2r.so
|
||
install: apk
|
||
adb install -r $(B)/app/d2r.apk
|
||
headless:
|
||
$(MAKE) -C $(HOST) -f $(CURDIR)/build.mk $(B)/dmhost
|
||
tests:
|
||
$(MAKE) -C tests
|
||
clean:
|
||
rm -rf $(B)
|
||
.PHONY: apk lib install headless tests clean
|