| 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 |
| |
| 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: $(SPONGE_PLUGIN_CLASSES) classes/mcmod.info |
| cd classes && $(JAR) -c $(patsubst classes/%,%,$(subst $$,\$$,$^)) > ../$@ |
| |
| snapshot-bukkit.jar: $(BUKKIT_PLUGIN_CLASSES) classes/plugin.yml |
| cd classes && $(JAR) -c $(patsubst classes/%,%,$(subst $$,\$$,$^)) > ../$@ |
| |
| clean: |
| rm -f snapshot-sponge.jar snapshot-bukkit.jar $(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) -source 1.7 -target 1.7 -classpath $(SPONGE_CLASS_PATH):$(CLASSPATH) -d classes $< |
| |
| classes/org/rivoreo/minecraft/snapshot/Bukkit%.class: org/rivoreo/minecraft/snapshot/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 $< $@ |