blob: d273db6b29d63973be2a289bf716c0071b6b7ad4 [file] [log] [blame] [raw]
JDK7_HOME := /opt/jdk1.7.0_80
JDK7_JAVAC = $(JDK7_HOME)/bin/javac
JDK7_JAVAC_FLAGS = -source 1.6 -target 1.6 -implicit:none
JDK8_HOME := /opt/jdk1.8.0_65
JDK8_JAVAC = $(JDK8_HOME)/bin/javac
JDK8_JAVAC_FLAGS = -source 1.7 -target 1.7 -implicit:none
JAR = $(JDK7_HOME)/bin/jar
#CLASS_PATH =
#SPONGE_CLASS_PATH = /opt/minecraft/sponge/spongeapi-7.1.0-shaded.jar
SPONGE_CLASS_PATH = /opt/minecraft/sponge/spongeapi-6.1.0-20170814.171949-4-shaded.jar
BUKKIT_CLASS_PATH = /opt/minecraft/cauldron-1.7.10-1.1206.01.175-server.jar
SPONGE_PLUGIN_CLASSES := \
classes/org/rivoreo/minecraft/snapshot/Snapshot.class \
classes/org/rivoreo/minecraft/snapshot/ZFSSnapshot.class \
classes/org/rivoreo/minecraft/snapshot/SpongePlugin.class \
classes/org/rivoreo/minecraft/snapshot/SpongePlugin$$1.class \
classes/org/rivoreo/minecraft/snapshot/SpongePlugin$$2.class \
classes/org/rivoreo/minecraft/snapshot/SpongePlugin$$3.class \
classes/org/rivoreo/minecraft/snapshot/SpongePlugin$$4.class
BUKKIT_PLUGIN_CLASSES := \
classes/org/rivoreo/minecraft/snapshot/Snapshot.class \
classes/org/rivoreo/minecraft/snapshot/ZFSSnapshot.class \
classes/org/rivoreo/minecraft/snapshot/BukkitPlugin.class
default: classes snapshot-sponge.jar snapshot-bukkit.jar
snapshot-sponge.jar: classes/COPYING $(SPONGE_PLUGIN_CLASSES) classes/mcmod.info
cd classes && $(JAR) -c $(patsubst classes/%,%,$(subst $$,\$$,$^)) > ../$@
snapshot-bukkit.jar: classes/COPYING $(BUKKIT_PLUGIN_CLASSES) classes/plugin.yml
cd classes && $(JAR) -c $(patsubst classes/%,%,$(subst $$,\$$,$^)) > ../$@
clean:
rm -f snapshot-sponge.jar snapshot-bukkit.jar classes/COPYING $(SPONGE_PLUGIN_CLASSES) $(BUKKIT_PLUGIN_CLASSES) classes/mcmod.info classes/plugin.yml
classes:
mkdir $@
classes/org/rivoreo/minecraft/snapshot/Sponge%.class: org/rivoreo/minecraft/snapshot/Sponge%.java
$(JDK8_JAVAC) $(JDK8_JAVAC_FLAGS) -classpath $(SPONGE_CLASS_PATH):$(CLASS_PATH) -d classes $<
classes/org/rivoreo/minecraft/snapshot/Bukkit%.class: org/rivoreo/minecraft/snapshot/Bukkit%.java
$(JDK7_JAVAC) $(JDK7_JAVAC_FLAGS) -classpath $(BUKKIT_CLASS_PATH):$(CLASS_PATH) -d classes $<
classes/%.class: %.java
$(JDK7_JAVAC) $(JDK7_JAVAC_FLAGS) -d classes $<
classes/%$$*.class: %.java
classes/%.yml: %.yml
cp -p $< $@
classes/COPYING: COPYING
cp -p $< $@