Makefile - let objs depend on all headers
This commit is contained in:
parent
5281ceb0d6
commit
a3730b868c
1 changed files with 3 additions and 2 deletions
5
Makefile
5
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 $@ $^
|
||||
|
|
Loading…
Reference in a new issue