drivers/crypto: fix build with make 4.3
[dpdk.git] / drivers / crypto / aesni_mb / Makefile
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2015-2018 Intel Corporation
3
4 include $(RTE_SDK)/mk/rte.vars.mk
5
6 # library name
7 LIB = librte_pmd_aesni_mb.a
8
9 # build flags
10 CFLAGS += -O3
11 CFLAGS += $(WERROR_FLAGS)
12 CFLAGS += -DALLOW_EXPERIMENTAL_API
13
14 # versioning export map
15 EXPORT_MAP := rte_pmd_aesni_mb_version.map
16
17 # external library dependencies
18 LDLIBS += -lIPSec_MB
19 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
20 LDLIBS += -lrte_cryptodev
21 LDLIBS += -lrte_bus_vdev
22
23 H := \#
24 IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
25         $(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
26         head -n1 | cut -d'"' -f2)
27
28 # Detect library version
29 IMB_VERSION = $(shell grep -e "IMB_VERSION_STR" $(IMB_HDR) | cut -d'"' -f2)
30 IMB_VERSION_NUM = $(shell grep -e "IMB_VERSION_NUM" $(IMB_HDR) | cut -d' ' -f3)
31
32 ifeq ($(IMB_VERSION),)
33 $(error "IPSec_MB version >= 0.52 is required")
34 endif
35
36 ifeq ($(shell expr $(IMB_VERSION_NUM) \< 0x3400), 1)
37 $(error "IPSec_MB version >= 0.52 is required")
38 endif
39
40 SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
41 SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c
42
43 include $(RTE_SDK)/mk/rte.lib.mk