diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 21 insertions, 13 deletions
@@ -1,14 +1,25 @@ -MAINCLASS := Subconscious -JAVAC_ARGS := -Xlint:all +MAINCLASS := subconscious.Subconscious -.PHONY: all run pack build dirs clean -all: build +JAVAC := javac +JAVAC_ARGS := -Xlint:all \ + -classpath lib/gson-2.6.2.jar:. \ + -sourcepath src -run: build - cd bin && java -Dawt.useSystemAAFontSettings=on -cp ../lib/gson-2.6.2.jar:. $(MAINCLASS) +SOURCES := $(shell find src -iname '*.java') + +.PHONY: all run pack classes dirs clean +all: classes + +classes: + $(JAVAC) $(JAVAC_ARGS) -d build $(SOURCES) .ONESHELL: -pack: build +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 @@ -22,13 +33,10 @@ pack: build 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 + mkdir -p build clean: - rm -R jar/* - rm bin/* + rm -rd build
\ No newline at end of file |