f-stack/dpdk/lib/librte_vhost/Makefile

55 lines
1.4 KiB
Makefile
Raw Normal View History

2019-06-25 11:12:58 +00:00
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
2017-04-21 10:43:26 +00:00
include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_vhost.a
EXPORT_MAP := rte_vhost_version.map
2019-06-25 11:12:58 +00:00
CFLAGS += -DALLOW_EXPERIMENTAL_API
2019-11-23 08:13:38 +00:00
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
2017-04-21 10:43:26 +00:00
CFLAGS += -I vhost_user
2019-06-25 11:12:58 +00:00
CFLAGS += -fno-strict-aliasing
2017-04-21 10:43:26 +00:00
LDLIBS += -lpthread
2020-06-18 16:55:50 +00:00
ifeq ($(RTE_TOOLCHAIN), gcc)
ifeq ($(shell test $(GCC_VERSION) -ge 83 && echo 1), 1)
CFLAGS += -DVHOST_GCC_UNROLL_PRAGMA
endif
endif
ifeq ($(RTE_TOOLCHAIN), clang)
ifeq ($(shell test $(CLANG_MAJOR_VERSION)$(CLANG_MINOR_VERSION) -ge 37 && echo 1), 1)
CFLAGS += -DVHOST_CLANG_UNROLL_PRAGMA
endif
endif
ifeq ($(RTE_TOOLCHAIN), icc)
ifeq ($(shell test $(ICC_MAJOR_VERSION) -ge 16 && echo 1), 1)
CFLAGS += -DVHOST_ICC_UNROLL_PRAGMA
endif
endif
2017-04-21 10:43:26 +00:00
ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
LDLIBS += -lnuma
endif
2019-06-25 11:12:58 +00:00
LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net
2017-04-21 10:43:26 +00:00
# all source are stored in SRCS-y
SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \
2019-06-25 11:12:58 +00:00
vhost_user.c virtio_net.c vdpa.c
2017-04-21 10:43:26 +00:00
# install includes
2019-06-25 11:12:58 +00:00
SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost.h rte_vdpa.h
# only compile vhost crypto when cryptodev is enabled
ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
LDLIBS += -lrte_cryptodev -lrte_hash
SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_crypto.c
SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost_crypto.h
endif
2017-04-21 10:43:26 +00:00
include $(RTE_SDK)/mk/rte.lib.mk