From 1f9faa8100c2b62bcddd2738d8b926653abcdfe6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nils=20Forss=C3=A9n?= Date: Thu, 9 Nov 2023 16:59:28 +0100 Subject: [PATCH] Update makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 799827b..bd5e408 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ EXE := $(EXEDIR)/game.out TEST := $(EXEDIR)/test.out SRC := $(shell find src -type f -name '[^_]*.cc') +SRC_H := $(shell find src -type f -name '[^_]*.h') OBJECTS := $(addprefix $(OBJDIR)/, $(SRC:src/%.cc=%.o) ) vpath %.cc src @@ -32,7 +33,7 @@ game-target: $(OBJDIR)/_main.o $(OBJECTS) test-target: $(OBJDIR)/_test.o $(OBJECTS) $(CC) $(LDFLAGS) $^ -o $(TEST) $(LDFLAGS) -$(OBJDIR)/%.o: %.cc +$(OBJDIR)/%.o: %.cc $(SRC_H) $(CC) $(CCFLAGS) -c -o $@ $< run: -- 2.30.2