#### # This Makefile can be used to make a parser for the data and names files # # At the command prompt type: # 'make' or 'make all' compiles all *.java files that appear in the # list after 'all:' below # 'make run' executes HW0 with the appropriate arguments (see # line after 'HW0:' below # 'make clean' removes all generated *.class files. # ### ### # define the Java compiler and flags ### JC = javac FLAGS = -g # set default destination for class files ifndef CLASSDEST CLASSDEST = . endif ### # Here are the rules. ### all: HW0.java $(CLASSDEST)/HW0.class $(CLASSDEST)/%.class: %.java $(JC) $(FLAGS) -d $(CLASSDEST) $< run: java HW0 examples.names examples.data ### # clean up ### clean: rm -f $(CLASSDEST)/*.class