new file mode 100644
@@ -0,0 +1,12 @@
+ODP_INCLUDES = \
+ -I$(top_builddir)/platform/@with_platform@/include \
+ -I$(top_srcdir)/platform/@with_platform@/include \
+ -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
+ -I$(top_srcdir)/include
+
+HELPER_INCLUDES = \
+ -I$(top_srcdir)/helper/include
+
+LIB = $(top_builddir)/lib
@@ -1,16 +1,12 @@
+include $(top_srcdir)/Makefile.inc
+
TESTS_ENVIRONMENT = EXEEXT=${EXEEXT}
-LIB = $(top_builddir)/lib
LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS)
AM_CFLAGS = \
-I$(srcdir) \
-I$(top_srcdir)/example \
- -I$(top_srcdir)/platform/@with_platform@/include \
- -I$(top_srcdir)/include/ \
- -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
- -I$(top_srcdir)/helper/include \
- -I$(top_builddir)/platform/@with_platform@/include \
- -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
- -I$(top_builddir)/include
+ $(ODP_INCLUDES) \
+ $(HELPER_INCLUDES)
AM_LDFLAGS = -L$(LIB) -static
@@ -1,15 +1,11 @@
+include $(top_srcdir)/Makefile.inc
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libodphelper.pc
-LIB = $(top_builddir)/lib
AM_CPPFLAGS = \
- -I$(top_builddir)/platform/@with_platform@/include \
- -I$(top_srcdir)/helper/include \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
- -I$(top_srcdir)/platform/@with_platform@/include \
- -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
- -I$(top_builddir)/include
+ $(ODP_INCLUDES) \
+ $(HELPER_INCLUDES)
AM_LDFLAGS = -version-number '$(ODPHELPER_LIBSO_VERSION)'
@@ -1,25 +1,17 @@
-TESTS_ENVIRONMENT = EXEEXT=${EXEEXT}
+include $(top_srcdir)/Makefile.inc
-LIB = $(top_builddir)/lib
+TESTS_ENVIRONMENT = EXEEXT=${EXEEXT}
#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
-INCFLAGS = \
- -I$(top_builddir)/platform/@with_platform@/include \
- -I$(top_srcdir)/helper/include \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
- -I$(top_srcdir)/platform/@with_platform@/include \
- -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/helper
-
ODP_PLATFORM=${with_platform}
-AM_CPPFLAGS = $(INCFLAGS)
+AM_CPPFLAGS = \
+ $(ODP_INCLUDES) \
+ $(HELPER_INCLUDES)
AM_LDFLAGS = -static
EXECUTABLES = chksum \
@@ -1,4 +1,4 @@
-LIB = $(top_builddir)/lib
+include $(top_srcdir)/Makefile.inc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libodp-linux.pc
@@ -3,14 +3,8 @@
include $(top_srcdir)/platform/Makefile.inc
-AM_CPPFLAGS = -I$(srcdir)/include
-AM_CPPFLAGS += -I$(top_srcdir)/include
-AM_CPPFLAGS += -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@
-AM_CPPFLAGS += -I$(top_builddir)/include
-AM_CPPFLAGS += -Iinclude
-AM_CPPFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR)
+AM_CPPFLAGS = $(ODP_INCLUDES)
AM_CPPFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/default
-AM_CPPFLAGS += -Iinclude
AM_CPPFLAGS += -DSYSCONFDIR=\"@sysconfdir@\"
AM_CPPFLAGS += $(OPENSSL_CPPFLAGS)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/Makefile.inc
+
# The following definitions may be used by platform tests that wish to
# build specific ODP applications, (i.e those whose do more than validation
# test wrapping)
@@ -7,16 +9,6 @@ AM_LDFLAGS = -static
AM_CFLAGS = $(CUNIT_CFLAGS)
LIBCUNIT_COMMON = $(top_builddir)/test/common/libcunit_common.la
-LIB = $(top_builddir)/lib
LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_PMDS)
INCCUNIT_COMMON = -I$(top_srcdir)/test/common
-INCODP = \
- -I$(top_builddir)/include \
- -I$(top_builddir)/platform/@with_platform@/include \
- -I$(top_srcdir)/helper/include \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
- -I$(top_srcdir)/platform/@with_platform@/arch/$(ARCH_DIR) \
- -I$(top_srcdir)/platform/@with_platform@/include \
- -I$(top_srcdir)/test
@@ -7,5 +7,5 @@ ring_main_SOURCES = \
ring_basic.c ring_stress.c
ring_main_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/include \
- $(INCCUNIT_COMMON) $(INCODP)
+ $(INCCUNIT_COMMON) $(ODP_INCLUDES) $(HELPER_INCLUDES)
ring_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
@@ -12,11 +12,11 @@ shmem_linux_LDFLAGS = $(AM_LDFLAGS) -lrt
shmem_odp1_SOURCES = shmem_odp1.c shmem_odp1.h shmem_common.h
shmem_odp1_CFLAGS = $(AM_CFLAGS) \
$(INCCUNIT_COMMON) \
- $(INCODP)
+ $(ODP_INCLUDES)
shmem_odp1_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
shmem_odp2_SOURCES = shmem_odp2.c shmem_odp2.h shmem_common.h
shmem_odp2_CFLAGS = $(AM_CFLAGS) \
$(INCCUNIT_COMMON) \
- $(INCODP)
+ $(ODP_INCLUDES)
shmem_odp2_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
@@ -1,21 +1,14 @@
-LIB = $(top_builddir)/lib
+include $(top_srcdir)/Makefile.inc
#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)
-INCFLAGS = \
- -I$(top_builddir)/platform/@with_platform@/include \
- -I$(top_srcdir)/helper/include \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/include/odp/arch/@ARCH_ABI@ \
- -I$(top_srcdir)/platform/@with_platform@/include \
- -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
- -I$(top_srcdir)/test/common \
- -I$(top_builddir)/include
-
-AM_CPPFLAGS = $(INCFLAGS)
+AM_CPPFLAGS = \
+ $(ODP_INCLUDES) \
+ $(HELPER_INCLUDES) \
+ -I$(top_srcdir)/test/common
AM_CFLAGS = $(CUNIT_CFLAGS)
AM_LDFLAGS = -L$(LIB) -static
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> --- Makefile.inc | 12 ++++++++++++ example/Makefile.inc | 12 ++++-------- helper/Makefile.am | 12 ++++-------- helper/test/Makefile.am | 18 +++++------------- platform/Makefile.inc | 2 +- platform/linux-generic/Makefile.am | 8 +------- platform/linux-generic/test/Makefile.inc | 12 ++---------- platform/linux-generic/test/ring/Makefile.am | 2 +- .../test/validation/api/shmem/Makefile.am | 4 ++-- test/Makefile.inc | 17 +++++------------ 10 files changed, 37 insertions(+), 62 deletions(-) create mode 100644 Makefile.inc -- 2.14.2