blob: a6520e47a8393c3b0b9bf198c046e6967eee9833 [file] [log] [blame] [raw]
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
MINECRAFTFORGE_CLASS_PATH := /opt/minecraft/forge-1.7.10-10.13.2.1291-universal.jar:/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/monospacefont/FMLCoreMod.class \
build/rivoreo/minecraft/monospacefont/MonospaceFontTransformer.class
default: build monospace-font.jar
monospace-font.jar: build/META-INF/MANIFEST.MF $(CLASSES)
cd build && $(7Z) a -tzip ../$@ $(patsubst build/%,%,$(subst $$,\$$,$^))
clean:
rm -f monospace-font.jar $(subst $$,\$$,$(CLASSES))
build:
mkdir $@
build/%.class: %.java
$(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath :$(ASM_CLASS_PATH):$(MINECRAFTFORGE_CLASS_PATH) -d build $<
build/%$$*.class: %.java
build/%.info: %.info
cp -p $< $@
build/META-INF/MANIFEST.MF:
[ -d build/META-INF ] || mkdir -p build/META-INF
printf 'Manifest-Version: 1.0\nFMLCorePlugin: rivoreo.minecraft.monospacefont.FMLCoreMod\nFMLCorePluginContainsMod: false\n' > $@