MAINCLASS := Sub JAVAC_ARGS := -Xlint:all .PHONY: all run pack build dirs clean all: build run: build cd bin && java -Dawt.useSystemAAFontSettings=on -cp ../lib/gson-2.6.2.jar:. $(MAINCLASS) .ONESHELL: pack: build echo "Main-Class: $(MAINCLASS)" > jar/manifest.txt jar cvfm jar/$(MAINCLASS).jar jar/manifest.txt -C bin/ . rm jar/manifest.txt cp lib/gson-2.6.2.jar jar/ cd jar jar xf gson-2.6.2.jar rm META-INF -R jar xf Sub.jar rm gson-2.6.2.jar rm Sub.jar zip -r Subconcious.jar ./* find . ! -name 'Subconcious.jar' -type f -exec rm -f {} + rm -R com META-INF build: dirs javac $(JAVAC_ARGS) -cp lib/gson-2.6.2.jar:. -d bin/ src/*.java dirs: mkdir -p src bin jar clean: rm -R jar/* rm bin/*