blob: 5127689b82737aedebe8a71f8cffddf846f75e64 [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 -implicit:none -Xlint:deprecation
#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/cauldronrmguava10/FMLCoreMod.class \
build/rivoreo/minecraft/cauldronrmguava10/CauldronRemoveGuava10Transformer.class
default: build cauldron-remove-guava10.jar
cauldron-remove-guava10.jar: $(CLASSES)
[ -d build/META-INF ] || mkdir -p build/META-INF
printf 'Manifest-Version: 1.0\nFMLCorePlugin: rivoreo.minecraft.cauldronrmguava10.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 cauldron-remove-guava10.jar build/META-INF/MANIFEST.MF $(subst $$,\$$,$(CLASSES))
build:
mkdir $@
build/rivoreo/minecraft/cauldronrmguava10/FML%.class: rivoreo/minecraft/cauldronrmguava10/FML%.java
$(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath build::$(FML7_CLASS_PATH) -d build $<
build/%.class: %.java
$(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath build::$(ASM_CLASS_PATH):$(LAUNCHWRAPPER_CLASS_PATH) -d build $<
build/%$$*.class: %.java