1 TOP
=$(realpath
$(CURDIR
)/..
/..
)
2 include $(TOP
)/sdks
/paths.mk
3 ADB
= $(SDK_DIR
)/platform-tools
/adb
4 ANDROID
= $(SDK_DIR
)/tools
/android
6 NDK_BUILD
= $(NDK_DIR
)/ndk-build
8 PACKAGE
= org.mono.android.AndroidTestRunner
9 ACTIVITY
= org.mono.android.AndroidRunner
13 $(MAKE
) -C managed
all
18 $(ANDROID
) update project
-p .
-t
"android-14"
20 setup
: local.properties
22 jni
/armeabi-v7a jni
/arm64-v8a jni
/x86 jni
/x86_64 assets
:
25 MONO_LIBS
=libMonoPosixHelper.so libmonosgen-2.0.so
27 $(foreach lib
,$(MONO_LIBS
),jni
/armeabi-v7a
/$(lib
)): jni
/armeabi-v7a
/%: $(TOP
)/sdks
/out
/android-arm
/lib
/% jni
/armeabi-v7a
28 cp
$(TOP
)/sdks
/out
/android-arm
/lib
/$* $@
30 $(foreach lib
,$(MONO_LIBS
),jni
/arm64-v8a
/$(lib
)): jni
/arm64-v8a
/%: $(TOP
)/sdks
/out
/android-arm64
/lib
/% jni
/arm64-v8a
31 cp
$(TOP
)/sdks
/out
/android-arm64
/lib
/$* $@
33 $(foreach lib
,$(MONO_LIBS
),jni
/x86
/$(lib
)): jni
/x86
/%: $(TOP
)/sdks
/out
/android-x86
/lib
/% jni
/x86
34 cp
$(TOP
)/sdks
/out
/android-x86
/lib
/$* $@
36 $(foreach lib
,$(MONO_LIBS
),jni
/x86_64
/$(lib
)): jni
/x86_64
/%: $(TOP
)/sdks
/out
/android-x86_64
/lib
/% jni
/x86_64
37 cp
$(TOP
)/sdks
/out
/android-x86_64
/lib
/$* $@
39 assets
/mconfig
: machine.config assets
40 cp machine.config assets
/mconfig
42 stage-sdk
: $(foreach lib
,$(MONO_LIBS
),jni
/armeabi-v7a
/$(lib
)) $(foreach lib
,$(MONO_LIBS
),jni
/arm64-v8a
/$(lib
)) \
43 $(foreach lib
,$(MONO_LIBS
),jni
/x86
/$(lib
)) $(foreach lib
,$(MONO_LIBS
),jni
/x86_64
/$(lib
)) assets
/mconfig
51 $(ADB
) install -r bin
/AndroidRunner-debug.apk
55 $(ADB
) uninstall $(PACKAGE
)
64 $(ADB
) shell am start
-a android.intent.action.MAIN
-c android.intent.category.LAUNCHER
$(PACKAGE
)/$(ACTIVITY
)
68 $(ADB
) shell am force-stop
$(PACKAGE
)