]> Pileus Git - ~andy/spades/commitdiff
Make parallel build work again
authorAndy Spencer <andy753421@gmail.com>
Sat, 27 Apr 2013 02:41:33 +0000 (02:41 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 27 Apr 2013 02:41:33 +0000 (02:41 +0000)
We just use the R.class file to denote all the class files, since we
build them all with the same command. This prevents make from trying to
compile all the class files separately.

makefile

index 4491afd740b36d0904028920ebe7c7e61f16c7d7..6fcf87aabd625f0bf4006df0dff49a1886aa95f2 100644 (file)
--- a/makefile
+++ b/makefile
@@ -8,15 +8,12 @@ KEYTYPE ?= pkcs12
 KEYNAME ?= android
 ANDROID ?= /opt/android-sdk-update-manager/platforms/android-10/android.jar
 
-# Sources
-RES     := $(shell find res -type f)
-SRC     := $(shell find src -name '*.java')
-
-# Objects
-GEN     := gen/$(subst .,/,$(PACKAGE))/R.java
-OBJ     := $(subst .java,.class,   \
-                $(SRC:src/%=obj/%) \
-                $(GEN:gen/%=obj/%))
+# Variables
+DIR     := $(subst .,/,$(PACKAGE))
+RES     := $(wildcard res/*/*.*)
+SRC     := $(wildcard src/$(DIR)/*.java)
+GEN     := gen/$(DIR)/R.java
+OBJ     := obj/$(DIR)/R.class
 
 # Targets
 debug: bin/$(PROGRAM).dbg
@@ -127,6 +124,5 @@ $(GEN): AndroidManifest.xml $(RES) | gen
 bin gen obj:
        @mkdir -p $@
 
-# Use parallel javac instead
-.PRECIOUS: %.dex %.res
-.NOTPARALLEL:
+# Keep intermediate files
+.SECONDARY: