# # Makefile for P1 # # Instructions: # # 1. At the UNIX prompt, type 'touch Makefile.dep' # 2. Add source files to the line beginning with SRCS = main.cc. # 3. To build the dependency list, type 'make depend'. You'll need to # do this whenever you add a source file. # 4. To build the project, type 'make'. # 5. To start over, type 'make clean', which does not clean the # dependency list. # CC = g++ CFLAGS = -Wall -O SRCS = main.cc cow.cc OBJS = ${SRCS:.cc=.o} a.out: $(OBJS) $(CC) $(CFLAGS) $(OBJS) $(OBJS): $(SRCS) $(CC) $(CFLAGS) -c $*.cc depend: $(CC) -MM $(SRCS) > Makefile.dep clean: rm -f $(OBJS) veryclean: clean rm -f $(OBJS) a.out core include Makefile.dep