Improve Makefile.

This commit is contained in:
bʰedoh₂ swé 2024-02-17 16:27:19 +05:00
parent b4c8616aa1
commit 2b5979bfad

View File

@ -6,6 +6,8 @@ SRC_DIR := src
OUT_DIR := build
RES_DIR := res
SRCS := $(wildcard $(SRC_DIR)/*/*.kt)
CLS := $(SRCS:$(SRC_DIR)/%.kt=$(OUT_DIR)/%.class)
@ -17,7 +19,7 @@ KOTLINOPT = -cp $(HEADERS) -d $(OUT_DIR) -jvm-target 1.8
.PHONY: all clean
all: $(CLS)
all: translate
$(CLS): $(OUT_DIR)/%.class: $(SRC_DIR)/%.kt
mkdir -p build
@ -29,10 +31,10 @@ clean:
rm -f result.jar
rm -f a.jar
pack:
pack a.jar: $(wildcard $(OUT_DIR)/*.class) $(wildcard $(RES_DIR)/*) $(CLS)
jar -cmf META-INF/MANIFEST.MF a.jar -C build . -C res .
translate:
translate result.jar: a.jar
$(RETROTRANSLATOR) -srcjar a.jar -destjar result.jar
run: