blob: 9588cad09e8c577050eac4cc05f4b5c0acd3f02d [file] [log] [blame] [raw]
JDK_HOME := /opt/java-se-7u75-ri
JDK_JAVAC = $(JDK_HOME)/bin/javac
#JDK_JAVAC_FLAGS = -source 1.7 -target 1.7
#JAR ?= $(JDK_HOME)/bin/jar
7Z ?= 7za
ASM_CLASS_PATH := /opt/minecraft/libraries/org/ow2/asm/asm/6.2/asm-6.2.jar:/opt/minecraft/libraries/org/ow2/asm/asm-tree/6.2/asm-tree-6.2.jar
MODLAUNCHER_CLASS_PATH := /opt/minecraft/libraries/cpw/mods/modlauncher/4.0.0/modlauncher-4.0.0.jar
CLASSES := \
build/rivoreo/minecraft/forgenonbrokenmod/TransformationService.class \
build/rivoreo/minecraft/forgenonbrokenmod/NewFMLTransformer.class
default: build forge-nonbroken-mod-modlauncher.jar
forge-nonbroken-mod-modlauncher.jar: build/COPYING $(CLASSES)
[ -d build/META-INF/services ] || mkdir -p build/META-INF/services
echo rivoreo.minecraft.forgenonbrokenmod.TransformationService > build/META-INF/services/cpw.mods.modlauncher.api.ITransformationService
rm -f $@
cd build && $(7Z) a -tzip ../$@ META-INF/services/cpw.mods.modlauncher.api.ITransformationService $(patsubst build/%,%,$(subst $$,\$$,$^))
clean:
rm -f forge-nonbroken-mod-modlauncher.jar build/META-INF/services/cpw.mods.modlauncher.api.ITransformationService build/COPYING $(subst $$,\$$,$(CLASSES))
build:
mkdir $@
build/%.class: %.java
$(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath :$(ASM_CLASS_PATH):$(MODLAUNCHER_CLASS_PATH) -d build $<
build/%$$*.class: %.java
build/COPYING: COPYING
cp -p $< $@