blob: bdb14d3c9b50612d6919c63abd73cdc9123010dc (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
MAINCLASS := subconscious.Subconscious
JAVAC := javac
JAVAC_ARGS := -Xlint:all \
-classpath lib/gson-2.6.2.jar:. \
-sourcepath src
SOURCES := $(shell find src -iname '*.java')
.PHONY: all run pack classes dirs clean
all: classes
classes:
$(JAVAC) $(JAVAC_ARGS) -d build $(SOURCES)
.ONESHELL:
run: classes
cd build
java -Dawt.useSystemAAFontSettings=on -cp ../lib/gson-2.6.2.jar:. $(MAINCLASS)
.ONESHELL:
pack: classes
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
dirs:
mkdir -p build
clean:
rm -rd build
|