j2me_hello_kotlin/Makefile

38 lines
707 B
Makefile

include env.mk
SRC = src
SRC_DIR := src
RES_DIR := res
SRCS := $(wildcard $(SRC_DIR)/*/*.kt)
CLASSNAME := com.Hello
KOTLINC = kotlinc
KOTLINFLAGS = -cp $(HEADERS) -d jars/classes.jar -jvm-target 1.8 -include-runtime
.SUFFIXES: .kt
.PHONY: all clean
all: release
jars/classes.jar: $(SRCS)
@mkdir -p jars
$(KOTLINC) $(KOTLINFLAGS) $<
clean:
rm -rf jars/
jars/result.jar: jars/classes.jar
-$(RETROTRANSLATOR) -srcjar jars/classes.jar -destjar jars/result.jar
jar -umf META-INF/MANIFEST.MF jars/result.jar -C res .
release jars/release.jar: jars/result.jar
proguard -include proguard.conf -keepclassmembers class $(CLASSNAME) { public \<methods\> ';' }
run:
$(EMULATOR) jars/result.jar