summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index bdb14d3..6029251 100644
--- a/Makefile
+++ b/Makefile
@@ -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