# 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=-std=c++11

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

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

point.o: point.cpp point.h
	$(CC) $(CCFLAGS) -c point.cpp

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

realclean: clean
	rm main
