Improve Makefile.
This commit is contained in:
parent
b4c8616aa1
commit
2b5979bfad
8
Makefile
8
Makefile
@ -6,6 +6,8 @@ SRC_DIR := src
|
|||||||
|
|
||||||
OUT_DIR := build
|
OUT_DIR := build
|
||||||
|
|
||||||
|
RES_DIR := res
|
||||||
|
|
||||||
SRCS := $(wildcard $(SRC_DIR)/*/*.kt)
|
SRCS := $(wildcard $(SRC_DIR)/*/*.kt)
|
||||||
|
|
||||||
CLS := $(SRCS:$(SRC_DIR)/%.kt=$(OUT_DIR)/%.class)
|
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
|
.PHONY: all clean
|
||||||
|
|
||||||
all: $(CLS)
|
all: translate
|
||||||
|
|
||||||
$(CLS): $(OUT_DIR)/%.class: $(SRC_DIR)/%.kt
|
$(CLS): $(OUT_DIR)/%.class: $(SRC_DIR)/%.kt
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
@ -29,10 +31,10 @@ clean:
|
|||||||
rm -f result.jar
|
rm -f result.jar
|
||||||
rm -f a.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 .
|
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
|
$(RETROTRANSLATOR) -srcjar a.jar -destjar result.jar
|
||||||
|
|
||||||
run:
|
run:
|
||||||
|
Loading…
Reference in New Issue
Block a user