Makefile - Handle .d files correctly
This commit is contained in:
parent
9ca6c84043
commit
720a9b4609
1 changed files with 9 additions and 2 deletions
11
Makefile
11
Makefile
|
@ -1,10 +1,17 @@
|
|||
.DEFAULT_GOAL: all
|
||||
|
||||
include Makeconf
|
||||
|
||||
# Auto tracking of headers
|
||||
CXX_FLAGS += -MMD
|
||||
depfiles := $(wildcard *.d **/*.d)
|
||||
|
||||
clean-objs := $(TARGETS) $(foreach t,$(TARGETS),$(modules_$(t))) $(depfiles)
|
||||
all-modules := $(foreach t,$(TARGETS),$(modules_$(t)))
|
||||
|
||||
depfiles := $(patsubst %.o,%.d,$(filter %.o,$(all-modules)))
|
||||
|
||||
-include $(depfiles)
|
||||
|
||||
clean-objs := $(TARGETS) $(all-modules) $(depfiles)
|
||||
cmd = $(VERBOSE)g++ $(CXX_FLAGS) -o $@ $^
|
||||
msg = $(or $(verb_$@),finalize) $@
|
||||
|
||||
|
|
Loading…
Reference in a new issue