# on turing, use next line;  on other platforms use following
CROSS=-m32
#CROSS=

CC=g++
CFLAGS=-g -Wall $(CROSS)
LFLAGS=$(CROSS)
OBJS=Square.o Magic.o 

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

default:  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
