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