diff --git a/.gitignore b/.gitignore index bb0c2333..9407270d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -sigrok.h +version.h ChangeLog diff --git a/Makefile.am b/Makefile.am index 3bd9f894..f37c2e5d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,8 +46,9 @@ libsigrok_la_LIBADD = \ libsigrok_la_LDFLAGS = $(SR_LIB_LDFLAGS) -include_HEADERS = sigrok.h sigrok-proto.h -noinst_HEADERS = sigrok-internal.h +library_includedir = $(includedir)/libsigrok +library_include_HEADERS = libsigrok.h proto.h version.h +noinst_HEADERS = libsigrok-internal.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libsigrok.pc diff --git a/backend.c b/backend.c index e67f4824..e2b7a466 100644 --- a/backend.c +++ b/backend.c @@ -18,8 +18,8 @@ */ #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" /** * Initialize libsigrok. diff --git a/configure.ac b/configure.ac index d34a7019..495b3b5c 100644 --- a/configure.ac +++ b/configure.ac @@ -283,7 +283,7 @@ AC_SUBST(SR_PACKAGE_VERSION_MICRO) AC_SUBST(SR_PACKAGE_VERSION) AC_CONFIG_FILES([Makefile - sigrok.h + version.h hardware/Makefile hardware/alsa/Makefile hardware/asix-sigma/Makefile diff --git a/datastore.c b/datastore.c index f45353a0..c4b82e67 100644 --- a/datastore.c +++ b/datastore.c @@ -21,8 +21,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" static gpointer new_chunk(struct sr_datastore **ds); diff --git a/device.c b/device.c index 15809e17..d32b4e95 100644 --- a/device.c +++ b/device.c @@ -19,8 +19,8 @@ #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" static GSList *devs = NULL; diff --git a/filter.c b/filter.c index 2465cbbd..0775765f 100644 --- a/filter.c +++ b/filter.c @@ -20,8 +20,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" /** * Remove unused probes from samples. diff --git a/hardware/alsa/alsa.c b/hardware/alsa/alsa.c index d86ac05f..4fb8c5d5 100644 --- a/hardware/alsa/alsa.c +++ b/hardware/alsa/alsa.c @@ -24,8 +24,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-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 c0a7aa42..b5d2b97f 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -27,8 +27,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "asix-sigma.h" #define USB_VENDOR 0xa600 diff --git a/hardware/chronovu-la8/api.c b/hardware/chronovu-la8/api.c index 7d746889..90926c00 100644 --- a/hardware/chronovu-la8/api.c +++ b/hardware/chronovu-la8/api.c @@ -21,8 +21,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "driver.h" static GSList *dev_insts = NULL; diff --git a/hardware/chronovu-la8/driver.c b/hardware/chronovu-la8/driver.c index 37b96c4a..a9e733cb 100644 --- a/hardware/chronovu-la8/driver.c +++ b/hardware/chronovu-la8/driver.c @@ -20,8 +20,8 @@ #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "driver.h" /* Probes are numbered 0-7. */ diff --git a/hardware/chronovu-la8/driver.h b/hardware/chronovu-la8/driver.h index f3a8e013..d972d182 100644 --- a/hardware/chronovu-la8/driver.h +++ b/hardware/chronovu-la8/driver.h @@ -24,8 +24,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-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 2001a61f..3a547a14 100644 --- a/hardware/common/ezusb.c +++ b/hardware/common/ezusb.c @@ -27,8 +27,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" SR_PRIV int ezusb_reset(struct libusb_device_handle *hdl, int set_clear) { diff --git a/hardware/common/serial.c b/hardware/common/serial.c index 822b4ccd..002b23c3 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -30,8 +30,8 @@ #endif #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-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 eb554787..3a6ed9e4 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -27,8 +27,8 @@ #include #define pipe(fds) _pipe(fds, 4096, _O_BINARY) #endif -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" /* TODO: Number of probes should be configurable. */ #define NUM_PROBES 8 diff --git a/hardware/fx2lafw/command.c b/hardware/fx2lafw/command.c index 9bd634b5..5a085bb6 100644 --- a/hardware/fx2lafw/command.c +++ b/hardware/fx2lafw/command.c @@ -21,8 +21,8 @@ #include "fx2lafw.h" #include "command.h" -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" SR_PRIV int command_get_fw_version(libusb_device_handle *devhdl, struct version_info *vi) diff --git a/hardware/fx2lafw/command.h b/hardware/fx2lafw/command.h index 37f965cc..53e7da3c 100644 --- a/hardware/fx2lafw/command.h +++ b/hardware/fx2lafw/command.h @@ -21,7 +21,7 @@ #define LIBSIGROK_HARDWARE_FX2LAFW_COMMAND_H #include -#include "sigrok.h" +#include "libsigrok.h" /* Protocol commands */ #define CMD_GET_FW_VERSION 0xb0 diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 59ad5e73..be84761a 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -24,8 +24,8 @@ #include #include #include "config.h" -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "fx2lafw.h" #include "command.h" diff --git a/hardware/genericdmm/api.c b/hardware/genericdmm/api.c index be05fb29..8f332263 100644 --- a/hardware/genericdmm/api.c +++ b/hardware/genericdmm/api.c @@ -22,8 +22,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "genericdmm.h" diff --git a/hardware/genericdmm/fs9922.c b/hardware/genericdmm/fs9922.c index 24acbae5..5e80df77 100644 --- a/hardware/genericdmm/fs9922.c +++ b/hardware/genericdmm/fs9922.c @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "genericdmm.h" diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index 36466bab..8a7e9f74 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -29,8 +29,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "config.h" #include "dso.h" diff --git a/hardware/hantek-dso/dso.c b/hardware/hantek-dso/dso.c index e9d74dfb..77cad923 100644 --- a/hardware/hantek-dso/dso.c +++ b/hardware/hantek-dso/dso.c @@ -19,8 +19,8 @@ * along with this program. If not, see . */ -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "config.h" #include "dso.h" #include diff --git a/hardware/link-mso19/link-mso19.c b/hardware/link-mso19/link-mso19.c index abf1fb98..7c25817b 100644 --- a/hardware/link-mso19/link-mso19.c +++ b/hardware/link-mso19/link-mso19.c @@ -28,8 +28,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "link-mso19.h" #define USB_VENDOR "3195" diff --git a/hardware/mastech-va18b/api.c b/hardware/mastech-va18b/api.c index 00172550..54eaea24 100644 --- a/hardware/mastech-va18b/api.c +++ b/hardware/mastech-va18b/api.c @@ -21,8 +21,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #define MIN_NUM_SAMPLES 1 diff --git a/hardware/openbench-logic-sniffer/ols.c b/hardware/openbench-logic-sniffer/ols.c index 65a04f1a..f2706d11 100644 --- a/hardware/openbench-logic-sniffer/ols.c +++ b/hardware/openbench-logic-sniffer/ols.c @@ -38,8 +38,8 @@ #include #endif #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "ols.h" #ifdef _WIN32 diff --git a/hardware/zeroplus-logic-cube/analyzer.c b/hardware/zeroplus-logic-cube/analyzer.c index 9a416d63..4f86aa50 100644 --- a/hardware/zeroplus-logic-cube/analyzer.c +++ b/hardware/zeroplus-logic-cube/analyzer.c @@ -32,7 +32,7 @@ #include #include "analyzer.h" #include "gl_usb.h" -#include "sigrok-internal.h" +#include "libsigrok-internal.h" enum { HARD_DATA_CHECK_SUM = 0x00, diff --git a/hardware/zeroplus-logic-cube/analyzer.h b/hardware/zeroplus-logic-cube/analyzer.h index 27722af7..d427c436 100644 --- a/hardware/zeroplus-logic-cube/analyzer.h +++ b/hardware/zeroplus-logic-cube/analyzer.h @@ -33,7 +33,7 @@ #define LIBSIGROK_HARDWARE_ZEROPLUS_LOGIC_CUBE_ANALYZER_H #include -#include "sigrok.h" +#include "libsigrok.h" #define STATUS_FLAG_NONE 0x00 #define STATUS_FLAG_RESET 0x01 diff --git a/hardware/zeroplus-logic-cube/gl_usb.c b/hardware/zeroplus-logic-cube/gl_usb.c index 52cafce8..6b894da9 100644 --- a/hardware/zeroplus-logic-cube/gl_usb.c +++ b/hardware/zeroplus-logic-cube/gl_usb.c @@ -31,8 +31,8 @@ #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "gl_usb.h" #define CTRL_IN (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN | \ diff --git a/hardware/zeroplus-logic-cube/gl_usb.h b/hardware/zeroplus-logic-cube/gl_usb.h index 04a5163d..4d17a8fc 100644 --- a/hardware/zeroplus-logic-cube/gl_usb.h +++ b/hardware/zeroplus-logic-cube/gl_usb.h @@ -33,7 +33,7 @@ #define LIBSIGROK_HARDWARE_ZEROPLUS_LOGIC_CUBE_GL_USB_H #include -#include "sigrok.h" +#include "libsigrok.h" SR_PRIV int gl_read_bulk(libusb_device_handle *devh, void *buffer, unsigned int size); diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 808b7053..627b937e 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -25,8 +25,8 @@ #include #include #include "config.h" -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "analyzer.h" #define USB_VENDOR 0x0c12 diff --git a/hwdriver.c b/hwdriver.c index 185fa8c0..0fe7c703 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -23,8 +23,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" /* * This enumerates which driver capabilities correspond to user-settable diff --git a/input/binary.c b/input/binary.c index 4d6c4246..16081776 100644 --- a/input/binary.c +++ b/input/binary.c @@ -23,8 +23,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #define CHUNKSIZE (512 * 1024) #define DEFAULT_NUM_PROBES 8 diff --git a/input/chronovu_la8.c b/input/chronovu_la8.c index 79f83cc9..ceafd4db 100644 --- a/input/chronovu_la8.c +++ b/input/chronovu_la8.c @@ -22,8 +22,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #define NUM_PACKETS 2048 #define PACKET_SIZE 4096 diff --git a/input/input.c b/input/input.c index f5e20a2f..06eb5117 100644 --- a/input/input.c +++ b/input/input.c @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" extern SR_PRIV struct sr_input_format input_chronovu_la8; extern SR_PRIV struct sr_input_format input_binary; diff --git a/sigrok-internal.h b/libsigrok-internal.h similarity index 100% rename from sigrok-internal.h rename to libsigrok-internal.h diff --git a/sigrok.h.in b/libsigrok.h similarity index 91% rename from sigrok.h.in rename to libsigrok.h index 091eb3cf..2c0d6f96 100644 --- a/sigrok.h.in +++ b/libsigrok.h @@ -30,38 +30,6 @@ extern "C" { #endif -/* - * Package version macros (can be used for conditional compilation). - */ - -/** The libsigrok package 'major' version number. */ -#define SR_PACKAGE_VERSION_MAJOR @SR_PACKAGE_VERSION_MAJOR@ - -/** The libsigrok package 'minor' version number. */ -#define SR_PACKAGE_VERSION_MINOR @SR_PACKAGE_VERSION_MINOR@ - -/** The libsigrok package 'micro' version number. */ -#define SR_PACKAGE_VERSION_MICRO @SR_PACKAGE_VERSION_MICRO@ - -/** The libsigrok package version ("major.minor.micro") as string. */ -#define SR_PACKAGE_VERSION_STRING "@SR_PACKAGE_VERSION@" - -/* - * Library/libtool version macros (can be used for conditional compilation). - */ - -/** The libsigrok libtool 'current' version number. */ -#define SR_LIB_VERSION_CURRENT @SR_LIB_VERSION_CURRENT@ - -/** The libsigrok libtool 'revision' version number. */ -#define SR_LIB_VERSION_REVISION @SR_LIB_VERSION_REVISION@ - -/** The libsigrok libtool 'age' version number. */ -#define SR_LIB_VERSION_AGE @SR_LIB_VERSION_AGE@ - -/** The libsigrok libtool version ("current:revision:age") as string. */ -#define SR_LIB_VERSION_STRING "@SR_LIB_VERSION@" - /* * Status/error codes returned by libsigrok functions. * @@ -521,7 +489,8 @@ struct sr_session { gboolean running; }; -#include "sigrok-proto.h" +#include "proto.h" +#include "version.h" #ifdef __cplusplus } diff --git a/log.c b/log.c index 3344d174..cc680473 100644 --- a/log.c +++ b/log.c @@ -20,8 +20,8 @@ #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" /* Currently selected libsigrok loglevel. Default: SR_LOG_WARN. */ static int sr_loglevel = SR_LOG_WARN; /* Show errors+warnings per default. */ diff --git a/output/binary.c b/output/binary.c index 6141b4ff..ef41dab4 100644 --- a/output/binary.c +++ b/output/binary.c @@ -21,8 +21,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" static int data(struct sr_output *o, const uint8_t *data_in, uint64_t length_in, uint8_t **data_out, uint64_t *length_out) diff --git a/output/chronovu_la8.c b/output/chronovu_la8.c index cca6a295..345a6545 100644 --- a/output/chronovu_la8.c +++ b/output/chronovu_la8.c @@ -21,8 +21,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" struct context { unsigned int num_enabled_probes; diff --git a/output/csv.c b/output/csv.c index 0f9f731a..6091711d 100644 --- a/output/csv.c +++ b/output/csv.c @@ -22,8 +22,8 @@ #include #include #include "config.h" -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" struct context { unsigned int num_enabled_probes; diff --git a/output/float.c b/output/float.c index 850b5d43..e0622ceb 100644 --- a/output/float.c +++ b/output/float.c @@ -21,8 +21,8 @@ #include #include #include "config.h" -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" struct context { unsigned int num_enabled_probes; diff --git a/output/gnuplot.c b/output/gnuplot.c index d57e6847..765f84eb 100644 --- a/output/gnuplot.c +++ b/output/gnuplot.c @@ -22,8 +22,8 @@ #include #include #include "config.h" -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" struct context { unsigned int num_enabled_probes; diff --git a/output/ols.c b/output/ols.c index 0a55daf0..6ba384a9 100644 --- a/output/ols.c +++ b/output/ols.c @@ -28,8 +28,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" struct context { GString *header; diff --git a/output/output.c b/output/output.c index a7e26d9c..471ee9c7 100644 --- a/output/output.c +++ b/output/output.c @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" extern SR_PRIV struct sr_output_format output_text_bits; extern SR_PRIV struct sr_output_format output_text_hex; diff --git a/output/text/ascii.c b/output/text/ascii.c index dd4373f4..54d0e339 100644 --- a/output/text/ascii.c +++ b/output/text/ascii.c @@ -21,8 +21,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "text.h" SR_PRIV int init_ascii(struct sr_output *o) diff --git a/output/text/bits.c b/output/text/bits.c index 9692ac31..c1dbd2f8 100644 --- a/output/text/bits.c +++ b/output/text/bits.c @@ -21,8 +21,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "text.h" SR_PRIV int init_bits(struct sr_output *o) diff --git a/output/text/hex.c b/output/text/hex.c index b0e20aa6..9477a7b5 100644 --- a/output/text/hex.c +++ b/output/text/hex.c @@ -21,8 +21,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "text.h" SR_PRIV int init_hex(struct sr_output *o) diff --git a/output/text/text.c b/output/text/text.c index f0237a98..c4874321 100644 --- a/output/text/text.c +++ b/output/text/text.c @@ -23,8 +23,8 @@ #include #include #include "config.h" -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" #include "text.h" SR_PRIV void flush_linebufs(struct context *ctx, uint8_t *outbuf) diff --git a/output/vcd.c b/output/vcd.c index 9f42f152..7f734279 100644 --- a/output/vcd.c +++ b/output/vcd.c @@ -23,8 +23,8 @@ #include #include #include "config.h" -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" struct context { int num_enabled_probes; diff --git a/sigrok-proto.h b/proto.h similarity index 100% rename from sigrok-proto.h rename to proto.h diff --git a/session.c b/session.c index 7c3dcef4..89ea5ad4 100644 --- a/session.c +++ b/session.c @@ -22,8 +22,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" /* demo.c. TODO: Should not be global! */ extern SR_PRIV GIOChannel channels[2]; diff --git a/session_driver.c b/session_driver.c index 301df7d2..ddcf0add 100644 --- a/session_driver.c +++ b/session_driver.c @@ -23,8 +23,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" /* size of payloads sent across the session bus */ #define CHUNKSIZE (512 * 1024) diff --git a/session_file.c b/session_file.c index d58d2f16..6b778162 100644 --- a/session_file.c +++ b/session_file.c @@ -24,8 +24,8 @@ #include #include #include "config.h" -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" extern struct sr_session *session; extern SR_PRIV struct sr_dev_driver session_driver; diff --git a/strutil.c b/strutil.c index f70a6f35..7c346a00 100644 --- a/strutil.c +++ b/strutil.c @@ -21,8 +21,8 @@ #include #include #include -#include "sigrok.h" -#include "sigrok-internal.h" +#include "libsigrok.h" +#include "libsigrok-internal.h" /** * Convert a numeric samplerate value to its "natural" string representation. diff --git a/version.c b/version.c index 77b9127a..be323dc6 100644 --- a/version.c +++ b/version.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "sigrok.h" +#include "libsigrok.h" SR_API int sr_package_version_major_get(void) { diff --git a/version.h.in b/version.h.in new file mode 100644 index 00000000..b1a94f48 --- /dev/null +++ b/version.h.in @@ -0,0 +1,56 @@ +/* + * This file is part of the sigrok project. + * + * Copyright (C) 2010-2012 Bert Vermeulen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef LIBSIGROK_VERSION_H +#define LIBSIGROK_VERSION_H + +/* + * Package version macros (can be used for conditional compilation). + */ + +/** The libsigrok package 'major' version number. */ +#define SR_PACKAGE_VERSION_MAJOR @SR_PACKAGE_VERSION_MAJOR@ + +/** The libsigrok package 'minor' version number. */ +#define SR_PACKAGE_VERSION_MINOR @SR_PACKAGE_VERSION_MINOR@ + +/** The libsigrok package 'micro' version number. */ +#define SR_PACKAGE_VERSION_MICRO @SR_PACKAGE_VERSION_MICRO@ + +/** The libsigrok package version ("major.minor.micro") as string. */ +#define SR_PACKAGE_VERSION_STRING "@SR_PACKAGE_VERSION@" + +/* + * Library/libtool version macros (can be used for conditional compilation). + */ + +/** The libsigrok libtool 'current' version number. */ +#define SR_LIB_VERSION_CURRENT @SR_LIB_VERSION_CURRENT@ + +/** The libsigrok libtool 'revision' version number. */ +#define SR_LIB_VERSION_REVISION @SR_LIB_VERSION_REVISION@ + +/** The libsigrok libtool 'age' version number. */ +#define SR_LIB_VERSION_AGE @SR_LIB_VERSION_AGE@ + +/** The libsigrok libtool version ("current:revision:age") as string. */ +#define SR_LIB_VERSION_STRING "@SR_LIB_VERSION@" + +#endif +