shithub: drawterm

ref: 6dbca8e2f85408be9486a3145f74bb0c3d2e46e1
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