# This is a makefile.  If you do not have an IDE, it is a nice way to 
# to automated the complicated process of compiling and linking
#
# Walker M. White
# February 6, 2015

# Variables.  In case we wanted to swap compilers
CC=c++
CCFLAGS=

# The main application.
# The command "make" by itself makes this, because it is first.
main: main.o a.o b.o
	$(CC) -o main main.o a.o b.o

# The object files (pre-linker)
main.o: main.cpp a.h b.h
	$(CC) -c main.cpp

a.o: a.cpp a.h
	$(CC) -c a.cpp

b.o: b.cpp b.h
	$(CC) -c b.cpp

# To clean up
clean:
	rm -rf *.o 

realclean: clean
	rm main
