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 $@ $^