blob: 2a0c74ba6c4617fc693d08f2dd426be79e49b219 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
CC = javac
ALGS4 = ../../algs4
BIN = BoggleSolver
SRCS = BoggleSolver.java BoggleHybridTST.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) 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
rm -f *.zip
zip boggle.zip $(SRCS)
clean:
rm -f *.class *.zip check.sh $(BIN)
|