shithub: drawterm-fdroid

ref: 1631ca601fc896c41dde746e34d18654a6a70d73
dir: /gui-android/Makefile/

View raw version
ROOT=..
include ../Make.config
include ../Make.android.config
LIB=libgui.a

OFILES=\
	cpp/android.$O\
	cpp/native-lib.$O\
	cpp/devandroid.$O\

default: $(LIB) gen/org/echoline/drawterm/R.java bin/classes.dex
$(LIB): $(OFILES)
	$(AR) r $(LIB) $(OFILES)
	$(RANLIB) $(LIB)

gen/org/echoline/drawterm/R.java: $(shell find res/ -type f)
	$(SDKPREFIX)/build-tools/$(BUILDTOOLS)/aapt package -f -m -M AndroidManifest.xml -I $(SDKPREFIX)/platforms/android-$(PLATFORM)/android.jar -S res/ -J gen

bin/classes.dex: obj/org/echoline/drawterm/MainActivity.class obj/org/echoline/drawterm/DrawTermThread.class obj/org/echoline/drawterm/MySurfaceView.class
	$(SDKPREFIX)/build-tools/$(BUILDTOOLS)/dx --dex --verbose --output=$@ obj/

obj/org/echoline/drawterm/%.class: java/org/echoline/drawterm/%.java
	$(JAVA_HOME)/bin/javac -d obj/ -classpath $(SDKPREFIX)/platforms/android-$(PLATFORM)/android.jar -sourcepath java java/org/echoline/drawterm/*.java gen/org/echoline/drawterm/R.java