summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-07-29 22:42:31 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-07-29 22:42:31 +0000
commitcb744dc1da56a63be2f0adceede26b4e9badeabb (patch)
treeec9adc40cec5c07ea4515280dc8d8561e483d914 /Makefile
parenteaf2adbe3147264be464b844996e98a370db48e6 (diff)
add dependency tracking
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4634 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 557b9ba..e8fecc5 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,10 @@ CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_x86_64)
ROOT_PREFIX=
-CFLAGS+=$(DAHDI_INCLUDE)
+# extra cflags to build dependencies. Recursively expanded.
+MAKE_DEPS= -MD -MT $@ -MF .$(subst /,_,$@).d -MP
+
+CFLAGS+=$(DAHDI_INCLUDE) $(MAKE_DEPS)
CHKCONFIG := $(wildcard /sbin/chkconfig)
UPDATE_RCD := $(wildcard /usr/sbin/update-rc.d)
@@ -350,3 +353,7 @@ menuselect-tree: dahdi.xml
@build_tools/make_tree > $@
.PHONY: menuselect distclean dist-clean clean version.h all _all install programs tests devel data config update install-programs install-libs install-utils-subdirs utils-subdirs
+
+ifneq ($(wildcard .*.d),)
+ include .*.d
+endif