JAVAC=javac #JFLAGS=-classpath . JAVA_CMD=/usr/bin/java JAVA_FILES=$(wildcard *.java) CLASS_FILES=$(patsubst %.java,%.class,$(JAVA_FILES)) %.class : %.java $(JAVAC) $(JFLAGS) $< go: $(CLASS_FILES) $(JAVA_CMD) SimpleDraw clean: rm -f *.class