From 2e0f10fe446c71d35b90bd015ab0041bb8734a05 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Fri, 25 Apr 2003 01:44:21 +0000 Subject: [PATCH] added some dependency file generation --- lib/Makefile | 11 ++++++++++- lib/buffer.c | 2 +- lib/calib.c | 2 +- lib/calib_yacc.y | 2 +- lib/cmd.c | 2 +- lib/comedi.c | 2 +- lib/data.c | 2 +- lib/dio.c | 2 +- lib/error.c | 2 +- lib/filler.c | 2 +- lib/get.c | 2 +- lib/ioctl.c | 2 +- lib/range.c | 2 +- lib/sv.c | 2 +- lib/timed.c | 2 +- lib/timer.c | 2 +- 16 files changed, 25 insertions(+), 16 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 4085a7a..b1496b0 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -2,7 +2,8 @@ include ../Config include ../version -CFLAGS += -fPIC -D_REENTRANT -I../include -I. +CPPFLAGS += -I../include -I. +CFLAGS += -fPIC -D_REENTRANT OBJS=comedi.o timer.o sv.o range.o ioctl.o filler.o timed.o error.o \ dio.o data.o get.o cmd.o buffer.o calib.o calib_lex.o calib_yacc.o @@ -24,3 +25,11 @@ calib_lex.c: calib_lex.l calib_yacc.h calib_yacc.c + calib_yacc.h: calib_yacc.y bison -d -y -p calib_yy -o calib_yacc.c calib_yacc.y + +#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/lib/buffer.c b/lib/buffer.c index 6e5a4d5..6296566 100644 --- a/lib/buffer.c +++ b/lib/buffer.c @@ -23,7 +23,7 @@ #include -#include +#include "libinternal.h" #include EXPORT_SYMBOL(comedi_set_buffer_size,0.7.18); diff --git a/lib/calib.c b/lib/calib.c index 566fd99..17bf628 100644 --- a/lib/calib.c +++ b/lib/calib.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include "libinternal.h" static int check_cal_file( comedi_t *dev, struct calibration_file_contents *parsed_file ) { diff --git a/lib/calib_yacc.y b/lib/calib_yacc.y index ef235b9..ca87382 100644 --- a/lib/calib_yacc.y +++ b/lib/calib_yacc.y @@ -3,7 +3,7 @@ lib/calib_yacc.y code for parsing calibration file, generated by bison - Copyright (C) 2003 Frank Mori Hess This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/lib/cmd.c b/lib/cmd.c index 88ed2aa..2f4edea 100644 --- a/lib/cmd.c +++ b/lib/cmd.c @@ -34,7 +34,7 @@ #include #include -#include +#include "libinternal.h" EXPORT_SYMBOL(comedi_get_cmd_src_mask,0.7.18); diff --git a/lib/comedi.c b/lib/comedi.c index 7c6a69e..b0c4d0c 100644 --- a/lib/comedi.c +++ b/lib/comedi.c @@ -33,7 +33,7 @@ #include #include -#include +#include "libinternal.h" INTERNAL int __comedi_init=0; diff --git a/lib/data.c b/lib/data.c index ea38fc6..cf26b8d 100644 --- a/lib/data.c +++ b/lib/data.c @@ -33,7 +33,7 @@ #include #include -#include +#include "libinternal.h" EXPORT_SYMBOL(comedi_data_write,0.7.18); diff --git a/lib/dio.c b/lib/dio.c index 37ddc89..963dfcf 100644 --- a/lib/dio.c +++ b/lib/dio.c @@ -32,7 +32,7 @@ #include #include -#include +#include "libinternal.h" EXPORT_SYMBOL(comedi_dio_config,0.7.18); diff --git a/lib/error.c b/lib/error.c index b8740de..88176bb 100644 --- a/lib/error.c +++ b/lib/error.c @@ -21,7 +21,7 @@ USA. */ -#include +#include "libinternal.h" #include #include diff --git a/lib/filler.c b/lib/filler.c index 498682e..fd304f1 100644 --- a/lib/filler.c +++ b/lib/filler.c @@ -33,7 +33,7 @@ #include #include -#include +#include "libinternal.h" /* these functions download information from the comedi module. */ diff --git a/lib/get.c b/lib/get.c index 6bcc236..c2aea26 100644 --- a/lib/get.c +++ b/lib/get.c @@ -33,7 +33,7 @@ #include #include -#include +#include "libinternal.h" EXPORT_SYMBOL(comedi_get_n_subdevices,0.7.18); diff --git a/lib/ioctl.c b/lib/ioctl.c index b0dd2f6..8c5fad8 100644 --- a/lib/ioctl.c +++ b/lib/ioctl.c @@ -33,7 +33,7 @@ #include #include -#include +#include "libinternal.h" /* ioctl wrappers */ diff --git a/lib/range.c b/lib/range.c index 4fdb611..fabd88d 100644 --- a/lib/range.c +++ b/lib/range.c @@ -36,7 +36,7 @@ #include #include -#include +#include "libinternal.h" /* sometimes we can't find a definition of NAN */ diff --git a/lib/sv.c b/lib/sv.c index 7d98e01..51a1ace 100644 --- a/lib/sv.c +++ b/lib/sv.c @@ -33,7 +33,7 @@ #include #include -#include +#include "libinternal.h" diff --git a/lib/timed.c b/lib/timed.c index befd5b8..b569b1d 100644 --- a/lib/timed.c +++ b/lib/timed.c @@ -21,7 +21,7 @@ USA. */ -#include +#include "libinternal.h" #include #include diff --git a/lib/timer.c b/lib/timer.c index 285cc98..3296301 100644 --- a/lib/timer.c +++ b/lib/timer.c @@ -33,7 +33,7 @@ #include #include -#include +#include "libinternal.h" -- 2.26.2