
export CLASSPATH := $(CLASSPATH):/usr/share/junit/lib/junit.jar

all: $(patsubst %.java,%.class,$(wildcard *.java))

%.class: %.java
	javac $^

.PHONY: javadoc
javadoc:
	-mkdir doc
	javadoc -d doc *.java

.PHONY: test
test: all
	java junit.swingui.TestRunner KnightsTourBoardTest

clean:
	-rm -f *.class
	-rm -rf doc
