From da261a6895ae8d3a069eca0a5a543810d4762488 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Wed, 6 Jun 2018 21:51:32 +0100 Subject: [PATCH] Makefile: Generate and include dependency information for headers. Not that there are any right now, but it's the principle of the thing. --- .gitignore | 1 + Makefile | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 241f56a..aa06ea3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.tar.gz *.so *.o +*.d /COPYING /auto-version /noip diff --git a/Makefile b/Makefile index e6ddd66..4f07525 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ INST_BIN = $(INSTALL) -c -m755 MKDIRS = $(INSTALL) -d -m755 ## Probably best if you leave these alone. -REAL_CFLAGS = $(CFLAGS) -fPIC +REAL_CFLAGS = $(CFLAGS) -fPIC -MD REAL_LDFLAGS = $(LDFLAGS) -shared ###-------------------------------------------------------------------------- @@ -142,7 +142,7 @@ all:: $(TARGETS) .PHONY: ALL CLEAN += $(TARGETS) -CLEAN += *.o +CLEAN += *.o *.d clean:: rm -f $(CLEAN) .PHONY: clean @@ -160,6 +160,8 @@ $(SCRIPTS): %: withlib.in $(V_GEN)sed "s/@lib@/$@/" withlib.in >$@.new && \ chmod +x $@.new && mv $@.new $@ +-include $(patsubst %.c,%d,$(ALL_SOURCES)) + ###-------------------------------------------------------------------------- ### Installation. -- 2.11.0