# variables DEPEND_CFLAGS += -D__MAKEDEPEND__ DEPEND_CPPFLAGS += -D__MAKEDEPEND__ DEPEND_MK += $(addprefix .,$(addsuffix .dep.mk, $(OBJ))) ifeq ($(DEPEND_MK_INCLUDED),) # mandatory target behaviour all: ifneq ($(DEPEND_MK),) ifeq ($(MAKECMDGOALS),) -include $(DEPEND_MK) endif ifneq ($(filter all,$(MAKECMDGOALS)),) -include $(DEPEND_MK) endif endif clean: depclean my_depclean # convenience targets dep: $(DEPEND_MK) my_depclean: $(RM) -f .*.dep.mk # rules $(DEPEND_MK): $(PREREQ_DONE) %.o: .%.o.dep.mk endif # DEPEND_MK_INCLUDED DEPEND_MK_INCLUDED := true