From 426a0a26798ef5668e7c4419284f5529f30b97fb Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Fri, 25 Apr 2003 01:50:49 +0000 Subject: [PATCH] added some dependency generation to makefile --- comedi_calibrate/Makefile | 10 +++++++++- comedi_calibrate/cb64.c | 2 +- comedi_calibrate/comedi_calibrate.c | 2 +- comedi_calibrate/ni.c | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/comedi_calibrate/Makefile b/comedi_calibrate/Makefile index dfb2f83..0480a7d 100644 --- a/comedi_calibrate/Makefile +++ b/comedi_calibrate/Makefile @@ -2,7 +2,7 @@ include ../Config -CFLAGS += -I../include +CPPFLAGS += -I../include LDFLAGS += -L../lib/ -lcomedi -lm @@ -16,3 +16,11 @@ comedi_calibrate: $(objs) clean: -rm -f *.o $(BINS) + +#dependency stuff +%.d: %.c + set -e; $(CC) -MM $(CPPFLAGS) $< \ + | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \ + [ -s $@ ] || rm -f $@ + +include $(objs:.o=.d) diff --git a/comedi_calibrate/cb64.c b/comedi_calibrate/cb64.c index f0a4e32..b741dfa 100644 --- a/comedi_calibrate/cb64.c +++ b/comedi_calibrate/cb64.c @@ -22,7 +22,7 @@ #define _GNU_SOURCE #include -#include +#include "comedilib.h" #include #include #include diff --git a/comedi_calibrate/comedi_calibrate.c b/comedi_calibrate/comedi_calibrate.c index eefb297..469365c 100644 --- a/comedi_calibrate/comedi_calibrate.c +++ b/comedi_calibrate/comedi_calibrate.c @@ -33,7 +33,7 @@ #define _GNU_SOURCE #include -#include +#include "comedilib.h" #include #include #include diff --git a/comedi_calibrate/ni.c b/comedi_calibrate/ni.c index ebbf075..302164a 100644 --- a/comedi_calibrate/ni.c +++ b/comedi_calibrate/ni.c @@ -33,7 +33,7 @@ #define _GNU_SOURCE #include -#include +#include "comedilib.h" #include #include #include -- 2.26.2