From c51ceae68e5d3aa84e262a0dbdd054a5fab64945 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Sat, 27 Apr 2013 02:41:33 +0000 Subject: [PATCH] Make parallel build work again 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 | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/makefile b/makefile index 4491afd..6fcf87a 100644 --- 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: -- 2.43.2