# # A simple Makefile that compiles the first homework assignment. # # Rules are of the form: # target : prerequisites # command # command # # Remember to always start a command with a tab. # # directory where the source files are, and into which we # are commpiling PDIR = $(HOME)/cs1007/hw1/edu/columbia/cs/cs1007/banking # define the compiler and the compiler flags variables # JC = javac JFLAGS = # tell make that we'll be working with java and class files # .SUFFIXES: .java .class # tell make how to create class files .java.class: $(JC) $(JFLAGS) $< # a convenience macro that lists all class files # that we'll want to produce CLASSES = \ $(PDIR)/Bank.class \ $(PDIR)/Address.class \ $(PDIR)/Person.class \ $(PDIR)/Transaction.class \ $(PDIR)/BankAccount.class # rule to generate all class files all: $(CLASSES) # rule to clean up clean: rm $(PDIR)/*.class