summaryrefslogtreecommitdiffstats
path: root/Algorithms/Part-II/4-Boggle/Makefile
blob: 0cd39c45abf3b11c699d7dbb52c9a58e4be04004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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)