summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/Makefile
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2012-12-10 22:19:37 +0100
committerRaphael Langella <raphael.langella@gmail.com>2012-12-10 22:19:37 +0100
commite1dbd5fd2bc31604e450ec5a0f1f6f9ba72c0193 (patch)
treeef10c802eaa76e26c4d376a4d0751745727de7d1 /crawl-ref/source/Makefile
parent1601c0d9a4c9f0db10c058075ccd9b561b9c8682 (diff)
downloadcrawl-ref-e1dbd5fd2bc31604e450ec5a0f1f6f9ba72c0193.tar.gz
crawl-ref-e1dbd5fd2bc31604e450ec5a0f1f6f9ba72c0193.zip
Android: automatically build signed package if ant.properties is present.
Diffstat (limited to 'crawl-ref/source/Makefile')
-rw-r--r--crawl-ref/source/Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile
index 3148844e52..66158cda5c 100644
--- a/crawl-ref/source/Makefile
+++ b/crawl-ref/source/Makefile
@@ -1740,14 +1740,20 @@ mac-app-console: all
#############################################################################
# Building the Android package
#
+PROJECT_DIR=contrib/sdl-android/project
+SRC_LINK=$(PROJECT_DIR)/jni/application/src
+ifeq (,$(wildcard $(PROJECT_DIR)/ant.properties))
+ GENERATED_APK=project/bin/MainActivity-debug.apk
+else
+ GENERATED_APK=project/bin/MainActivity-release.apk
+endif
android:
- @SRC_LINK=contrib/sdl-android/project/jni/application/src ;\
- if [ ! -e $$SRC_LINK ]; then \
- ln -s `cd ..; pwd` $$SRC_LINK; \
+ if [ ! -e $(SRC_LINK) ]; then \
+ ln -s `cd ..; pwd` $(SRC_LINK); \
fi
@cd contrib/sdl-android && ./build.sh && \
- mv project/bin/MainActivity-debug.apk ../../crawl_tiles_android-$(SRC_VERSION).apk
+ mv $(GENERATED_APK) ../../crawl_tiles_android-$(SRC_VERSION).apk
#############################################################################
# Canned tests