aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorJere Leppänen <jere.leppanen@nokia.com>2022-08-23 11:01:50 +0300
committerMatias Elo <matias.elo@nokia.com>2022-09-09 10:24:07 +0300
commit65a7f559c173ddbe9738c9c03bf9dbfc52279bc0 (patch)
treef9dccf704f485f1c5af0be6874b0b54dddce626b /helper
parent93e26c043cd0b287736e4ac663514774611894b8 (diff)
helper: allow cli.h to be included individually
Allow application to individually include cli.h, instead of only via odph_api.h. In order to do this, move the conditional to cli.h and include the autoheader there as well. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'helper')
-rw-r--r--helper/include/odp/helper/cli.h6
-rw-r--r--helper/include/odp/helper/odph_api.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/helper/include/odp/helper/cli.h b/helper/include/odp/helper/cli.h
index e9351147f..74cca7809 100644
--- a/helper/include/odp/helper/cli.h
+++ b/helper/include/odp/helper/cli.h
@@ -21,6 +21,10 @@
extern "C" {
#endif
+#include <odp/helper/autoheader_external.h>
+
+#if defined ODPH_CLI && ODPH_CLI
+
#include <stdint.h>
#include <stdarg.h>
@@ -174,6 +178,8 @@ int odph_cli_term(void);
* @}
*/
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/helper/include/odp/helper/odph_api.h b/helper/include/odp/helper/odph_api.h
index 3c321b9d4..01ae72a05 100644
--- a/helper/include/odp/helper/odph_api.h
+++ b/helper/include/odp/helper/odph_api.h
@@ -22,6 +22,7 @@ extern "C" {
#include <odp/helper/odph_debug.h>
#include <odp/helper/chksum.h>
+#include <odp/helper/cli.h>
#include <odp/helper/odph_cuckootable.h>
#include <odp/helper/eth.h>
#include <odp/helper/gtp.h>
@@ -40,10 +41,6 @@ extern "C" {
#include <odp/helper/udp.h>
#include <odp/helper/version.h>
-#ifdef ODPH_CLI
-#include <odp/helper/cli.h>
-#endif
-
#ifdef __cplusplus
}
#endif