diff options
author | Nao Pross <naopross@thearcway.org> | 2018-11-19 13:11:43 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-11-19 13:11:43 +0100 |
commit | 2c176589c24093ae93ec45e8d208dce81c27a515 (patch) | |
tree | eba17e826ed3e159c03b2b4ccc269c1bae131693 /Makefile | |
parent | Set up CardLayout for GameWindow and Scene pause/resume (diff) | |
download | Subconscious-java-2c176589c24093ae93ec45e8d208dce81c27a515.tar.gz Subconscious-java-2c176589c24093ae93ec45e8d208dce81c27a515.zip |
Create java package for the project
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 |