blob: 92a72eb5f9eb34bd3ff361ffb73da3f8348a7a93 [file] [log] [blame] [raw]
JDK_HOME := /opt/jdk1.7.0_80
JDK_JAVAC = $(JDK_HOME)/bin/javac
JDK_JAVAC_FLAGS = -source 1.6 -target 1.6
#JAR = $(JDK_HOME)/bin/jar
7Z ?= 7za
#BUKKIT_CLASS_PATH = /opt/minecraft/cauldron-1.7.10-1.1206.01.175-server.jar
BUKKIT_CLASS_PATH = /opt/bukkit/bukkit-1.7.10-R0.1-20140817.175650-8.jar
BUKKIT_PLUGIN_CLASSES := \
build/rivoreo/bukkit/timeformat/BukkitPlugin.class \
build/rivoreo/util/DateTimeFormatHelper.class
default: build 24-hour-time-format-bukkit.jar
24-hour-time-format-bukkit.jar: build/COPYING $(BUKKIT_PLUGIN_CLASSES) build/plugin.yml
rm -f $@
cd build && $(7Z) a -tzip ../$@ $(patsubst build/%,%,$(subst $$,\$$,$^))
clean:
rm -f 24-hour-time-format-bukkit.jar build/COPYING $(subst $$,\$$,$(BUKKIT_PLUGIN_CLASSES)) build/plugin.yml
build:
mkdir $@
build/%.class: %.java
$(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath $(BUKKIT_CLASS_PATH):$(CLASS_PATH):build -d build $<
build/%$$*.class: %.java
build/%.yml: %.yml
cp -p $< $@
build/COPYING: COPYING
cp -p $< $@