added some dependency generation to makefile
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 25 Apr 2003 01:50:49 +0000 (01:50 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 25 Apr 2003 01:50:49 +0000 (01:50 +0000)
comedi_calibrate/Makefile
comedi_calibrate/cb64.c
comedi_calibrate/comedi_calibrate.c
comedi_calibrate/ni.c

index dfb2f8391aea017e55843216bf965cd73cc471b3..0480a7d8677761082cabf4d6abc8f544402cc860 100644 (file)
@@ -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)
index f0a4e328f08235babf21fb035e9e86b9b5548097..b741dfac1afa7a433e8f6b89d1fe920d33efff58 100644 (file)
@@ -22,7 +22,7 @@
 #define _GNU_SOURCE
 
 #include <stdio.h>
-#include <comedilib.h>
+#include "comedilib.h"
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
index eefb2970ce7dc47a1fa1fc2a2755cfccb223a63b..469365c766d4cafdccb666629181273fd6e9e3e0 100644 (file)
@@ -33,7 +33,7 @@
 #define _GNU_SOURCE
 
 #include <stdio.h>
-#include <comedilib.h>
+#include "comedilib.h"
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
index ebbf075c083d0cce7f6819046f569ff34ee4d527..302164a2a8f76288599f65b10783ec82970600c2 100644 (file)
@@ -33,7 +33,7 @@
 #define _GNU_SOURCE
 
 #include <stdio.h>
-#include <comedilib.h>
+#include "comedilib.h"
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>