altosdroid: Update notebook to reflect current status
[fw/altos] / altosdroid / Makefile.am
index 3dbabdd7361603595e11c9becdb538dd077a528d..361de13cb3b917a44d2ece35ec733fdda91b1c06 100644 (file)
@@ -1,5 +1,8 @@
 if ANDROID
-all_target=bin/AltosDroid-debug.apk bin/AltosDroid-release-unsigned.apk
+all_target=bin/AltosDroid-debug.apk
+if ANDROID_RELEASE
+all_target+=bin/AltosDroid-release.apk
+endif
 else
 all_target=
 endif
@@ -29,7 +32,7 @@ SUPPORT_V4=$(EXT_LIBDIR)/$(SUPPORT_V4_JAR)
 GOOGLE_PLAY_SERVICES_LIB_SRCDIR=$(SDK)/extras/google/google_play_services/libproject
 GOOGLE_PLAY_SERVICES_LIB=google-play-services_lib
 
-JAVA_SRC=$(JAVA_SRC_DIR)/*.java
+JAVA_SRC=$(JAVA_SRC_DIR)/*.java $(JAVA_SRC_DIR)/BuildInfo.java
 
 DRAWABLES=\
     $(DRAWABLE_DIR)/redled.png \
@@ -40,6 +43,8 @@ SRC=$(JAVA_SRC) $(DRAWABLES)
 
 all: $(all_target)
 
+.NOTPARALLEL:
+
 $(EXT_LIBDIR):
        mkdir -p $(EXT_LIBDIR)
 
@@ -53,7 +58,7 @@ $(GOOGLE_PLAY_SERVICES_LIB): $(GOOGLE_PLAY_SERVICES_LIB_SRCDIR)/$(GOOGLE_PLAY_SE
        cp -a $(GOOGLE_PLAY_SERVICES_LIB_SRCDIR)/$(GOOGLE_PLAY_SERVICES_LIB) .
        cd $(GOOGLE_PLAY_SERVICES_LIB) && $(SDK)/tools/android update project --target $(SDK_TARGET) --path .
 
-$(JAVA_SRC_DIR)/BuildInfo.java: $(JAVA_SRC)
+$(JAVA_SRC_DIR)/BuildInfo.java: $(filter-out $(JAVA_SRC_DIR)/BuildInfo.java,$(shell echo $(JAVA_SRC)))
        ./buildinfo.sh
 
 $(DRAWABLE_DIR)/%.png: ../icon/%.png
@@ -72,23 +77,29 @@ bin/AltosDroid-debug.apk: $(SRC) $(ALTOSLIB) $(SUPPORT_V4) $(GOOGLE_PLAY_SERVICE
 bin/AltosDroid-release-unsigned.apk: $(SRC) $(ALTOSLIB) $(SUPPORT_V4) $(GOOGLE_PLAY_SERVICES_LIB)
        ant release
 
-release: bin/AltosDroid-release-unsigned.apk
-       jarsigner -keystore release.keystore \
+bin/AltosDroid-release.apk: bin/AltosDroid-release-unsigned.apk
+       jarsigner -sigalg SHA1withDSA -digestalg SHA1 \
+          -keystore ~/altusmetrumllc/google-play-release.keystore \
+          -storepass:file ~/altusmetrumllc/google-play-passphrase \
           -signedjar bin/AltosDroid-release-signed.apk \
           bin/AltosDroid-release-unsigned.apk AltosDroid
        $(ZIPALIGN) -f 4 \
           bin/AltosDroid-release-signed.apk \
           bin/AltosDroid-release.apk
 
-clean: $(GOOGLE_PLAY_SERVICES_LIB)
+release: bin/AltosDroid-release.apk
+
+clean-local: $(GOOGLE_PLAY_SERVICES_LIB)
        ant clean
-       rm -rf $(EXT_LIBDIR)
+       rm -f $(JAVA_SRC_DIR)/BuildInfo.java
        rm -f $(DRAWABLES)
+       rm -rf $(EXT_LIBDIR)
        rm -rf $(GOOGLE_PLAY_SERVICES_LIB)
 
 else
 
-clean:
+clean-local:
 
 endif
 
+clean: clean-local