CC=g++
CFLAGS=-g -Wall
OBJS=Magic.o Square.o

# rule for building the executable
Magic: $(OBJS)
	$(CC) -o Magic $(OBJS)

all:  Magic


# list of file dependencies
Magic.o: Magic.cpp Vector.h Vector.tcc BoundaryViolationException.h
Square.o: Square.cpp Square.h

# the following rule is used to compile .cpp files to .o
.cpp.o:
	$(CC) $(CFLAGS) -c $<


# the following removes all .o files, but leaves the executable
clean:
	rm -f *.o
