CC=g++
CFLAGS=-g -Wall
OBJS=SortedList.o MergeTest.o ListReader.o

all:  MergeTest

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

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