From: Nils Forssén Date: Thu, 9 Nov 2023 15:59:28 +0000 (+0100) Subject: Update makefile X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=1f9faa8100c2b62bcddd2738d8b926653abcdfe6;p=TDDC76_proj.git Update makefile --- 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: