2016-09-30 19:33:16 +00:00
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
|
|
PROJECT_NAME = CannonDisplay
|
|
|
|
SRC_DIR = src
|
|
|
|
BUILD_DIR = build
|
|
|
|
CLASSES_DIR = $(BUILD_DIR)/classes
|
|
|
|
JAR_DIR = dist
|
|
|
|
MAIN_CLASS = CannonDisplay
|
|
|
|
|
|
|
|
all: jar
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
rm -f manifest
|
|
|
|
|
|
|
|
spotless: clean
|
|
|
|
rm -rf dist
|
|
|
|
|
|
|
|
$(CLASSES_DIR):
|
|
|
|
@ mkdir -p $(CLASSES_DIR)
|
|
|
|
|
|
|
|
compile: | $(CLASSES_DIR)
|
|
|
|
javac -sourcepath $(SRC_DIR) -d $(CLASSES_DIR) $(SRC_DIR)/CannonDisplay.java
|
|
|
|
|
|
|
|
manifest:
|
|
|
|
@ echo "Main-Class: $(MAIN_CLASS)" > $@
|
|
|
|
|
|
|
|
$(JAR_DIR):
|
|
|
|
@ mkdir -p $(JAR_DIR)
|
|
|
|
|
|
|
|
jar: compile manifest | $(JAR_DIR)
|
2018-01-23 17:44:48 +00:00
|
|
|
jar cvfm $(JAR_DIR)/$(PROJECT_NAME).jar manifest -C $(CLASSES_DIR) . -C resources .
|
2016-09-30 19:33:16 +00:00
|
|
|
@ echo "-------------------------------------------------------------------------------"
|
|
|
|
@ echo " BUILD COMPLETE"
|
|
|
|
@ echo "The Java jar file (the Java Executable) is located at: $(JAR_DIR)/$(PROJECT_NAME).jar"
|
|
|
|
@ echo "-------------------------------------------------------------------------------"
|