export DH_OPTIONS=-v
endif
+# People rebuilding this package can overwrite RTE_MACHINE
+# via DEB_BUILD_OPTIONS if they like
+ifneq (,$(filter rte_machine=%,$(DEB_BUILD_OPTIONS)))
+ RTE_MACHINE ?= $(patsubst rte_machine=%,%,$(filter rte_machine=%,$(DEB_BUILD_OPTIONS)))
+endif
+# default to minimal base, without setting this it would build
+# -march=native which is a non portable invariant
+RTE_MACHINE ?= "default"
+
# now stable with parallel comilation, so support -j
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
PAR := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
# list for libdpdk-dev to avoid having to maintain it manually.
# Same for the recommends list for dpdk, were we want the PMDs and the mempools.
dh_gencontrol -p libdpdk-dev -- -V"librte:Depends=`grep -E 'librte-*' ./debian/files | grep -v dbgsym | tr '_' ' ' | awk '{ print $$1,"(=",$$2 ")" }' | paste -sd ',' - | sed -e 's/,/, /g'`"
- dh_gencontrol -p dpdk -- -V"librte:Recommends=`grep -E 'librte-(pmd|mempool).*' ./debian/files | grep -v dbgsym | tr '_' ' ' | awk '{ print $$1,"(=",$$2 ")" }' | paste -sd ',' - | sed -e 's/,/, /g'`"
+ dh_gencontrol -p dpdk -- -V"librte:Suggests=`grep -E 'librte-(pmd|mempool).*' ./debian/files | grep -v dbgsym | tr '_' ' ' | awk '{ print $$1,"(=",$$2 ")" }' | paste -sd ',' - | sed -e 's/,/, /g'`"
ifneq (,$(findstring kernel_modules,$(DEB_BUILD_OPTIONS)))
dh_gencontrol -p dpdk-modules-$(KVERS) -- \
-v`cat debian/VERSION` \
--includedir=include/dpdk \
-Dper_library_versions=false \
-Dinclude_subdir_arch=../$(DEB_HOST_MULTIARCH)/dpdk \
- -Dmachine=corei7 \
+ -Dmachine=$(RTE_MACHINE) \
-Dkernel_dir=$(KSRC) \
-Denable_kmods=$(DPDK_CONFIG_BUILD_KMOD)