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

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

# Build targets
TARGETS = multi

.PHONY: all clean
all: $(TARGETS)

multi: $(OBJ)
	$(CXX)  -o $@ $(CXXFLAGS) $(OBJ)

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

# 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