j2me_hello_kotlin/Makefile

40 lines
603 B
Makefile
Raw Normal View History

2024-02-17 11:19:53 +00:00
include env.mk
SRC = src
SRC_DIR := src
OUT_DIR := build
SRCS := $(wildcard $(SRC_DIR)/*/*.kt)
CLS := $(SRCS:$(SRC_DIR)/%.kt=$(OUT_DIR)/%.class)
KOTLINC = kotlinc
KOTLINOPT = -cp $(HEADERS) -d $(OUT_DIR) -jvm-target 1.8
.SUFFIXES: .kt
.PHONY: all clean
all: $(CLS)
$(CLS): $(OUT_DIR)/%.class: $(SRC_DIR)/%.kt
mkdir -p build
$(KOTLINC) $(KOTLINOPT) $<
rm -rf build/META-INF/
clean:
rm -rf build/
rm -f result.jar
rm -f a.jar
pack:
jar -cmf META-INF/MANIFEST.MF a.jar -C build . -C res .
translate:
$(RETROTRANSLATOR) -srcjar a.jar -destjar result.jar
run:
$(EMULATOR) result.jar