summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 1ad61a109e63cb8894d4b10cef392d62addd5ad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
MAINCLASS := Sub

run: build
	cd bin && java -Dawt.useSystemAAFontSettings=on -cp ../lib/gson-2.6.2.jar:. $(MAINCLASS)

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
	cd jar && rm META-INF -R
	cd jar && jar xf Sub.jar
	cd jar && rm gson-2.6.2.jar
	cd jar && rm Sub.jar
	cd jar && zip -r Subconcious.jar ./*
	cd jar && find . ! -name 'Subconcious.jar' -type f -exec rm -f {} +
	cd jar && rm -R com META-INF

build: dirs
	javac -cp lib/gson-2.6.2.jar:. -d bin/ src/*.java

dirs:
	mkdir -p src bin jar

clean:
	rm -R jar/*
	rm bin/*