2024-02-15 19:22:42 +00:00
|
|
|
include env.mk
|
|
|
|
|
|
|
|
SRC = src
|
|
|
|
JCFLAGS = -target 1.1 -source 1.2 -sourcepath $(SRC) -cp $(HEADERS) -Xlint:-options -d build -g:none
|
|
|
|
|
|
|
|
SRC_DIR := src
|
|
|
|
|
|
|
|
OUT_DIR := build
|
|
|
|
|
|
|
|
SRCS := $(wildcard $(SRC_DIR)/*/*.java)
|
|
|
|
|
|
|
|
CLS := $(SRCS:$(SRC_DIR)/%.java=$(OUT_DIR)/%.class)
|
|
|
|
|
|
|
|
.SUFFIXES: .java
|
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
2024-02-17 13:02:12 +00:00
|
|
|
all: pack
|
2024-02-15 19:22:42 +00:00
|
|
|
|
|
|
|
$(CLS): $(OUT_DIR)/%.class: $(SRC_DIR)/%.java
|
|
|
|
mkdir -p build
|
|
|
|
$(JC) $(JCFLAGS) $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf build/
|
|
|
|
rm -f result.jar
|
|
|
|
|
2024-02-17 13:02:12 +00:00
|
|
|
pack result.jar: $(CLS)
|
2024-02-15 19:22:42 +00:00
|
|
|
jar -cmf META-INF/MANIFEST.MF result.jar -C build . -C res .
|
|
|
|
|
|
|
|
run:
|
|
|
|
$(EMULATOR) result.jar
|