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

CC=g++
CFLAGS=-g -Wall $(CROSS)
LFLAGS=$(CROSS)
OBJS=SortedList.o MergeTest.o ListReader.o

all:  MergeTest

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

# list of file dependencies
SortedList.o: SortedList.h Node.h ListReader.h
MergeTest.o:  SortedList.h Node.h ListReader.h
ListReader.o: SortedList.h Node.h ListReader.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