Added more conditional compile switches

Mon, 05 May 2014 10:33:26 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 05 May 2014 10:33:26 +0200
changeset 23
d820a6f3ec16
parent 22
a3b058c67289
child 24
873786a20a61

Added more conditional compile switches

rc433/recv.c file | annotate | diff | comparison | revisions
rc433/send.c file | annotate | diff | comparison | revisions
rc433/sniffer.c file | annotate | diff | comparison | revisions
--- a/rc433/recv.c	Sun May 04 22:29:18 2014 +0200
+++ b/rc433/recv.c	Mon May 05 10:33:26 2014 +0200
@@ -24,6 +24,8 @@
 #include "recv.h"
 
 
+#ifdef HAVE_WIRINGPI_H
+
 int main(int argc, char *argv[]) {
     
     /*
@@ -61,3 +63,12 @@
     return 0;
 }
 
+#else
+
+int main(int argc, char *argv[]) {
+    fprintf(stderr, "This program does nothing without the wiringPi library\n");
+    return 0;
+}
+
+#endif
+
--- a/rc433/send.c	Sun May 04 22:29:18 2014 +0200
+++ b/rc433/send.c	Mon May 05 10:33:26 2014 +0200
@@ -23,7 +23,7 @@
 #include "../lib/mbselib.h"
 #include "send.h"
 
-
+#ifdef HAVE_WIRINGPI_H
 
 void help(void)
 {
@@ -225,3 +225,13 @@
 
     return 0;
 }
+
+#else
+
+int main(int argc, char *argv[]) {
+    fprintf(stderr, "This program does nothing without the wiringPi library\n");
+    return 0;
+}
+
+#endif
+
--- a/rc433/sniffer.c	Sun May 04 22:29:18 2014 +0200
+++ b/rc433/sniffer.c	Mon May 05 10:33:26 2014 +0200
@@ -23,6 +23,7 @@
 #include "../lib/mbselib.h"
 #include "sniffer.h"
 
+#ifdef HAVE_WIRINGPI_H
 
 int main(int argc, char *argv[]) {
   
@@ -59,3 +60,12 @@
     exit(0);
 }
 
+#else
+
+int main(int argc, char *argv[]) {
+    fprintf(stderr, "This program does nothing without the wiringPi library\n");
+    return 0;
+}
+
+#endif
+

mercurial