| 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 |
| CLASS_PATH = ../java-config/config.jar |
| |
| BUKKIT_PLUGIN_CLASSES := \ |
| build/rivoreo/minecraft/toolbox/BukkitPlugin.class \ |
| build/rivoreo/minecraft/toolbox/BukkitListCommand.class \ |
| build/rivoreo/minecraft/toolbox/BukkitGiveCommand.class \ |
| build/rivoreo/minecraft/toolbox/BukkitGiveCommand$$SQLStatementTask.class |
| |
| default: build toolbox-bukkit.jar |
| |
| toolbox-bukkit.jar: build/COPYING $(BUKKIT_PLUGIN_CLASSES) build/plugin.yml build/META-INF/MANIFEST.MF |
| rm -f $@ |
| cd build && $(7Z) a -tzip ../$@ $(patsubst build/%,%,$(subst $$,\$$,$^)) |
| |
| clean: |
| rm -f toolbox-bukkit.jar build/COPYING $(subst $$,\$$,$(BUKKIT_PLUGIN_CLASSES)) build/plugin.yml |
| |
| build: |
| mkdir $@ |
| |
| build/rivoreo/minecraft/toolbox/Bukkit%.class: rivoreo/minecraft/toolbox/Bukkit%.java |
| $(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath $(BUKKIT_CLASS_PATH):$(CLASS_PATH):build: -d build $< |
| |
| build/%.class: %.java |
| $(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath $(CLASS_PATH):build -d build $< |
| |
| build/%$$*.class: %.java |
| |
| build/%.yml: %.yml |
| cp -p $< $@ |
| |
| build/COPYING: COPYING |
| cp -p $< $@ |
| |
| build/META-INF/MANIFEST.MF: |
| [ -d build/META-INF ] || mkdir -p build/META-INF |
| echo "Class-Path: libs/rivoreo.config.jar" > $@ |