36 lines
619 B
Makefile
36 lines
619 B
Makefile
RM = rm -rf
|
|
TAR = tar -czf
|
|
CP = cp -r
|
|
MKDIR = mkdir -p
|
|
PASTE = xclip -o
|
|
|
|
SRC_DIR = src
|
|
BIN_DIR = bin
|
|
|
|
ENTRY := App
|
|
|
|
ARCHIVE_NAME = nom
|
|
ARCHIVE_EXT = tar.gz
|
|
|
|
run: compilation
|
|
run:
|
|
java --enable-preview -cp $(BIN_DIR) $(ENTRY)
|
|
|
|
compilation:
|
|
find $(SRC_DIR) -name "*.java" -print | xargs javac -d $(BIN_DIR)
|
|
|
|
paste:
|
|
mkdir -p $(SRC_DIR)
|
|
$(PASTE) > $(SRC_DIR)/Main.java
|
|
|
|
all:
|
|
run
|
|
|
|
clean:
|
|
$(RM) $(BIN_DIR) "$(ARCHIVE_NAME).$(ARCHIVE_EXT)"
|
|
|
|
archive:
|
|
$(MKDIR) "$(ARCHIVE_NAME)"
|
|
$(CP) "$(SRC_DIR)" README.txt "$(ARCHIVE_NAME)"
|
|
$(TAR) "$(ARCHIVE_NAME).$(ARCHIVE_EXT)" "$(ARCHIVE_NAME)"
|
|
$(RM) "$(ARCHIVE_NAME)"
|