# Sample makefile for ex1 
# John Black, ECS 110, Spring 97
#
# the -g flag is for symbolic debugging (which you should have learned in
# ECS 40...)

# list of object files
OBJS = ex1.o main.o

# these next 4 lines tell make how to get .o files from .cpp source files
.SUFFIXES: .cpp

.cpp.o: 
	g++ -Wall -g -c $*.cpp

# this says the executable is dependent on the .o files and explains how
# to relink a new executable from objects
ex1:	$(OBJS) 
	g++ $(OBJS) -o ex1 -g

# now list header dependencies; in this case both objects depend on the
# header file
$(OBJS): ex1.h

# make clean is a standard way to remove extra junk (like .o files)
clean:
	rm -f $(OBJS)
