summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile56
-rw-r--r--ant.properties4
-rw-r--r--build.xml2
3 files changed, 18 insertions, 44 deletions
diff --git a/Makefile b/Makefile
index 5468095..f8f86ef 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
-SDK=/home/keithp/src/android/android-sdk-linux
-PWD=/home/keithp/src/android/AltosDroid
+SDK=../android-sdk-linux
DX=$(SDK)/platform-tools/dx
ADB=$(SDK)/platform-tools/adb
@@ -7,55 +6,26 @@ AAPT=$(SDK)/platform-tools/aapt
APKBUILDER=$(SDK)/tools/apkbuilder
ZIPALIGN=$(SDK)/tools/zipalign
-PLATFORM=$(SDK)/platforms/android-10
-PLATFORM_JAR=$(PLATFORM)/android.jar
-ADDONS=$(SDK)/add-ons/addon-google_apis-google_inc_-10/libs
-TOOLS_LIB=$(SDK)/tools/lib
-CLASSPATH=".:$(PLATFORM)/*:$(TOOLS_LIB)/*"
-CLASSES=bin/classes
SRC_DIR=src/org/altusmetrum/AltosDroid
-GEN_DIR=gen/org/altusmetrum/AltosDroid
-JAVAC=javac
-BOOTCLASSPATH=$(PLATFORM_JAR):$(ADDONS)/usb.jar:$(ADDONS)/maps.jar
-
-JAVACFLAGS=\
- -d $(CLASSES) \
- -classpath $(CLASSES):. \
- -sourcepath src:gen \
- -target 1.5 \
- -bootclasspath $(BOOTCLASSPATH) \
- -encoding UTF-8 \
- -g \
- -source 1.5
SRC=\
$(SRC_DIR)/AltosDroid.java \
$(SRC_DIR)/BluetoothChatService.java \
- $(SRC_DIR)/DeviceListActivity.java \
- $(GEN_DIR)/R.java
+ $(SRC_DIR)/DeviceListActivity.java
-all: align.stamp
+all: bin/AltosDroid-debug.apk bin/AltosDroid-release.apk
-install: AltosDroid.apk
- $(ADB) -e install -r AltosDroid.apk
+install-release: bin/AltosDroid-release.apk
+ $(ADB) install -r bin/AltosDroid-release.apk
-$(GEN_DIR)/R.java: resources.stamp
+install-debug: bin/AltosDroid-debug.apk
+ $(ADB) install -r bin/AltosDroid-debug.apk
-resources.stamp: Makefile
- mkdir -p res libs bin bin/res bin/classes gen assets
- $(AAPT) package -f -m -M $(PWD)/AndroidManifest.xml -S $(PWD)/bin/res -S $(PWD)/res -I $(PLATFORM_JAR) -J $(PWD)/gen --generate-dependencies && touch $@
+bin/AltosDroid-debug.apk: $(SRC)
+ ant debug
-class.stamp: $(SRC)
- $(JAVAC) $(JAVACFLAGS) $(SRC) && touch $@
+bin/AltosDroid-release.apk: $(SRC)
+ ant release
-dex.stamp: Makefile class.stamp
- $(DX) --dex --output bin/classes.dex bin/classes && touch $@
-
-crunch.stamp: Makefile dex.stamp
- $(AAPT) crunch -v -S res -C bin/res
-
-package.stamp: Makefile crunch.stamp
- $(AAPT) package --no-crunch -f --debug-mode -M $(PWD)/AndroidManifest.xml -S $(PWD)/bin/res -S $(PWD)/res -A $(PWD)/assets -I $(PLATFORM_JAR) -F $(PWD)/bin/activity.ap_ --generate-dependencies && touch $@
-
-align.stamp: Makefile package.stamp
- $(ZIPALIGN) -f 4 bin/activity-debug-unaligned.apk bin/activity-debug.apk && touch $@ \ No newline at end of file
+clean:
+ ant clean \ No newline at end of file
diff --git a/ant.properties b/ant.properties
index ee52d86..5c19441 100644
--- a/ant.properties
+++ b/ant.properties
@@ -15,3 +15,7 @@
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.
+key.store=keystore
+key.alias=bob
+key.store.password=altusmetrum
+key.alias.password=altusmetrum
diff --git a/build.xml b/build.xml
index cc4f61a..6a89edb 100644
--- a/build.xml
+++ b/build.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project name="activity" default="help">
+<project name="AltosDroid" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into