summaryrefslogtreecommitdiffstats
path: root/Algorithms/Part-II/3-BaseballElimination/Makefile
blob: 617e8244ff78050430c1b3b37d8165212c9ad4d3 (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

CC	= javac
ALGS4	= ../../algs4
BIN	= BaseballElimination
SRCS	= BaseballElimination.java
CLASSPATH	= -classpath '.:$(ALGS4)/algs4.jar:$(ALGS4)/stdlib.jar'

.SUFFIXES:
.SUFFIXES: .java .class
.PHONY: clean $(BIN)

.java.class:
	$(CC) -Xlint $(CLASSPATH) $<
	$(ALGS4)/bin/checkstyle $<

$(BIN): $(BIN).class

test: $(BIN)
	java $(CLASSPATH) $(BIN) ./data/teams4.txt
	java $(CLASSPATH) $(BIN) ./data/teams5.txt

zip: $(BIN)
	$(ALGS4)/bin/findbugs $(BIN).class
	rm -f *.zip
	zip baseball.zip $(SRCS)

clean:
	rm -f *.class *.zip check.sh $(BIN)