@@ -24,7 +24,7 @@ missing
config.log
config.status
libtool
-pkgconfig/libodp.pc
+pkgconfig/libodp*.pc
.deps/
cscope.out
tags
@@ -3,9 +3,10 @@ AUTOMAKE_OPTIONS = foreign
#@with_platform@ works alone in subdir but not as part of a path???
SUBDIRS = @platform_with_platform@ \
+ helper \
test \
@platform_with_platform_test@ \
- helper \
+ helper/test \
doc \
example \
scripts
@@ -296,6 +296,7 @@ AC_CONFIG_FILES([Makefile
helper/Makefile
helper/test/Makefile
pkgconfig/libodp.pc
+ pkgconfig/libodphelper.pc
platform/linux-generic/Makefile
platform/linux-generic/test/pktio/Makefile
scripts/Makefile
new file mode 100644
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
new file mode 100644
@@ -0,0 +1,4 @@
+usr/include/*
+usr/lib/*/lib*.so
+usr/lib/*/lib*.a
+usr/lib/*/pkgconfig/*
new file mode 100644
@@ -0,0 +1 @@
+usr/lib
new file mode 100644
@@ -0,0 +1 @@
+usr/lib/*/lib*.so.*
@@ -1,13 +1,13 @@
include $(top_srcdir)/Makefile.inc
include $(top_srcdir)/platform/@with_platform@/Makefile.inc
LIB = $(top_builddir)/lib
-LDADD = $(LIB)/libodp.la
+LDADD = $(LIB)/libodp.la $(LIB)/libodphelper.la
AM_CFLAGS += \
-I$(srcdir) \
-I$(top_srcdir)/example \
-I$(top_srcdir)/platform/@with_platform@/include \
-I$(top_srcdir)/platform/linux-generic/include \
-I$(top_srcdir)/include/ \
- -I$(top_srcdir)/helper/include
+ -I$(top_srcdir)/helper
AM_LDFLAGS += -L$(LIB)
@@ -1 +1,29 @@
-SUBDIRS = test
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper.pc
+
+LIB = $(top_builddir)/lib
+AM_CFLAGS = -I$(srcdir)/include
+AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
+AM_CFLAGS += -I$(top_srcdir)/platform/linux-generic/include
+AM_CFLAGS += -I$(top_srcdir)/include
+
+nobase_include_HEADERS = \
+ $(srcdir)/odp/helper/ring.h \
+ $(srcdir)/odp/helper/linux.h \
+ $(srcdir)/odp/helper/chksum.h\
+ $(srcdir)/odp/helper/eth.h\
+ $(srcdir)/odp/helper/icmp.h\
+ $(srcdir)/odp/helper/ip.h\
+ $(srcdir)/odp/helper/ipsec.h\
+ $(srcdir)/odp/helper/tcp.h\
+ $(srcdir)/odp/helper/udp.h
+
+noinst_HEADERS = \
+ $(srcdir)/odph_debug.h \
+ $(srcdir)/odph_pause.h
+
+__LIB__libodphelper_la_SOURCES = \
+ linux.c \
+ ring.c
+
+lib_LTLIBRARIES = $(LIB)/libodphelper.la
similarity index 99%
rename from helper/include/odp/helper/chksum.h
rename to helper/odp/helper/chksum.h
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-
/**
* @file
*
similarity index 99%
rename from helper/include/odp/helper/eth.h
rename to helper/odp/helper/eth.h
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-
/**
* @file
*
@@ -70,7 +69,6 @@ typedef struct ODP_PACKED {
/** @internal Compile time assert */
_ODP_STATIC_ASSERT(sizeof(odph_vlanhdr_t) == ODPH_VLANHDR_LEN, "ODPH_VLANHDR_T__SIZE_ERROR");
-
/* Ethernet header Ether Type ('type') values, a selected few */
#define ODPH_ETHTYPE_IPV4 0x0800 /**< Internet Protocol version 4 */
#define ODPH_ETHTYPE_ARP 0x0806 /**< Address Resolution Protocol */
similarity index 99%
rename from helper/include/odp/helper/icmp.h
rename to helper/odp/helper/icmp.h
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-
/**
* @file
*
similarity index 99%
rename from helper/include/odp/helper/ip.h
rename to helper/odp/helper/ip.h
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-
/**
* @file
*
similarity index 99%
rename from helper/include/odp/helper/ipsec.h
rename to helper/odp/helper/ipsec.h
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-
/**
* @file
*
similarity index 95%
rename from helper/include/odp/helper/linux.h
rename to helper/odp/helper/linux.h
@@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-
/**
* @file
*
@@ -29,7 +28,7 @@ extern "C" {
/** The thread starting arguments */
typedef struct {
- void *(*start_routine) (void *); /**< The function to run */
+ void *(*start_routine)(void *); /**< The function to run */
void *arg; /**< The functions arguemnts */
} odp_start_args_t;
@@ -42,7 +41,6 @@ typedef struct {
odp_start_args_t *start_args;
} odph_linux_pthread_t;
-
/** Linux process state information */
typedef struct {
pid_t pid; /**< Process ID */
@@ -74,8 +72,8 @@ int odph_linux_cpumask_default(odp_cpumask_t *mask, int num);
* @return Number of threads created
*/
int odph_linux_pthread_create(odph_linux_pthread_t *thread_tbl,
- const odp_cpumask_t *mask,
- void *(*start_routine) (void *), void *arg);
+ const odp_cpumask_t *mask,
+ void *(*start_routine)(void *), void *arg);
/**
* Waits pthreads to exit
@@ -88,7 +86,6 @@ int odph_linux_pthread_create(odph_linux_pthread_t *thread_tbl,
*/
void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num);
-
/**
* Fork a process
*
@@ -102,7 +99,6 @@ void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num);
*/
int odph_linux_process_fork(odph_linux_process_t *proc, int cpu);
-
/**
* Fork a number of processes
*
@@ -117,7 +113,6 @@ int odph_linux_process_fork(odph_linux_process_t *proc, int cpu);
int odph_linux_process_fork_n(odph_linux_process_t *proc_tbl,
const odp_cpumask_t *mask);
-
/**
* Wait for a number of processes
*
@@ -131,7 +126,6 @@ int odph_linux_process_fork_n(odph_linux_process_t *proc_tbl,
*/
int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num);
-
#ifdef __cplusplus
}
#endif
similarity index 100%
rename from helper/include/odp/helper/ring.h
rename to helper/odp/helper/ring.h
similarity index 100%
rename from helper/include/odp/helper/tcp.h
rename to helper/odp/helper/tcp.h
similarity index 100%
rename from helper/include/odp/helper/udp.h
rename to helper/odp/helper/udp.h
@@ -24,4 +24,6 @@ bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
dist_odp_chksum_SOURCES = odp_chksum.c
dist_odp_thread_SOURCES = odp_thread.c
+odp_thread_LDADD = $(LIB)/libodphelper.la $(LIB)/libodp.la
dist_odp_process_SOURCES = odp_process.c
+odp_process_LDADD = $(LIB)/libodphelper.la $(LIB)/libodp.la
new file mode 100644
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libodphelper
+Description: Helper for the ODP packet processing engine
+Version: @VERSION@
+Libs: -L${libdir} -lodphelper
+Libs.private:
+Cflags: -I${includedir}
@@ -3,7 +3,7 @@ include $(top_srcdir)/platform/Makefile.inc
AM_CFLAGS += -I$(srcdir)/include
AM_CFLAGS += -I$(top_srcdir)/include
-AM_CFLAGS += -I$(top_srcdir)/helper/include
+AM_CFLAGS += -I$(top_srcdir)/helper
include_HEADERS = \
$(top_srcdir)/include/odp.h
@@ -127,20 +127,6 @@ noinst_HEADERS = \
${top_srcdir}/platform/linux-generic/include/odp_timer_internal.h \
${top_srcdir}/platform/linux-generic/Makefile.inc
-subdirheadersdir = $(includedir)/odp/helper
-subdirheaders_HEADERS = \
- $(top_srcdir)/helper/include/odp/helper/chksum.h \
- $(top_srcdir)/helper/include/odp/helper/eth.h \
- $(top_srcdir)/helper/include/odp/helper/icmp.h \
- $(top_srcdir)/helper/include/odp/helper/ip.h \
- $(top_srcdir)/helper/include/odp/helper/ipsec.h \
- $(top_srcdir)/helper/include/odp/helper/linux.h \
- $(top_srcdir)/helper/include/odp/helper/ring.h \
- $(top_srcdir)/helper/include/odp/helper/tcp.h \
- $(top_srcdir)/helper/include/odp/helper/udp.h \
- $(top_srcdir)/helper/odph_debug.h \
- $(top_srcdir)/helper/odph_pause.h
-
__LIB__libodp_la_SOURCES = \
odp_barrier.c \
odp_buffer.c \
@@ -151,14 +137,12 @@ __LIB__libodp_la_SOURCES = \
odp_event.c \
odp_init.c \
odp_impl.c \
- ../../helper/linux.c \
odp_packet.c \
odp_packet_flags.c \
odp_packet_io.c \
odp_packet_socket.c \
odp_pool.c \
odp_queue.c \
- ../../helper/ring.c \
odp_rwlock.c \
odp_schedule.c \
odp_shared_memory.c \
@@ -5,14 +5,14 @@ LIB = $(top_builddir)/lib
#in the following line, the libs using the symbols should come before
#the libs containing them! The includer is given a chance to add things
#before libodp by setting PRE_LDADD before the inclusion.
-LDADD = $(PRE_LDADD) $(LIB)/libodp.la
+LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp.la
INCFLAGS = -I$(srcdir) \
-I$(top_srcdir)/test \
-I$(top_srcdir)/platform/@with_platform@/include \
-I$(top_srcdir)/platform/linux-generic/include \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/helper/include
+ -I$(top_srcdir)/helper
AM_CFLAGS += $(INCFLAGS)
AM_CXXFLAGS = $(INCFLAGS)
@@ -4,4 +4,4 @@ AM_CFLAGS += -I$(top_srcdir)/test/validation/common
AM_LDFLAGS += -static
LIBCUNIT_COMMON = $(top_builddir)/test/validation/common/libcunit_common.a
-LIBODP = $(LIB)/libodp.la
+LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp.la
Remove the need to build helper source files into the linux-generic library by converting helpers to be their own library. This removes the need for all other platforms to also build in the helpers which are optional just to run the tests. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- v3 move helper includes ├── bin ├── include │ └── odp │ ├── api │ ├── helper <----- moved it to here │ └── plat ├── lib │ └── pkgconfig └── share └── opendataplane checkpacth then forces some other clean up .gitignore | 2 +- Makefile.am | 3 ++- configure.ac | 1 + debian/libodphelper-dev.dirs | 2 ++ debian/libodphelper-dev.install | 4 ++++ debian/libodphelper.dirs | 1 + debian/libodphelper.install | 1 + example/Makefile.inc | 4 ++-- helper/Makefile.am | 30 +++++++++++++++++++++++++++++- helper/{include => }/odp/helper/chksum.h | 1 - helper/{include => }/odp/helper/eth.h | 2 -- helper/{include => }/odp/helper/icmp.h | 1 - helper/{include => }/odp/helper/ip.h | 1 - helper/{include => }/odp/helper/ipsec.h | 1 - helper/{include => }/odp/helper/linux.h | 12 +++--------- helper/{include => }/odp/helper/ring.h | 0 helper/{include => }/odp/helper/tcp.h | 0 helper/{include => }/odp/helper/udp.h | 0 helper/test/Makefile.am | 2 ++ pkgconfig/libodphelper.pc.in | 11 +++++++++++ platform/linux-generic/Makefile.am | 18 +----------------- test/Makefile.inc | 4 ++-- test/validation/Makefile.inc | 2 +- 23 files changed, 63 insertions(+), 40 deletions(-) create mode 100644 debian/libodphelper-dev.dirs create mode 100644 debian/libodphelper-dev.install create mode 100644 debian/libodphelper.dirs create mode 100644 debian/libodphelper.install rename helper/{include => }/odp/helper/chksum.h (99%) rename helper/{include => }/odp/helper/eth.h (99%) rename helper/{include => }/odp/helper/icmp.h (99%) rename helper/{include => }/odp/helper/ip.h (99%) rename helper/{include => }/odp/helper/ipsec.h (99%) rename helper/{include => }/odp/helper/linux.h (95%) rename helper/{include => }/odp/helper/ring.h (100%) rename helper/{include => }/odp/helper/tcp.h (100%) rename helper/{include => }/odp/helper/udp.h (100%) create mode 100644 pkgconfig/libodphelper.pc.in