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/Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/Algorithms/Part-II/4-Boggle/Makefile b/Algorithms/Part-II/4-Boggle/Makefile
new file mode 100644
index 0000000..0cd39c4
--- /dev/null
+++ b/Algorithms/Part-II/4-Boggle/Makefile
@@ -0,0 +1,35 @@
+
+CC = javac
+ALGS4 = ../../algs4
+BIN = BoggleSolver
+SRCS = BoggleSolver.java
+CLASSPATH = -classpath '.:$(ALGS4)/algs4.jar:$(ALGS4)/stdlib.jar'
+
+.SUFFIXES:
+.SUFFIXES: .java .class
+.PHONY: clean $(BIN)
+
+.java.class:
+ $(CC) -Xlint $(CLASSPATH) $<
+ $(ALGS4)/bin/checkstyle $<
+
+BoggleBoard.class: BoggleBoard.java
+ $(CC) -Xlint $(CLASSPATH) $<
+
+BoggleGame.class: BoggleGame.java
+ $(CC) -nowarn $(CLASSPATH) $<
+
+$(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
+
+zip: $(BIN)
+ $(ALGS4)/bin/findbugs $(BIN).class
+ rm -f *.zip
+ zip boggle.zip $(SRCS)
+
+clean:
+ rm -f *.class *.zip check.sh $(BIN)