blob: 5ef424052de5a71563f4351708d1b754ca559614 [file] [log] [blame] [raw]
JDK7_HOME := /opt/jdk1.7.0_80
JDK7_JAVAC = $(JDK7_HOME)/bin/javac
#JDK8_HOME := /opt/jdk1.8.0_65
#JDK8_JAVAC = $(JDK8_HOME)/bin/javac
JAR = $(JDK7_HOME)/bin/jar
#SPONGE_CLASS_PATH = /opt/minecraft/sponge/spongeapi-7.1.0-shaded.jar
BUKKIT_CLASS_PATH = /opt/minecraft/forge-cauldron-1.7.10-1.1206.01.170-server.jar
BUKKIT_PLUGIN_CLASSES := \
classes/rivoreo/minecraft/worldmgr/BukkitPlugin.class
default: classes worldmgr-bukkit.jar
worldmgr-bukkit.jar: $(BUKKIT_PLUGIN_CLASSES) classes/plugin.yml
cd classes && $(JAR) -c $(patsubst classes/%,%,$(subst $$,\$$,$^)) > ../$@
clean:
rm -f worldmgr-bukkit.jar $(BUKKIT_PLUGIN_CLASSES) classes/plugin.yml
classes:
mkdir $@
classes/rivoreo/minecraft/worldmgr/Bukkit%.class: rivoreo/minecraft/worldmgr/Bukkit%.java
$(JDK7_JAVAC) -classpath $(BUKKIT_CLASS_PATH):$(CLASSPATH) -d classes $<
classes/%.class: %.java
$(JDK7_JAVAC) -d classes $<
classes/%$$*.class: %.java
classes/%.yml: %.yml
cp -p $< $@