summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/android.make19
1 files changed, 15 insertions, 4 deletions
diff --git a/android/android.make b/android/android.make
index ab59888b79..a5d07b1655 100644
--- a/android/android.make
+++ b/android/android.make
@@ -9,7 +9,7 @@
9 9
10.SECONDEXPANSION: # $$(JAVA_OBJ) is not populated until after this 10.SECONDEXPANSION: # $$(JAVA_OBJ) is not populated until after this
11.SECONDEXPANSION: # $$(OBJ) is not populated until after this 11.SECONDEXPANSION: # $$(OBJ) is not populated until after this
12.PHONY: apk classes clean dex dirs libs 12.PHONY: apk classes clean dex dirs libs jar
13 13
14$(BUILDDIR)/$(BINARY): $$(OBJ) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB) 14$(BUILDDIR)/$(BINARY): $$(OBJ) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB)
15 $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS) $(GLOBAL_LDOPTS) 15 $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS) $(GLOBAL_LDOPTS)
@@ -48,6 +48,7 @@ LIBS := $(BINLIB_DIR)/$(BINARY) $(BINLIB_DIR)/libmisc.so
48TEMP_APK := $(BUILDDIR)/bin/_rockbox.apk 48TEMP_APK := $(BUILDDIR)/bin/_rockbox.apk
49TEMP_APK2 := $(BUILDDIR)/bin/__rockbox.apk 49TEMP_APK2 := $(BUILDDIR)/bin/__rockbox.apk
50DEX := $(BUILDDIR)/bin/classes.dex 50DEX := $(BUILDDIR)/bin/classes.dex
51JAR := $(BUILDDIR)/bin/classes.jar
51AP_ := $(BUILDDIR)/bin/resources.ap_ 52AP_ := $(BUILDDIR)/bin/resources.ap_
52APK := $(BUILDDIR)/rockbox.apk 53APK := $(BUILDDIR)/rockbox.apk
53 54
@@ -78,13 +79,23 @@ $(BUILDDIR)/bin/$(PACKAGE_PATH)/%.class: $(ANDROID_DIR)/src/$(PACKAGE_PATH)/%.ja
78 $(JAVAC_OPTS) \ 79 $(JAVAC_OPTS) \
79 -sourcepath $(ANDROID_DIR)/src $< 80 -sourcepath $(ANDROID_DIR)/src $<
80 81
81$(DEX): $(R_OBJ) $(JAVA_OBJ) 82$(JAR): $(JAVA_SRC) $(R_JAVA)
82 $(call PRINTS,DX $(subst $(BUILDDIR)/,,$@))$(DX) --dex --output=$@ $(BUILDDIR)/bin 83 $(call PRINTS,JAVAC $(subst $(ROOTDIR)/,,$?))javac -d $(BUILDDIR)/bin \
84 $(JAVAC_OPTS) \
85 -sourcepath $(ANDROID_DIR)/src:$(ANDROID_DIR)/gen $?
86 $(call PRINTS,JAR $(subst $(BUILDDIR)/,,$@))jar cf $(JAR) -C $(BUILDDIR)/bin org
83 87
84classes: $(R_OBJ) $(JAVA_OBJ) 88jar: $(JAR)
89
90$(DEX): $(JAR)
91 @echo "Checking for deleted class files" && $(foreach obj,$(JAVA_OBJ) $(R_OBJ), \
92 (test -f $(obj) || (echo "$(obj) is missing. Run 'make classes' to fix." && false)) && ) true
93 $(call PRINTS,DX $(subst $(BUILDDIR)/,,$@))$(DX) --dex --output=$@ $<
85 94
86dex: $(DEX) 95dex: $(DEX)
87 96
97classes: $(R_OBJ) $(JAVA_OBJ)
98
88$(BINLIB_DIR)/$(BINARY): $(BUILDDIR)/$(BINARY) 99$(BINLIB_DIR)/$(BINARY): $(BUILDDIR)/$(BINARY)
89 $(call PRINTS,CP $(BINARY))cp $^ $@ 100 $(call PRINTS,CP $(BINARY))cp $^ $@
90 101