diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2011-02-02 22:13:51 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2011-02-02 22:13:51 +0000 |
commit | 276321e6d84a6ee634fd4ec9f0e9a1c3edc7d030 (patch) | |
tree | 452c2a0313a4c0ed07b4f840110972d73a2dd65f /android | |
parent | 01c0523e3ff5f4cfd193dc64bb5d96c8380fd598 (diff) |
Change the way java files are compiled (do them all at once) in order to speed up builds. There is now an intermediate jar file to help (although that's not strictly necessary), so for rebuilds of single java files this may be a bit slower
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29196 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android')
-rw-r--r-- | android/android.make | 19 |
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 @@ .SECONDEXPANSION: # $$(JAVA_OBJ) is not populated until after this .SECONDEXPANSION: # $$(OBJ) is not populated until after this -.PHONY: apk classes clean dex dirs libs +.PHONY: apk classes clean dex dirs libs jar $(BUILDDIR)/$(BINARY): $$(OBJ) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB) $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS) $(GLOBAL_LDOPTS) @@ -48,6 +48,7 @@ LIBS := $(BINLIB_DIR)/$(BINARY) $(BINLIB_DIR)/libmisc.so TEMP_APK := $(BUILDDIR)/bin/_rockbox.apk TEMP_APK2 := $(BUILDDIR)/bin/__rockbox.apk DEX := $(BUILDDIR)/bin/classes.dex +JAR := $(BUILDDIR)/bin/classes.jar AP_ := $(BUILDDIR)/bin/resources.ap_ APK := $(BUILDDIR)/rockbox.apk @@ -78,13 +79,23 @@ $(BUILDDIR)/bin/$(PACKAGE_PATH)/%.class: $(ANDROID_DIR)/src/$(PACKAGE_PATH)/%.ja $(JAVAC_OPTS) \ -sourcepath $(ANDROID_DIR)/src $< -$(DEX): $(R_OBJ) $(JAVA_OBJ) - $(call PRINTS,DX $(subst $(BUILDDIR)/,,$@))$(DX) --dex --output=$@ $(BUILDDIR)/bin +$(JAR): $(JAVA_SRC) $(R_JAVA) + $(call PRINTS,JAVAC $(subst $(ROOTDIR)/,,$?))javac -d $(BUILDDIR)/bin \ + $(JAVAC_OPTS) \ + -sourcepath $(ANDROID_DIR)/src:$(ANDROID_DIR)/gen $? + $(call PRINTS,JAR $(subst $(BUILDDIR)/,,$@))jar cf $(JAR) -C $(BUILDDIR)/bin org -classes: $(R_OBJ) $(JAVA_OBJ) +jar: $(JAR) + +$(DEX): $(JAR) + @echo "Checking for deleted class files" && $(foreach obj,$(JAVA_OBJ) $(R_OBJ), \ + (test -f $(obj) || (echo "$(obj) is missing. Run 'make classes' to fix." && false)) && ) true + $(call PRINTS,DX $(subst $(BUILDDIR)/,,$@))$(DX) --dex --output=$@ $< dex: $(DEX) +classes: $(R_OBJ) $(JAVA_OBJ) + $(BINLIB_DIR)/$(BINARY): $(BUILDDIR)/$(BINARY) $(call PRINTS,CP $(BINARY))cp $^ $@ |