From 2b5979bfade7516d0ab3fa69294bfc037dcabd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Sat, 17 Feb 2024 16:27:19 +0500 Subject: [PATCH] Improve Makefile. --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 92b3cee..0e33248 100644 --- a/Makefile +++ b/Makefile @@ -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: