diff --git a/Makefile.am b/Makefile.am
index c01801e4..b9e0c074 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
## along with this program. If not, see .
##
-AM_CPPFLAGS = -I $(top_srcdir)/libsigrok
+AM_CPPFLAGS = -I$(top_srcdir)/libsigrok
SUBDIRS = hardware input output firmware
diff --git a/backend.c b/backend.c
index fc914e18..0e22e6ed 100644
--- a/backend.c
+++ b/backend.c
@@ -18,8 +18,8 @@
*/
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
/**
* Initialize libsigrok.
diff --git a/datastore.c b/datastore.c
index fccb4d5b..3d72c99d 100644
--- a/datastore.c
+++ b/datastore.c
@@ -21,8 +21,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
static gpointer new_chunk(struct sr_datastore **ds);
diff --git a/device.c b/device.c
index 5596c173..b18fcacd 100644
--- a/device.c
+++ b/device.c
@@ -19,8 +19,8 @@
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
static GSList *devices = NULL;
diff --git a/filter.c b/filter.c
index 2da2755b..fef70052 100644
--- a/filter.c
+++ b/filter.c
@@ -20,7 +20,7 @@
#include
#include
#include
-#include
+#include "sigrok.h"
#include "sigrok-internal.h"
/**
diff --git a/hardware/alsa/alsa.c b/hardware/alsa/alsa.c
index d61246e4..5d0214bd 100644
--- a/hardware/alsa/alsa.c
+++ b/hardware/alsa/alsa.c
@@ -22,9 +22,9 @@
#include
#include
#include
-#include
-#include
#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
#define NUM_PROBES 2
#define SAMPLE_WIDTH 16
diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c
index e6a109c6..b6b914ce 100644
--- a/hardware/asix-sigma/asix-sigma.c
+++ b/hardware/asix-sigma/asix-sigma.c
@@ -29,8 +29,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
#include "asix-sigma.h"
#define USB_VENDOR 0xa600
diff --git a/hardware/chronovu-la8/chronovu-la8.c b/hardware/chronovu-la8/chronovu-la8.c
index e63e3a50..478df485 100644
--- a/hardware/chronovu-la8/chronovu-la8.c
+++ b/hardware/chronovu-la8/chronovu-la8.c
@@ -21,8 +21,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
#define USB_VENDOR_ID 0x0403
#define USB_PRODUCT_ID 0x6001
diff --git a/hardware/common/ezusb.c b/hardware/common/ezusb.c
index 058a7a02..426af3ab 100644
--- a/hardware/common/ezusb.c
+++ b/hardware/common/ezusb.c
@@ -21,8 +21,6 @@
* Helper functions for the Cypress EZ-USB / FX2 series chips.
*/
-#include
-#include
#include
#include
#include
@@ -30,6 +28,8 @@
#include
#include
#include "config.h"
+#include "sigrok.h"
+#include "sigrok-internal.h"
int ezusb_reset(struct libusb_device_handle *hdl, int set_clear)
{
diff --git a/hardware/common/serial.c b/hardware/common/serial.c
index 1e03d4df..80b6f22c 100644
--- a/hardware/common/serial.c
+++ b/hardware/common/serial.c
@@ -30,8 +30,8 @@
#endif
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
// FIXME: Must be moved, or rather passed as function argument.
#ifdef _WIN32
diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c
index 1492dadf..9531d0b0 100644
--- a/hardware/demo/demo.c
+++ b/hardware/demo/demo.c
@@ -22,14 +22,14 @@
#include
#include
#include
-#include
-#include
#ifdef _WIN32
#include
#include
#define pipe(fds) _pipe(fds, 4096, _O_BINARY)
#endif
#include "config.h"
+#include "sigrok.h"
+#include "sigrok-internal.h"
/* TODO: Number of probes should be configurable. */
#define NUM_PROBES 8
diff --git a/hardware/link-mso19/link-mso19.c b/hardware/link-mso19/link-mso19.c
index 63b91031..83fb4db0 100644
--- a/hardware/link-mso19/link-mso19.c
+++ b/hardware/link-mso19/link-mso19.c
@@ -26,9 +26,9 @@
#include
#include
#include
-#include
#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
#include "config.h"
#include "link-mso19.h"
diff --git a/hardware/openbench-logic-sniffer/ols.c b/hardware/openbench-logic-sniffer/ols.c
index 2edb6acb..4f78ba5b 100644
--- a/hardware/openbench-logic-sniffer/ols.c
+++ b/hardware/openbench-logic-sniffer/ols.c
@@ -38,8 +38,8 @@
#include
#endif
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
#include "ols.h"
#ifdef _WIN32
diff --git a/hardware/saleae-logic/saleae-logic.c b/hardware/saleae-logic/saleae-logic.c
index ed3ed092..c8b3dfa3 100644
--- a/hardware/saleae-logic/saleae-logic.c
+++ b/hardware/saleae-logic/saleae-logic.c
@@ -24,8 +24,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
#include "saleae-logic.h"
static struct fx2_profile supported_fx2[] = {
diff --git a/hardware/saleae-logic/saleae-logic.h b/hardware/saleae-logic/saleae-logic.h
index 9ccd8a1a..1dfc39d9 100644
--- a/hardware/saleae-logic/saleae-logic.h
+++ b/hardware/saleae-logic/saleae-logic.h
@@ -17,7 +17,6 @@
* along with this program. If not, see .
*/
-
#ifndef SALEAE_LOGIC_H_
#define SALEAE_LOGIC_H_
@@ -72,9 +71,6 @@ struct fx2_device {
* on the session bus along with samples.
*/
void *session_data;
-
};
-
-
#endif /* SALEAE_LOGIC_H_ */
diff --git a/hardware/zeroplus-logic-cube/gl_usb.c b/hardware/zeroplus-logic-cube/gl_usb.c
index 5fa7fd22..3ba08326 100644
--- a/hardware/zeroplus-logic-cube/gl_usb.c
+++ b/hardware/zeroplus-logic-cube/gl_usb.c
@@ -31,7 +31,7 @@
#include
#include
-#include
+#include "sigrok-internal.h"
#include "gl_usb.h"
#define CTRL_IN (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN | \
diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c
index 749925f9..75cd772f 100644
--- a/hardware/zeroplus-logic-cube/zeroplus.c
+++ b/hardware/zeroplus-logic-cube/zeroplus.c
@@ -24,8 +24,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
#include "analyzer.h"
#define USB_VENDOR 0x0c12
diff --git a/hwplugin.c b/hwplugin.c
index 0ffd6f2e..60a121c9 100644
--- a/hwplugin.c
+++ b/hwplugin.c
@@ -24,8 +24,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
/* The list of loaded plugins lives here. */
static GSList *plugins;
diff --git a/log.c b/log.c
index 02eb9aa3..844f58b2 100644
--- a/log.c
+++ b/log.c
@@ -20,8 +20,8 @@
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
static int sr_loglevel = SR_LOG_WARN; /* Show errors+warnings per default. */
diff --git a/session.c b/session.c
index 8f8edcce..caa794a1 100644
--- a/session.c
+++ b/session.c
@@ -23,8 +23,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
/* demo.c */
extern GIOChannel channels[2];
diff --git a/session_driver.c b/session_driver.c
index 689e1da7..fe9765ed 100644
--- a/session_driver.c
+++ b/session_driver.c
@@ -23,8 +23,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
/* size of payloads sent across the session bus */
#define CHUNKSIZE 4096
diff --git a/session_file.c b/session_file.c
index ec98065d..637e647e 100644
--- a/session_file.c
+++ b/session_file.c
@@ -24,8 +24,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
extern struct sr_session *session;
extern struct sr_device_plugin session_driver;
diff --git a/strutil.c b/strutil.c
index b26caea0..ef6d9633 100644
--- a/strutil.c
+++ b/strutil.c
@@ -21,8 +21,8 @@
#include
#include
#include
-#include
-#include
+#include "sigrok.h"
+#include "sigrok-internal.h"
/**
* Convert a numeric samplerate value to its "natural" string representation.