summaryrefslogtreecommitdiffstats
path: root/Algorithms/Part-II/4-Boggle/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Algorithms/Part-II/4-Boggle/Makefile')
-rw-r--r--Algorithms/Part-II/4-Boggle/Makefile28
1 files changed, 22 insertions, 6 deletions
diff --git a/Algorithms/Part-II/4-Boggle/Makefile b/Algorithms/Part-II/4-Boggle/Makefile
index 0cd39c4..2a0c74b 100644
--- a/Algorithms/Part-II/4-Boggle/Makefile
+++ b/Algorithms/Part-II/4-Boggle/Makefile
@@ -2,7 +2,7 @@
CC = javac
ALGS4 = ../../algs4
BIN = BoggleSolver
-SRCS = BoggleSolver.java
+SRCS = BoggleSolver.java BoggleHybridTST.java
CLASSPATH = -classpath '.:$(ALGS4)/algs4.jar:$(ALGS4)/stdlib.jar'
.SUFFIXES:
@@ -11,7 +11,7 @@ CLASSPATH = -classpath '.:$(ALGS4)/algs4.jar:$(ALGS4)/stdlib.jar'
.java.class:
$(CC) -Xlint $(CLASSPATH) $<
- $(ALGS4)/bin/checkstyle $<
+ -$(ALGS4)/bin/checkstyle $<
BoggleBoard.class: BoggleBoard.java
$(CC) -Xlint $(CLASSPATH) $<
@@ -21,10 +21,26 @@ BoggleGame.class: BoggleGame.java
$(BIN): $(BIN).class
-test: $(BIN) BoggleBoard.class BoggleGame.class
- java $(CLASSPATH) $(BIN) ./data/dictionary-algs4.txt ./data/board-points4.txt
- java $(CLASSPATH) $(BIN) ./data/dictionary-algs4.txt ./data/board-points5.txt
- java $(CLASSPATH) $(BIN) ./data/dictionary-algs4.txt ./data/board-points200.txt
+test: $(BIN) BoggleHybridTST.class
+ -@rm out
+ java $(CLASSPATH) BoggleHybridTST ./data/dictionary-zingarelli2005.txt > out
+ java $(CLASSPATH) $(BIN) ./data/dictionary-algs4.txt ./data/board4x4.txt >> out
+ java $(CLASSPATH) $(BIN) ./data/dictionary-algs4.txt ./data/board-q.txt >> out
+ -@diff out ref && echo "SUCCESS" || echo "ERROR"
+
+timing: $(BIN) BoggleHybridTST.class BoggleSolverDicho.class
+ java $(CLASSPATH) $(BIN) timing
+ java $(CLASSPATH) BoggleSolverDicho timing
+
+game: $(BIN) BoggleBoard.class BoggleGame.class BoggleHybridTST.class
+ java $(CLASSPATH) BoggleGame
+
+dicho: BoggleSolverDicho.class
+ -@rm out
+ java $(CLASSPATH) BoggleHybridTST ./data/dictionary-zingarelli2005.txt > out
+ java $(CLASSPATH) BoggleSolverDicho ./data/dictionary-algs4.txt ./data/board4x4.txt >> out
+ java $(CLASSPATH) BoggleSolverDicho ./data/dictionary-algs4.txt ./data/board-q.txt >> out
+ -@diff out ref && echo "SUCCESS" || echo "ERROR"
zip: $(BIN)
$(ALGS4)/bin/findbugs $(BIN).class