jw-pkg/make/depend.mk
Jan Lindemann 5358a6ece7 depend.mk: Add convenience target dep
- Add convenience target dep
  - Code beautification
2009-06-06 14:29:32 +00:00

28 lines
498 B
Makefile

# variables
DEPEND_CFLAGS += -D__MAKEDEPEND__
DEPEND_CPPFLAGS += -D__MAKEDEPEND__
DEPEND_MK = $(addprefix .,$(addsuffix .dep.mk, $(OBJ)))
# 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