@@ -111,6 +111,7 @@ AS_CASE([$host],
[ARCH_DIR=undefined]
)
AC_SUBST([ARCH_DIR])
+AM_CONDITIONAL([ARCH_X86], [test "x${ARCH_DIR}" = "xx86"])
##########################################################################
# Warn on the defaults if arch is undefined
@@ -161,22 +162,6 @@ AC_SUBST([with_platform])
AC_SUBST([platform_with_platform], ["platform/${with_platform}"])
##########################################################################
-# Run platform specific checks and settings
-##########################################################################
-IMPLEMENTATION_NAME=""
-if test "${with_platform}" = "linux-generic";
-then
- m4_include([./platform/linux-generic/m4/configure.m4])
- m4_include([./test/linux-generic/m4/configure.m4])
- IMPLEMENTATION_NAME="odp-linux"
-else
- echo "UNSUPPORTED PLATFORM: ${with_platform}"
- exit 1
-fi
-
-ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME"
-
-##########################################################################
# Include m4 files
##########################################################################
m4_include([./doc/m4/configure.m4])
@@ -195,6 +180,27 @@ AC_HELP_STRING([--with-sdk-install-path=DIR path to external libs and headers],
AC_SUBST(SDK_INSTALL_PATH)
##########################################################################
+# Run platform specific checks and settings
+##########################################################################
+IMPLEMENTATION_NAME=""
+AS_IF([test "${with_platform}" == "linux-generic"],
+ [m4_include([./platform/linux-generic/m4/configure.m4])]
+ [m4_include([./test/linux-generic/m4/configure.m4])]
+ [IMPLEMENTATION_NAME="linux-generic"]
+ [ODP_CFLAGS="$ODP_CFLAGS -std=c99"]
+ [ODP_LIB_STR="odp-linux"],
+ [test "${with_platform}" == "linux-dpdk"],
+ [m4_include([./platform/linux-dpdk/m4/configure.m4])]
+ [m4_include([./test/linux-dpdk/m4/configure.m4])]
+ [IMPLEMENTATION_NAME="linux-dpdk"]
+ [ODP_CFLAGS="$ODP_CFLAGS -std=gnu99"]
+ [ODP_LIB_STR="odp-dpdk"],
+ [echo "UNSUPPORTED PLATFORM: ${with_platform}"])
+
+ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME"
+AC_SUBST(ODP_LIB_STR)
+
+##########################################################################
# Set the install directory for test binaries/scripts
##########################################################################
AC_ARG_WITH([testdir],
@@ -210,6 +216,7 @@ AC_SUBST([testdir])
# Set conditionals as computed within platform specific files
##########################################################################
AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"])
+AM_CONDITIONAL([DPDK_DEFAULT_DIR], [test "x${DPDK_DEFAULT_DIR}" = "x1"])
AM_CONDITIONAL([test_installdir], [test "$testdir" != ""])
AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ])
AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ])
@@ -314,7 +321,6 @@ ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototype
ODP_CFLAGS="$ODP_CFLAGS -Wmissing-declarations -Wold-style-definition -Wpointer-arith"
ODP_CFLAGS="$ODP_CFLAGS -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral"
ODP_CFLAGS="$ODP_CFLAGS -Wformat-security -Wundef -Wwrite-strings"
-ODP_CFLAGS="$ODP_CFLAGS -std=c99"
dnl Use -Werror in the checks below since Clang emits a warning instead of
dnl an error when it encounters an unknown warning option.
@@ -1,6 +1,6 @@
include $(top_srcdir)/platform/@with_platform@/Makefile.inc
LIB = $(top_builddir)/lib
-LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS)
+LDADD = $(LIB)/lib$(ODP_LIB_STR).la $(LIB)/libodphelper.la $(DPDK_PMDS)
AM_CFLAGS += \
-I$(srcdir) \
-I$(top_srcdir)/example \
@@ -5,7 +5,7 @@ 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)/libodphelper.la $(LIB)/libodp-linux.la
+LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/lib$(ODP_LIB_STR).la
INCFLAGS = \
-I$(top_builddir)/platform/@with_platform@/include \
@@ -6,7 +6,6 @@ pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp-linux.pc
.PHONY: pkgconfig/libodp-linux.pc
VPATH = $(srcdir) $(builddir)
-lib_LTLIBRARIES = $(LIB)/libodp-linux.la
AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
@@ -1,6 +1,8 @@
include $(top_srcdir)/platform/Makefile.inc
include $(top_srcdir)/platform/@with_platform@/Makefile.inc
+lib_LTLIBRARIES = $(LIB)/libodp-dpdk.la
+
PLAT_CFLAGS =
if ARCH_X86
PLAT_CFLAGS += -msse4.2
@@ -72,8 +74,20 @@ odpapiinclude_HEADERS = \
$(srcdir)/include/odp/api/time.h \
$(srcdir)/include/odp/api/timer.h \
$(srcdir)/include/odp/api/traffic_mngr.h \
- $(srcdir)/include/odp/api/version.h \
- $(srcdir)/arch/@ARCH_DIR@/odp/api/cpu_arch.h
+ $(srcdir)/include/odp/api/version.h
+
+if ARCH_IS_ARM
+odpapiinclude_HEADERS += $(srcdir)/arch/arm/odp/api/cpu_arch.h
+endif
+if ARCH_IS_MIPS64
+odpapiinclude_HEADERS += $(srcdir)/arch/mips64/odp/api/cpu_arch.h
+endif
+if ARCH_IS_POWERPC
+odpapiinclude_HEADERS += $(srcdir)/arch/powerpc/odp/api/cpu_arch.h
+endif
+if ARCH_IS_X86
+odpapiinclude_HEADERS += $(srcdir)/arch/x86/odp/api/cpu_arch.h
+endif
odpapiplatincludedir= $(includedir)/odp/api/plat
odpapiplatinclude_HEADERS = \
@@ -215,15 +229,32 @@ __LIB__libodp_dpdk_la_SOURCES = \
../linux-generic/odp_traffic_mngr.c \
../linux-generic/odp_version.c \
../linux-generic/odp_weak.c \
- arch/@ARCH_DIR@/odp_cpu_arch.c \
- arch/@ARCH_DIR@/odp_sysinfo_parse.c
-
-__LIB__libodp_dpdk_la_LIBADD = $(ATOMIC_LIBS)
+ ../linux-generic/drv_atomic.c \
+ ../linux-generic/drv_barrier.c \
+ ../linux-generic/drv_driver.c \
+ ../linux-generic/drv_shm.c \
+ ../linux-generic/drv_spinlock.c
+if ARCH_IS_ARM
+__LIB__libodp_dpdk_la_SOURCES += arch/arm/odp_cpu_arch.c \
+ arch/arm/odp_sysinfo_parse.c
+endif
+if ARCH_IS_MIPS64
+__LIB__libodp_dpdk_la_SOURCES += arch/mips64/odp_cpu_arch.c \
+ arch/mips64/odp_sysinfo_parse.c
+endif
+if ARCH_IS_POWERPC
+__LIB__libodp_dpdk_la_SOURCES += arch/powerpc/odp_cpu_arch.c \
+ arch/powerpc/odp_sysinfo_parse.c
+endif
if ARCH_IS_X86
-__LIB__libodp_dpdk_la_SOURCES += arch/@ARCH_DIR@/cpu_flags.c
+__LIB__libodp_dpdk_la_SOURCES += arch/x86/cpu_flags.c \
+ arch/x86/odp_cpu_arch.c \
+ arch/x86/odp_sysinfo_parse.c
endif
+__LIB__libodp_dpdk_la_LIBADD = $(ATOMIC_LIBS)
+
# Create symlink for ABI header files. Application does not need to use the arch
# specific include path for installed files.
install-data-hook:
@@ -4,6 +4,8 @@
include $(top_srcdir)/platform/Makefile.inc
include $(top_srcdir)/platform/@with_platform@/Makefile.inc
+lib_LTLIBRARIES = $(LIB)/libodp-linux.la
+
AM_CFLAGS += -I$(srcdir)/include
AM_CFLAGS += -I$(top_srcdir)/include
AM_CFLAGS += -I$(top_srcdir)/frameworks/modular
@@ -4,7 +4,7 @@ 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)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_PMDS)
+LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/lib$(ODP_LIB_STR).la $(DPDK_PMDS)
INCFLAGS = \
-I$(top_builddir)/platform/@with_platform@/include \
@@ -13,4 +13,4 @@ AM_LDFLAGS += -static
LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la
LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la
LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la
-LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la
+LIBODP = $(LIB)/libodphelper.la $(LIB)/lib$(ODP_LIB_STR).la
@@ -16,4 +16,4 @@ AM_CPPFLAGS += $(CUNIT_CPPFLAGS)
LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la
LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la
LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la
-LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la
+LIBODP = $(LIB)/libodphelper.la $(LIB)/lib$(ODP_LIB_STR).la