diff options
author | Antti-Juhani Kaijanaho <ajk@debian.org> | 2012-07-02 19:06:23 +0300 |
---|---|---|
committer | Antti-Juhani Kaijanaho <ajk@debian.org> | 2012-07-14 00:46:08 +0300 |
commit | 07d48880d55cb0ee39fa23085e4d8523e62a1fa8 (patch) | |
tree | 8222f4e3051d3d4843cdf8c2ce233459f8ec1f14 /GNUmakefile | |
parent | 6a1d34df52e73cfa3aea92af16f5c51ea41131f0 (diff) | |
download | dctrl-tools-07d48880d55cb0ee39fa23085e4d8523e62a1fa8.tar.gz |
GNUmakefile: Use gcc's -MD feature instead of calling gcc -M separately
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/GNUmakefile b/GNUmakefile index 0de0533..2723e8f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -133,13 +133,7 @@ join-dctrl/join-dctrl : join-dctrl/join-dctrl.o libdctrl.a $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) %.o : %.c - $(CC) $(ALL_CFLAGS) -c -o $@ $< - -%.d: %.c - $(CC) -M $(ALL_CFLAGS) $< > $@.$$$$; \ - sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ - rm -f $@.$$$$ - + $(CC) $(ALL_CFLAGS) -MD -MF $*.d -c -o $@ $< libdctrl.a : $(libobj) ar cr $@ $^ @@ -214,9 +208,5 @@ maintainer-clean : distclean tags : etags *.[hc] -ifeq ($(MAKECMDGOALS),clean) -else ifeq ($(MAKECMDGOALS),distclean) -else ifeq ($(MAKECMDGOALS),maintainer-clean) -else -include $(obj:.o=.d) -endif +-include $(obj:.o=.d) + |