Compare commits

...

2 commits

Author SHA1 Message Date
f97289f9c7
Merge branch 'main' of git.mylloon.fr:Anri/makefiles 2024-10-17 15:55:33 +02:00
871d782e6b
add java makefile 2024-10-17 15:55:32 +02:00

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)"