SOURCES=Triangle.java TriangleTest.java TESTS=TriangleTest #--------- JAVA=java JAVAC=javac CLASSPATH=.:/usr/local/junit3.8.1/junit.jar CLASSES=$(SOURCES:.java=.class) .PHONY=all clean test build all: build build: $(CLASSES) %.class: %.java $(JAVAC) -cp $(CLASSPATH) $< test: build $(JAVA) -cp $(CLASSPATH) junit.textui.TestRunner $(TESTS) clean: rm *.class