SRCMODULES = puzzle.cpp gameplay.cpp menu_callbacks.cpp solution_algorithm.cpp img_handler.cpp main.cpp OBJMODULES = $(SRCMODULES:.cpp=.o) CXX = g++ CXXFLAGS = -Wall -g -D DEBUG LIBS = -lfltk -lfltk_images all: main %.o: %.сpp $(CXX) $(CXXFLAGS) -c $< -I /usr/include/libpng16 -o $@ main: $(OBJMODULES) $(CXX) $^ $(LIBS) -o $@ ifneq (clean, $(MAKECMDGOALS)) -include deps.mk endif deps.mk: $(SRCMODULES) $(CC) -MM $^ > $@ clean: rm -f *.o main