This commit is contained in:
Mylloon 2024-12-18 17:01:49 +01:00
parent 56e94072ed
commit 841ec221e2
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -7,17 +7,23 @@ PASTE = xclip -o
SRC_DIR = src SRC_DIR = src
BIN_DIR = bin BIN_DIR = bin
JAVA_ARGS = --enable-preview -enableassertions
JAVAC_ARGS = -Xlint:unchecked
ENTRY := App ENTRY := App
ARGV :=
ARCHIVE_NAME = nom ARCHIVE_NAME = nom
ARCHIVE_EXT = tar.gz ARCHIVE_EXT = tar.gz
EXTRA_FILES :=
run: compilation run: compilation
run: run:
java --enable-preview -cp $(BIN_DIR) $(ENTRY) java $(JAVA_ARGS) --class-path $(BIN_DIR) $(ENTRY) $(ARGV)
compilation: compilation:
find $(SRC_DIR) -name "*.java" -print | xargs javac -d $(BIN_DIR) find $(SRC_DIR) -name "*.java" -print | xargs javac $(JAVAC_ARGS) -d $(BIN_DIR)
paste: paste:
mkdir -p $(SRC_DIR) mkdir -p $(SRC_DIR)
@ -31,6 +37,6 @@ clean:
archive: archive:
$(MKDIR) "$(ARCHIVE_NAME)" $(MKDIR) "$(ARCHIVE_NAME)"
$(CP) "$(SRC_DIR)" README.txt "$(ARCHIVE_NAME)" $(CP) $(EXTRA_FILES) "$(SRC_DIR)" "README.txt" "$(ARCHIVE_NAME)"
$(TAR) "$(ARCHIVE_NAME).$(ARCHIVE_EXT)" "$(ARCHIVE_NAME)" $(TAR) "$(ARCHIVE_NAME).$(ARCHIVE_EXT)" "$(ARCHIVE_NAME)"
$(RM) "$(ARCHIVE_NAME)" $(RM) "$(ARCHIVE_NAME)"