| JDK_HOME := /opt/openjdk7 |
| JDK_JAVAC = $(JDK_HOME)/bin/javac |
| JDK_JAVAC_FLAGS += -source 1.6 -target 1.6 |
| JAR = $(JDK_HOME)/bin/jar |
| BUKKIT_CLASS_PATH := /opt/minecraft/cauldron-1.7.10-1.1206.01.175-server.jar |
| JACKSON_CLASS_PATH := /opt/jackson/jackson-core-2.9.10.jar:/opt/jackson/jackson-databind-2.9.10.8.jar |
| |
| CLASSES := \ |
| build/org/bukkit/configuration/file/YamlConfiguration.class \ |
| build/org/bukkit/configuration/file/YamlConfigurationOptions.class |
| |
| default: build bukkit-yaml-to-json.jar |
| |
| bukkit-yaml-to-json.jar: $(CLASSES) |
| cd build && $(JAR) -c $(patsubst build/%,%,$(subst $$,\$$,$^)) > ../$@ |
| |
| clean: |
| rm -f bukkit-yaml-to-json.jar $(subst $$,\$$,$(CLASSES)) |
| build: |
| mkdir $@ |
| |
| build/%.class: %.java |
| $(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath $(BUKKIT_CLASS_PATH):$(JACKSON_CLASS_PATH):build: -d build $< |
| |
| build/%$$*.class: %.java |