summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-09-12 16:35:02 +0000
committerThomas Martitz <kugel@rockbox.org>2010-09-12 16:35:02 +0000
commita9944012946fc28d28ba4fc95c2841e428acb65a (patch)
treea86af46dc7774bd1cc1c224cb790ac261c4cbddb /android
parent5028eaa0252c6ce8707dcf473df493d9681b9359 (diff)
downloadrockbox-a9944012946fc28d28ba4fc95c2841e428acb65a.tar.gz
rockbox-a9944012946fc28d28ba4fc95c2841e428acb65a.tar.bz2
rockbox-a9944012946fc28d28ba4fc95c2841e428acb65a.zip
Extend make clean for android zu also cleanup the compiled java classes and apks (and everything else generated during build process).
This also seems to fix a problem with make apk on some machines. Thanks to Dustin Skoracki for helping to investigate. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28062 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android')
-rw-r--r--android/android.make24
1 files changed, 15 insertions, 9 deletions
diff --git a/android/android.make b/android/android.make
index 22b80fba54..a2ed996fa4 100644
--- a/android/android.make
+++ b/android/android.make
@@ -9,7 +9,7 @@
.SECONDEXPANSION: # $$(JAVA_OBJ) is not populated until after this
.SECONDEXPANSION: # $$(OBJ) is not populated until after this
-
+.PHONY: apk classes clean dex dirs libs
$(BUILDDIR)/$(BINARY): $$(OBJ) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB)
$(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS) $(GLOBAL_LDOPTS)
@@ -42,7 +42,9 @@ JAVA_OBJ := $(call java2class,$(subst /src/,/bin/,$(JAVA_SRC)))
LIBS := $(BINLIB_DIR)/$(BINARY) $(BINLIB_DIR)/libmisc.so
TEMP_APK := $(BUILDDIR)/bin/_Rockbox.apk
TEMP_APK2 := $(BUILDDIR)/bin/__Rockbox.apk
-APK := $(BUILDDIR)/bin/Rockbox.apk
+DEX := $(BUILDDIR)/bin/classes.dex
+AP_ := $(BUILDDIR)/bin/resources.ap_
+APK := $(BUILDDIR)/bin/Rockbox.apk
_DIRS := $(BUILDDIR)/___/$(PACKAGE_PATH)
DIRS := $(subst ___,bin,$(_DIRS))
@@ -50,8 +52,8 @@ DIRS += $(subst ___,gen,$(_DIRS))
DIRS += $(subst ___,data,$(_DIRS))
DIRS += $(BUILDDIR)/libs/armeabi
-$(R_JAVA): $(MANIFEST)
- $(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$<))$(AAPT) package -f -m -J $(BUILDDIR)/gen -M $(MANIFEST) -S $(ANDROID_DIR)/res -I $(ANDROID_PLATFORM)/android.jar -F $(BUILDDIR)/bin/resources.ap_
+$(R_JAVA) $(AP_): $(MANIFEST)
+ $(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$@))$(AAPT) package -f -m -J $(BUILDDIR)/gen -M $(MANIFEST) -S $(ANDROID_DIR)/res -I $(ANDROID_PLATFORM)/android.jar -F $(AP_)
$(BUILDDIR)/bin/$(PACKAGE_PATH)/R.class: $(R_JAVA)
$(call PRINTS,JAVAC $(subst $(ROOTDIR)/,,$<))javac -d $(BUILDDIR)/bin \
@@ -63,12 +65,12 @@ $(BUILDDIR)/bin/$(PACKAGE_PATH)/%.class: $(ANDROID_DIR)/src/$(PACKAGE_PATH)/%.ja
-classpath $(ANDROID_PLATFORM)/android.jar:$(BUILDDIR)/bin -sourcepath \
$(ANDROID_DIR)/gen:$(ANDROID_DIR)/src $<
-classes: $(R_OBJ) $(JAVA_OBJ)
-
-$(BUILDDIR)/bin/classes.dex: classes
+$(DEX): $(R_OBJ) $(JAVA_OBJ)
$(call PRINTS,DX $(subst $(BUILDDIR)/,,$@))$(DX) --dex --output=$@ $(BUILDDIR)/bin
-dex: $(BUILDDIR)/bin/classes.dex
+classes: $(R_OBJ) $(JAVA_OBJ)
+
+dex: $(DEX)
$(BINLIB_DIR)/$(BINARY): $(BUILDDIR)/$(BINARY)
$(call PRINTS,CP $(BINARY))cp $^ $@
@@ -83,7 +85,7 @@ libs: $(LIBS)
$(TEMP_APK): libs dex
$(call PRINTS,APK $(subst $(BUILDDIR)/,,$@))$(APKBUILDER) $@ \
- -u -z $(BUILDDIR)/bin/resources.ap_ -f $(BUILDDIR)/bin/classes.dex -nf $(BUILDDIR)/libs
+ -u -z $(AP_) -f $(DEX) -nf $(BUILDDIR)/libs
$(APK): $(TEMP_APK)
$(SILENT)rm -f $@
@@ -97,3 +99,7 @@ dirs:
$(SILENT)mkdir -p $(DIRS)
apk: dirs $(APK)
+
+clean::
+ $(SILENT)rm -f $(BUILDDIR)/bin/$(PACKAGE_PATH)/*.class $(R_JAVA) $(TEMP_APK) $(TEMP_APK2) $(APK) $(DEX) $(BUILDDIR)/_rockbox.zip $(AP_) $(LIBS)
+