Add altosdroid/Makefile.am
authorKeith Packard <keithp@keithp.com>
Fri, 6 Jan 2012 00:30:41 +0000 (16:30 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 3 Jun 2012 02:38:02 +0000 (19:38 -0700)
altosdroid/Makefile.am [new file with mode: 0644]

diff --git a/altosdroid/Makefile.am b/altosdroid/Makefile.am
new file mode 100644 (file)
index 0000000..2c6ffc2
--- /dev/null
@@ -0,0 +1,42 @@
+if ANDROID
+all_target=bin/AltosDroid-debug.apk bin/AltosDroid-release.apk
+clean_command=ant clean
+else
+all_target=
+clean_command=echo done
+endif
+
+SDK=$(ANDROID_SDK)
+
+DX=$(SDK)/platform-tools/dx
+ADB=$(SDK)/platform-tools/adb
+AAPT=$(SDK)/platform-tools/aapt
+APKBUILDER=$(SDK)/tools/apkbuilder
+ZIPALIGN=$(SDK)/tools/zipalign
+
+SRC_DIR=src/org/altusmetrum/AltosDroid
+
+SRC=\
+       $(SRC_DIR)/AltosDroid.java \
+       $(SRC_DIR)/BluetoothChatService.java \
+       $(SRC_DIR)/DeviceListActivity.java
+
+all: $(all_target)
+
+if ANDROID
+install-release: bin/AltosDroid-release.apk
+       $(ADB) install -r bin/AltosDroid-release.apk
+
+install-debug: bin/AltosDroid-debug.apk
+       $(ADB) install -r bin/AltosDroid-debug.apk
+
+bin/AltosDroid-debug.apk: $(SRC)
+       ant debug
+
+bin/AltosDroid-release.apk: $(SRC)
+       ant release
+endif
+
+clean:
+       $(clean_command)
+