From a3730b868cf4bec2ccd6bf42d4ca7d42705044aa Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Tue, 29 Aug 2023 23:18:51 +0200 Subject: [PATCH] Makefile - let objs depend on all headers --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b1ba8db..09f32c8 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ include Makeconf emu-objs := $(addsuffix .o,$(modules)) clean-objs := $(emu-objs) libemu.a vgbc vgbc.test test-srcs := $(wildcard tests/*.cpp) +headers := $(wildcard */*.h) .PHONY: all test clean @@ -14,8 +15,8 @@ clean: test: vgbc.test @./$< -%.o: %.cpp - g++ $(CXX_FLAGS) -c -o $@ $^ +%.o: %.cpp $(headers) + g++ $(CXX_FLAGS) -c -o $@ $< libemu.a: $(emu-objs) ar -rc $@ $^