# Rule for building a .o file from a .cpp source file -------
.SUFFIXES: .cpp
.cpp.o:
	g++ -c $(CXXFLAGS) $<

# Compile with debug option and all warnings on. ------------
CXXFLAGS = -g -Wall -O1

# Object modules comprising this application ----------------
OBJ = main.o linear.o tools.o 

# Target for this application -------------------------------
TARGET = multiple

$(TARGET): $(OBJ)
	g++  -o $(TARGET) $(CXXFLAGS) $(OBJ)

# Delete .o and exe files and force recompilation. ----------
clean:
	rm -f $(OBJ) $(TARGET)

# Dependencies ----------------------------------------------
linear.o: linear.cpp linear.hpp container.hpp item.hpp exam.hpp \
 ordered.hpp cell.hpp
main.o: main.cpp tools.hpp pqueue.hpp linear.hpp container.hpp item.hpp \
 exam.hpp ordered.hpp cell.hpp list.hpp
tools.o: tools.cpp tools.hpp
