diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2019-05-02 11:26:34 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2019-05-09 09:43:17 +0300 |
commit | 2e927d35cb368611d2684caee633dbff733cebe5 (patch) | |
tree | 0444a432702bd5d0a758421512a74b8a77cecac9 /helper/include | |
parent | 9dced3ede96b81f883172bad827054bd796c13b4 (diff) |
helper: add helper version defines
Added helper library version defines, so that application can
track helper version independent of ODP API version. Added also
function for easy print out of the versions number.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
Diffstat (limited to 'helper/include')
-rw-r--r-- | helper/include/odp/helper/.gitignore | 1 | ||||
-rw-r--r-- | helper/include/odp/helper/odph_api.h | 1 | ||||
-rw-r--r-- | helper/include/odp/helper/version.h.in | 72 |
3 files changed, 74 insertions, 0 deletions
diff --git a/helper/include/odp/helper/.gitignore b/helper/include/odp/helper/.gitignore new file mode 100644 index 000000000..67020331b --- /dev/null +++ b/helper/include/odp/helper/.gitignore @@ -0,0 +1 @@ +version.h diff --git a/helper/include/odp/helper/odph_api.h b/helper/include/odp/helper/odph_api.h index d46ab2ad2..4bd10bf46 100644 --- a/helper/include/odp/helper/odph_api.h +++ b/helper/include/odp/helper/odph_api.h @@ -33,6 +33,7 @@ extern "C" { #include <odp/helper/table.h> #include <odp/helper/threads.h> #include <odp/helper/udp.h> +#include <odp/helper/version.h> #ifdef __cplusplus } diff --git a/helper/include/odp/helper/version.h.in b/helper/include/odp/helper/version.h.in new file mode 100644 index 000000000..127b3ff9d --- /dev/null +++ b/helper/include/odp/helper/version.h.in @@ -0,0 +1,72 @@ +/* Copyright (c) 2019, Nokia + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP helper version + */ + +#ifndef ODPH_VERSION_H_ +#define ODPH_VERSION_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup odph_version VERSION + * @{ + */ + +/** + * ODP helper generation version + * + * Introduction of major new features or changes that make very significant + * changes to the helper library. + */ +#define ODPH_VERSION_GENERATION @ODPH_VERSION_GENERATION@ + +/** + * ODP helper major version + * + * Introduction of major new features or changes. Helper libraries with common + * generation, but with different major version numbers are likely not backward + * compatible. + */ +#define ODPH_VERSION_MAJOR @ODPH_VERSION_MAJOR@ + +/** + * ODP helper minor version + * + * Minor version is incremented when introducing backward compatible changes. + * Helper libraries with common generation and major version, but with + * different minor version numbers are backward compatible. + */ +#define ODPH_VERSION_MINOR @ODPH_VERSION_MINOR@ + +/** + * ODP helper version string + * + * The version string defines the helper library version in this format: + * @verbatim <generation>.<major>.<minor> @endverbatim + * + * The string is null terminated. + * + * @return Pointer to helper library version string + */ +const char *odph_version_str(void); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif |