make javac in Makefile compile all java files in PACKAGE
This commit is contained in:
parent
91e1f22f86
commit
bd0af0a8a9
1 changed files with 8 additions and 6 deletions
14
app/Makefile
14
app/Makefile
|
@ -28,23 +28,25 @@ include Makefile.app-config
|
|||
-storepass armena -keypass armena -alias helljniKey -keyalg RSA -v
|
||||
|
||||
# aapt "package" together the dalvik/hex stuff (and "assets" and "res")
|
||||
./result/unsigned.apk : ./result/bin/classes.dex ./assets ./AndroidManifest.xml
|
||||
./result/unsigned.apk : ./result/bin/classes.dex $(shell find ./assets -type f) ./assets ./AndroidManifest.xml
|
||||
rm -rvf "$@"
|
||||
$(BUILDTOOLS)/aapt package \
|
||||
-v -u -f -M ./AndroidManifest.xml -S ./res \
|
||||
-I $(ANDROID_JAR) -A ./assets -F $@ ./result/bin
|
||||
|
||||
# convert "java class"es files (i.e bytecode) to dalvic/d8 android thing
|
||||
./result/bin/classes.dex : ./obj/$(PACKAGE)/AppActivity.class
|
||||
./result/bin/classes.dex : ./result/last.javac
|
||||
mkdir -p ./result/bin
|
||||
$(BUILDTOOLS)/d8 ./obj/$(PACKAGE)/*.class \
|
||||
--lib $(ANDROID_JAR) --output ./result/bin
|
||||
|
||||
# compile (javac) the class from
|
||||
./obj/$(PACKAGE)/AppActivity.class : ./src/$(PACKAGE)/AppActivity.java ./src/$(PACKAGE)/R.java
|
||||
mkdir -p ./obj/$(PACKAGE)
|
||||
javac -d ./obj -classpath $(ANDROID_JAR) -sourcepath ./src $<
|
||||
|
||||
# compile (javac) the class from
|
||||
#./obj/$(PACKAGE)/AppActivity.class : ./src/$(PACKAGE)/AppActivity.java ./src/$(PACKAGE)/*.java
|
||||
./result/last.javac : ./src/$(PACKAGE)/AppActivity.java ./src/$(PACKAGE)/*.java
|
||||
mkdir -p ./result
|
||||
mkdir -p ./obj/$(PACKAGE)
|
||||
javac -d ./obj -classpath $(ANDROID_JAR) -sourcepath ./src $? | tee $@
|
||||
|
||||
# make the resources "R.java" thing
|
||||
./src/$(PACKAGE)/R.java : $(shell find ./res -type f) app-config.sh ./AndroidManifest.xml ./android-sdk/installed | ./src/$(PACKAGE)
|
||||
|
|
Loading…
Add table
Reference in a new issue