SAMPLE_PLUGIN?=no
MACHINE=$(shell uname -m)
-ifeq ($(MACHINE),$(filter $(MACHINE),x86_64))
-export AESNI?=y
-else
-export AESNI?=N
-endif
-
,:=,
define disable_plugins
$(if $(1), \
DEB_DEPENDS = curl build-essential autoconf automake bison ccache
DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
-DEB_DEPENDS += lcov chrpath autoconf nasm indent clang-format libnuma-dev
+DEB_DEPENDS += lcov chrpath autoconf indent clang-format libnuma-dev
DEB_DEPENDS += python-all python-dev python-virtualenv python-pip libffi6 check
DEB_DEPENDS += libboost-all-dev
ifeq ($(OS_VERSION_ID),14.04)
# +ganglia-devel if building the ganglia plugin
RPM_DEPENDS += chrpath libffi-devel rpm-build
-ifeq ($(OS_ID),fedora)
- RPM_DEPENDS += nasm
-else ifeq ($(findstring y,$(AESNI)),y)
- RPM_DEPENDS += https://kojipkgs.fedoraproject.org//packages/nasm/2.12.02/2.fc26/x86_64/nasm-2.12.02-2.fc26.x86_64.rpm
-endif
SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake bison ccache check-devel chrpath clang indent libtool make
ifneq ($(SUSE_NAME),Tumbleweed)
RPM_SUSE_DEVEL_DEPS += boost_1_61-devel gcc6
RPM_SUSE_PYTHON_DEPS += python-virtualenv
- RPM_SUSE_BUILDTOOL_DEPS += https://download.opensuse.org/tumbleweed/repo/oss/suse/x86_64/nasm-2.13.01-2.2.x86_64.rpm
else
RPM_SUSE_DEVEL_DEPS += boost_1_65-devel gcc
RPM_SUSE_PYTHON_DEPS += python2-virtualenv
- RPM_SUSE_BUILDTOOL_DEPS += nasm
endif
endif
DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION)
MACHINE=$(shell uname -m)
+NASM_BASE_URL := http://www.nasm.us/pub/nasm/releasebuilds
+NASM_VER := 2.13.01
+NASM_TARBALL := nasm-$(NASM_VER).tar.xz
+NASM_TAR_URL := $(NASM_BASE_URL)/$(NASM_VER)/$(NASM_TARBALL)
+NASM_SOURCE := $(B)/nasm-$(NASM_VER)
+
ISA_L_CRYPTO_LIB := n
IPSEC_MB_VER ?= 0.46
fi
@rm -f $(B)/.download.ok
+$(CURDIR)/$(NASM_TARBALL):
+ @if [ -e $(DPDK_DOWNLOAD_DIR)/$(NASM_TARBALL) ] ; \
+ then cp $(DPDK_DOWNLOAD_DIR)/$(NASM_TARBALL) $(CURDIR) ; \
+ else curl -o $(CURDIR)/$(NASM_TARBALL) -LO $(NASM_TAR_URL) ; \
+ fi
+
$(CURDIR)/$(AESNIMB_LIB_TARBALL):
@if [ -e $(DPDK_DOWNLOAD_DIR)/$(AESNIMB_LIB_TARBALL) ] ; \
then cp $(DPDK_DOWNLOAD_DIR)/$(AESNIMB_LIB_TARBALL) $(CURDIR) ; \
DPDK_DOWNLOADS = $(CURDIR)/$(DPDK_TARBALL)
ifeq ($(AESNI),y)
+DPDK_DOWNLOADS += $(CURDIR)/$(NASM_TARBALL)
DPDK_DOWNLOADS += $(CURDIR)/$(AESNIMB_LIB_TARBALL)
endif
ifeq ($(ISA_L_CRYPTO_LIB),y)
@echo --- extracting $(DPDK_TARBALL) ---
@tar --directory $(B) --extract --file $(CURDIR)/$(DPDK_TARBALL)
ifeq ($(AESNI),y)
+ @echo --- extracting $(NASM_TARBALL) ---
+ @tar --directory $(B) --extract --file $(CURDIR)/$(NASM_TARBALL)
@echo --- extracting $(AESNIMB_LIB_TARBALL) ---
@tar --directory $(B) --extract --file $(CURDIR)/$(AESNIMB_LIB_TARBALL)
endif
.PHONY: config
config: $(B)/.config.ok
+.PHONY: build-nasm
+build-nasm:
+ cd $(NASM_SOURCE) && sh configure && make -j
+
.PHONY: build-ipsec-mb
build-ipsec-mb:
mkdir -p $(I)/lib/
# Do not build GCM stuff if we are building ISA_L
make -C $(AESNIMB_LIB_SOURCE) -j NO_GCM=$(ISA_L_CRYPTO_LIB) \
- DEBUG=$(DPDK_DEBUG) EXTRA_CFLAGS=-fPIC
+ DEBUG=$(DPDK_DEBUG) EXTRA_CFLAGS=-fPIC NASM=$(NASM_SOURCE)/nasm
cp $(AESNIMB_LIB_SOURCE)/libIPSec_MB.a $(I)/lib/
.PHONY: build-isal-crypto
# Order matters
ifeq ($(AESNI),y)
+BUILD_TARGETS += build-nasm
BUILD_TARGETS += build-ipsec-mb
endif
ifeq ($(ISA_L_CRYPTO_LIB),y)
BuildRequires: libffi-devel
BuildRequires: glibc-static, java-1.8.0-openjdk, java-1.8.0-openjdk-devel yum-utils, redhat-lsb
BuildRequires: apr-devel
-%if %{with aesni}
-BuildRequires: nasm
-%endif
BuildRequires: numactl-devel
BuildRequires: autoconf automake libtool byacc bison flex
# Standard update + upgrade dance
yum check-update
yum update -y
-elif [ "$OS_ID" == "opensuse" ]; then
- zypper update -y
- # NASM >= 2.12 is not available in previous openSUSE release; need to install it from TW
- zypper install -y https://download.opensuse.org/tumbleweed/repo/oss/suse/x86_64/nasm-2.13.01-2.1.x86_64.rpm
fi