diff options
author | Nao Pross <naopross@thearcway.org> | 2018-11-20 17:05:06 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-11-20 17:05:06 +0100 |
commit | 97f6b7ed1254d18676f9df8be6e0b88c02e414b1 (patch) | |
tree | f5cc4a065606b1ecc313f3812f081dbf48bc80ae | |
parent | Make x y members of Tile public (diff) | |
download | Subconscious-java-97f6b7ed1254d18676f9df8be6e0b88c02e414b1.tar.gz Subconscious-java-97f6b7ed1254d18676f9df8be6e0b88c02e414b1.zip |
Update makefile to allow debugging with jdb
-rw-r--r-- | Makefile | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -1,12 +1,27 @@ +# project classes configuration MAINCLASS := subconscious.Subconscious +SOURCES := $(shell find src -iname '*.java') +# java compiler configuraton JAVAC := javac JAVAC_ARGS := -Xlint:all \ -classpath lib/gson-2.6.2.jar:. \ -sourcepath src -SOURCES := $(shell find src -iname '*.java') +# java debugger configuration +JDB := jdb +JDB_ARGS := -attach jdbconn +USE_JDB := 0 + +# java runtime configuration +JAVA := java +JAVA_ARGS := -Dawt.useSystemAAFontSettings=on -cp ../lib/gson-2.6.2.jar:. +ifeq ($(USE_JDB),1) + JAVA_ARGS += -agentlib:jdwp=transport=dt_socket,server=y,suspend=n +endif + +# recipes .PHONY: all run pack classes dirs clean all: classes @@ -16,7 +31,7 @@ classes: .ONESHELL: run: classes cd build - java -Dawt.useSystemAAFontSettings=on -cp ../lib/gson-2.6.2.jar:. $(MAINCLASS) + $(JAVA) $(JAVA_ARGS) $(MAINCLASS) .ONESHELL: pack: classes @@ -34,9 +49,8 @@ pack: classes find . ! -name 'Subconcious.jar' -type f -exec rm -f {} + rm -R com META-INF - dirs: mkdir -p build clean: - rm -rd build
\ No newline at end of file + rm -rd build |