added some dependency file generation
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 25 Apr 2003 01:44:21 +0000 (01:44 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 25 Apr 2003 01:44:21 +0000 (01:44 +0000)
16 files changed:
lib/Makefile
lib/buffer.c
lib/calib.c
lib/calib_yacc.y
lib/cmd.c
lib/comedi.c
lib/data.c
lib/dio.c
lib/error.c
lib/filler.c
lib/get.c
lib/ioctl.c
lib/range.c
lib/sv.c
lib/timed.c
lib/timer.c

index 4085a7af0cd9f174bad8e20aec387f0ffd891392..b1496b076ef3cd29b8829e0f32b42f83707c7f83 100644 (file)
@@ -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)
index 6e5a4d5d0b3176cca840fb30d52eee2f615c55bd..629656602509f29e73fba1a538171774b54bce61 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <comedi.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 #include <string.h>
 
 EXPORT_SYMBOL(comedi_set_buffer_size,0.7.18);
index 566fd99b8c140ffae95caa33cd9e7d68651dbf60..17bf62834df9de2fa7aa2b89e799c6cd2531c83d 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <comedilib.h>
-#include <libinternal.h>
+#include "libinternal.h"
 
 static int check_cal_file( comedi_t *dev, struct calibration_file_contents *parsed_file )
 {
index ef235b97febf34812fc61ea47ed5a4da5c9d234a..ca87382e07ecc0ed544fd7ec321f3b370b86e188 100644 (file)
@@ -3,7 +3,7 @@
     lib/calib_yacc.y
     code for parsing calibration file, generated by bison
 
-    Copyright (C) 2003 Frank Mori Hess <fmhess@users.sourceforge.net
+    Copyright (C) 2003 Frank Mori Hess <fmhess@users.sourceforge.net>
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Lesser General Public
index 88ed2aaa99869ce0658846c15dbc99dbafcc1cb9..2f4edeac73ce18390e5c42efd3c993e2ea54936f 100644 (file)
--- a/lib/cmd.c
+++ b/lib/cmd.c
@@ -34,7 +34,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 
 EXPORT_SYMBOL(comedi_get_cmd_src_mask,0.7.18);
index 7c6a69e9f544f33b7c3d27e4252d9900328a2166..b0c4d0caf6ae6a4cd50a8f09c06c81ba56bf1b36 100644 (file)
@@ -33,7 +33,7 @@
 #include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 INTERNAL int __comedi_init=0;
 
index ea38fc6c19201d7f0319a0cfef795308f7bced2c..cf26b8daefcdad35a3d7910dadba583662664bd3 100644 (file)
@@ -33,7 +33,7 @@
 #include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 
 EXPORT_SYMBOL(comedi_data_write,0.7.18);
index 37ddc8921b44bebff3a32b21dc9ff0db8a5d58fa..963dfcfc7466d3ef402176668ea3aebc6645642a 100644 (file)
--- a/lib/dio.c
+++ b/lib/dio.c
@@ -32,7 +32,7 @@
 #include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 
 EXPORT_SYMBOL(comedi_dio_config,0.7.18);
index b8740debc3b3db937006a93f75f006e2a7485ec6..88176bb622f58ca3b9472755adaf950796ba2b93 100644 (file)
@@ -21,7 +21,7 @@
     USA.
 */
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 #include <stdio.h>
 #include <string.h>
index 498682edf57c2cebacccecbdb212d3643269947d..fd304f1ba6ce6cbeec5731e3c88ff668bb316b33 100644 (file)
@@ -33,7 +33,7 @@
 #include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 
 /* these functions download information from the comedi module. */
index 6bcc2365ce540b93514b2d92c7c220f54e4aee90..c2aea26e82e32957f3e5717bea58d6f29f23adcb 100644 (file)
--- a/lib/get.c
+++ b/lib/get.c
@@ -33,7 +33,7 @@
 #include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 
 EXPORT_SYMBOL(comedi_get_n_subdevices,0.7.18);
index b0dd2f6b0553dd46b91941470ea6e30050a4ee15..8c5fad8cc4431b9a1c48d3062826cfb43d2bac0c 100644 (file)
@@ -33,7 +33,7 @@
 #include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 
 /* ioctl wrappers */
index 4fdb61157fb69bf625c6a52fda151b95954f6754..fabd88d79d8a1aac5eef1e9acc4e45961755d26b 100644 (file)
@@ -36,7 +36,7 @@
 #include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 
 /* sometimes we can't find a definition of NAN */
index 7d98e01c26aeec5f44ee223dff470b600e3c03ff..51a1ace1a03756ae6d05a5d56da5b0e84de85da3 100644 (file)
--- a/lib/sv.c
+++ b/lib/sv.c
@@ -33,7 +33,7 @@
 #include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 
 
index befd5b8a2d7a0679c1b93b26af847cf2759befdb..b569b1d88df50aad328d3258c9cc0bea3e3e8b3b 100644 (file)
@@ -21,7 +21,7 @@
     USA.
 */
 
-#include <libinternal.h>
+#include "libinternal.h"
 
 #include <stdio.h>
 #include <math.h>
index 285cc98c7b578aae9c404bb47432ad8dcf8da88b..3296301554431f623e0405643e59df7b70d61f36 100644 (file)
@@ -33,7 +33,7 @@
 #include <comedi.h>
 #include <string.h>
 
-#include <libinternal.h>
+#include "libinternal.h"