summaryrefslogtreecommitdiffstats
path: root/pcilib/version.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/version.h.in')
-rw-r--r--pcilib/version.h.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/pcilib/version.h.in b/pcilib/version.h.in
new file mode 100644
index 0000000..6eb3b20
--- /dev/null
+++ b/pcilib/version.h.in
@@ -0,0 +1,15 @@
+#ifndef _PCILIB_VERSION_H
+#define _PCILIB_VERSION_H
+
+#define PCILIB_VERSION_MAJOR ${PCILIB_VERSION_MAJOR}
+#define PCILIB_VERSION_MINOR ${PCILIB_VERSION_MINOR}
+#define PCILIB_VERSION_MICRO ${PCILIB_VERSION_MICRO}
+
+#define PCILIB_MAKE_VERSION(major, minor, micro) ((major<<16)|(minor<<8)|(micro))
+#define PCILIB_VERSION_GET_MAJOR(version) ((version>>16)&&0xFF)
+#define PCILIB_VERSION_GET_MINOR(version) ((version>>8)&&0xFF)
+#define PCILIB_VERSION_GET_MICRO(version) ((version)&&0xFF)
+
+#define PCILIB_VERSION PCILIB_MAKE_VERSION(PCILIB_VERSION_MAJOR, PCILIB_VERSION_MINOR, PCILIB_VERSION_MICRO)
+
+#endif /* _PCILIB_VERSION_H */