# Compile with debug option and all warnings on. ------------
CXXFLAGS = -g -Wall -O1 `pkg-config --cflags gtkmm-2.4`
LIBS = `pkg-config --libs gtkmm-2.4`

# Object modules comprising this application ----------------
OBJ = main.o canvas.o clock.o clockwin.o

# Build targets
TARGETS = clock

.PHONY: all clean
all: $(TARGETS)

clock: $(OBJ)
	$(CXX)  -o $@ $(OBJ) $(LIBS)

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

# Dependencies ----------------------------------------------
canvas.o: canvas.cpp canvas.hpp clock.hpp
clock.o: clock.cpp clock.hpp
clockwin.o: clockwin.cpp clockwin.hpp clock.hpp canvas.hpp
main.o: main.cpp clockwin.hpp clock.hpp canvas.hpp