add java makefile

This commit is contained in:
Mylloon 2024-10-17 15:55:32 +02:00
parent 2848752f46
commit 871d782e6b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

30
java_zip.mk Normal file
View file

@ -0,0 +1,30 @@
RM = rm -rf
TAR = tar -cf
CP = cp -r
MKDIR = mkdir -p
SRC_DIR = src
BIN_DIR = bin
ENTRY = App
ARCHIVE_NAME = nom
run: compilation
run:
java --enable-preview -cp $(BIN_DIR) $(ENTRY)
compilation:
find $(SRC) -name "*.java" -print | xargs javac -d $(BIN_DIR)
all:
run
clean:
$(RM) $(BIN_DIR) "$(ARCHIVE_NAME).tar"
archive:
$(MKDIR) "$(ARCHIVE_NAME)"
$(CP) "$(SRC_DIR)" README.txt "$(ARCHIVE_NAME)"
$(TAR) "$(ARCHIVE_NAME).tar" "$(ARCHIVE_NAME)"
$(RM) "$(ARCHIVE_NAME)"