| JDK_HOME := /opt/jdk1.7.0_80 |
| JDK_JAVAC = $(JDK_HOME)/bin/javac |
| JDK_JAVAC_FLAGS = -source 1.6 -target 1.6 -implicit:none |
| #JAR ?= $(JDK_HOME)/bin/jar |
| 7Z ?= 7za |
| |
| FML7_CLASS_PATH := /opt/minecraft/forge-1.7.10-10.13.2.1291-universal.jar |
| LAUNCHWRAPPER_CLASS_PATH := /opt/minecraft/libraries/net/minecraft/launchwrapper/1.11/launchwrapper-1.11.jar |
| ASM_CLASS_PATH := /opt/minecraft/libraries/org/ow2/asm/asm-all/5.0.3/asm-all-5.0.3.jar |
| |
| CLASSES := \ |
| build/rivoreo/minecraft/flansmodfix/FMLCoreMod.class \ |
| build/rivoreo/minecraft/flansmodfix/FlansModTransformer.class |
| |
| default: build flans-mod-fix-fml-7.jar |
| |
| flans-mod-fix-fml-7.jar: build/COPYING $(CLASSES) |
| [ -d build/META-INF ] || mkdir -p build/META-INF |
| printf 'Manifest-Version: 1.0\nFMLCorePlugin: rivoreo.minecraft.flansmodfix.FMLCoreMod\nFMLCorePluginContainsMod: false\n' > build/META-INF/MANIFEST.MF |
| rm -f $@ |
| cd build && $(7Z) a -tzip ../$@ META-INF/MANIFEST.MF $(patsubst build/%,%,$(subst $$,\$$,$^)) |
| |
| clean: |
| rm -f flans-mod-fix-fml-7.jar build/META-INF/MANIFEST.MF build/COPYING $(subst $$,\$$,$(CLASSES)) |
| |
| build: |
| mkdir $@ |
| |
| build/%.class: %.java |
| $(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath :$(FML7_CLASS_PATH):$(ASM_CLASS_PATH):$(LAUNCHWRAPPER_CLASS_PATH) -d build $< |
| |
| build/%$$*.class: %.java |
| |
| build/COPYING: COPYING |
| cp -p $< $@ |