depend.mk, rules.mk: Fix dependency checking

Fix dependency checking, create seperate depfiles for every object
file.
This commit is contained in:
Jan Lindemann 2006-03-04 13:41:35 +00:00 committed by Jan Lindemann
commit 5447b4cdb4
2 changed files with 23 additions and 8 deletions

View file

@ -187,12 +187,16 @@ endif
#depend.mk: $(SRC_ALL_CPP)
# > $@ && makedepend -f depend.mk -- $(CPPFLAGS) $(DEPEND_CPPFLAGS) -- $(SRC_ALL_CPP) 2>&1 | sed '/non-portable whitespace/ d'
depend.mk: $(filter-out %.h, $(SRC_ALL_CPP) $(PREREQ_DONE))
> $@ && if [ "$(wildcard *.cpp *.c)" ]; then \
gcc -M $(CPPFLAGS) $(DEPEND_CPPFLAGS) $(filter-out %.h,$(SRC_ALL_CPP)) -o $@; \
fi
#depend.mk: $(filter-out %.h, $(SRC_ALL_CPP) $(PREREQ_DONE))
# > $@ && if [ "$(wildcard *.cpp *.c)" ]; then \
# gcc -M $(CPPFLAGS) $(DEPEND_CPPFLAGS) $(filter-out %.h,$(SRC_ALL_CPP)) -o $@; \
# fi
depend: depend.mk
.%.o.dep.mk: %.cpp
gcc -M $(CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
.%.o.dep.mk: %.c
gcc -M $(CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
checkroot:
@if [ "$(CHECK_ROOT)" = true -o "$(CHECK_ROOT)" = TRUE ] ; then \