diff options
Diffstat (limited to 'i386/linux')
-rw-r--r-- | i386/linux/Makefile.in | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/i386/linux/Makefile.in b/i386/linux/Makefile.in index cdcabb3..80d008d 100644 --- a/i386/linux/Makefile.in +++ b/i386/linux/Makefile.in @@ -205,3 +205,28 @@ mostlyclean: distclean maintainer-clean: mostlyclean rm -f $(srcdir)/configure + + + +# +# Dependency generation +# + +# Include dependency files +ifneq ($(no_deps),t) + +# For each .o file we need a .d file. +-include $(subst .o,.d,$(filter %.o,$(linux-objs))) /dev/null + +endif + +# Generic rule for $(CC) based compilation for making dependencies +define make-deps +set -e; $(CC) $(CFLAGS) $(CPPFLAGS) -M -MG $< | \ + sed > $@.new -e 's/$*\.o:/$*.o $@:/' +mv -f $@.new $@ +endef + +%.d: %.c $(before-compile); $(make-deps) +%.d: %.S $(before-compile); $(make-deps) + |