From: Frank Mori Hess Date: Fri, 25 Apr 2003 01:50:49 +0000 (+0000) Subject: added some dependency generation to makefile X-Git-Tag: r0_7_21~217 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=426a0a26798ef5668e7c4419284f5529f30b97fb;p=comedilib.git added some dependency generation to makefile --- 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