summaryrefslogtreecommitdiff
path: root/chapter20/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'chapter20/Makefile')
-rw-r--r--chapter20/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/chapter20/Makefile b/chapter20/Makefile
index 4c1e1f49..f96cfea3 100644
--- a/chapter20/Makefile
+++ b/chapter20/Makefile
@@ -53,7 +53,7 @@ endif
default: $(default_targets)
# Compile just the out-of-date files
-$(main_classes): build/classes/main/%class: $(SRC)/%java
+$(main_classes): $(CLZDIR)/main/%class: $(SRC)/%java
@echo "compiling " $@ " because " $?
@[ -d $(CLZDIR)/main ] || mkdir -p $(CLZDIR)/main
@javac $(JAVAC_ARGS) -cp "$(CLZDIR)/main$(SEP)$(jars)" -sourcepath $(SRC) -d $(CLZDIR)/main $(main_javas)
@@ -64,7 +64,7 @@ $(test_classes): $(CLZDIR)/test/%class: $(TST)/%java $(main_classes)
@javac $(JAVAC_ARGS) -cp "$(CLZDIR)/test$(SEP)$(CLZDIR)/main$(SEP)$(jars)" -sourcepath $(TST) -d $(CLZDIR)/test $(test_javas)
# Base launch line for JVM tests
-JVM=nice java -ea -cp "build/classes/main${SEP}${jars}${SEP}$(CLZDIR)/test"
+JVM=nice java -ea -cp "$(CLZDIR)/main${SEP}${jars}${SEP}$(CLZDIR)/test"
tests: $(default_targets)
@echo "testing " $(test_cp)
@@ -75,6 +75,14 @@ fuzzer: $(default_targets)
@echo "fuzzing " $(test_cp)
@$(JVM) org.junit.runner.JUnitCore com.seaofnodes.simple.FuzzerWrap
+# Build a Simple jar
+release: build/release/simple.jar
+
+# Build a Simple jar
+build/release/simple.jar: $(main_classes) $(test_classes)
+ @echo "jarring " $@ " because " $?
+ @[ -d $(dir $@) ] || mkdir -p $(dir $@)
+ @jar cf build/release/simple.jar -C $(CLZDIR)/main . -C $(CLZDIR)/test . -C $(SRC)/$(SIMPLE) . -C $(TST)/$(SIMPLE) .
# Launch viewer
view: $(main_classes)