2018-05-03 07:30:11 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright(c) 2010-2017 Intel Corporation.
|
|
|
|
# Copyright(c) 2014-2015 6WIND S.A.
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
include $(RTE_SDK)/mk/internal/rte.compile-pre.mk
|
|
|
|
include $(RTE_SDK)/mk/internal/rte.install-pre.mk
|
|
|
|
include $(RTE_SDK)/mk/internal/rte.clean-pre.mk
|
|
|
|
include $(RTE_SDK)/mk/internal/rte.build-pre.mk
|
|
|
|
|
|
|
|
# VPATH contains at least SRCDIR
|
|
|
|
VPATH += $(SRCDIR)
|
|
|
|
|
|
|
|
_BUILD = $(APP)
|
|
|
|
_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y)
|
|
|
|
_INSTALL += $(RTE_OUTPUT)/app/$(APP) $(RTE_OUTPUT)/app/$(APP).map
|
|
|
|
POSTINSTALL += target-appinstall
|
|
|
|
_CLEAN = doclean
|
|
|
|
POSTCLEAN += target-appclean
|
|
|
|
|
|
|
|
ifeq ($(NO_LDSCRIPT),)
|
|
|
|
LDSCRIPT = $(RTE_LDSCRIPT)
|
|
|
|
endif
|
|
|
|
|
2016-06-10 13:19:07 +00:00
|
|
|
# Link only the libraries used in the application
|
|
|
|
LDFLAGS += --as-needed
|
|
|
|
|
2012-09-04 12:54:00 +00:00
|
|
|
# default path for libs
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-y += -L$(RTE_SDK_BIN)/lib
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Order is important: from higher level to lower level
|
|
|
|
#
|
2017-10-24 17:28:00 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_FLOW_CLASSIFY) += -lrte_flow_classify
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PIPELINE) += -lrte_pipeline
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_TABLE) += -lrte_table
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PORT) += -lrte_port
|
2016-06-10 13:19:08 +00:00
|
|
|
|
pdump: add new library for packet capture
The librte_pdump library provides a framework for
packet capturing in dpdk. The library provides set of
APIs to initialize the packet capture framework, to
enable or disable the packet capture, and to uninitialize
it.
The librte_pdump library works on a client/server model.
The server is responsible for enabling or disabling the
packet capture and the clients are responsible
for requesting the enabling or disabling of the packet
capture.
Enabling APIs are supported with port, queue, ring and
mempool parameters. Applications should pass on this information
to get the packets from the dpdk ports.
For enabling requests from applications, library creates the client
request containing the mempool, ring, port and queue information and
sends the request to the server. After receiving the request, server
registers the Rx and Tx callbacks for all the port and queues.
After the callbacks registration, registered callbacks will get the
Rx and Tx packets. Packets then will be copied to the new mbufs that
are allocated from the user passed mempool. These new mbufs then will
be enqueued to the application passed ring. Applications need to dequeue
the mbufs from the rings and direct them to the devices like
pcap vdev for viewing the packets outside of the dpdk
using the packet capture tools.
For disabling requests, library creates the client request containing
the port and queue information and sends the request to the server.
After receiving the request, server removes the Rx and Tx callback
for all the port and queues.
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-06-15 14:06:22 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PDUMP) += -lrte_pdump
|
2016-06-10 13:19:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += -lrte_distributor
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += -lrte_ip_frag
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lrte_meter
|
2016-06-10 13:19:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_LPM) += -lrte_lpm
|
2016-07-01 14:38:49 +00:00
|
|
|
# librte_acl needs --whole-archive because of weak functions
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) += --whole-archive
|
2016-06-10 13:19:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) += -lrte_acl
|
2016-07-01 14:38:49 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_ACL) += --no-whole-archive
|
2016-06-10 13:19:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += -lrte_jobstats
|
2017-03-30 21:00:57 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_METRICS) += -lrte_metrics
|
2017-03-30 21:00:59 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_BITRATE) += -lrte_bitratestats
|
2017-03-30 21:01:01 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_LATENCY_STATS) += -lrte_latencystats
|
2016-06-10 13:19:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_POWER) += -lrte_power
|
2015-02-11 13:43:10 +00:00
|
|
|
|
2017-01-31 15:01:32 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_EFD) += -lrte_efd
|
2018-05-10 10:23:03 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_BPF) += -lrte_bpf
|
2018-05-10 10:23:04 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_BPF_ELF),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_BPF) += -lelf
|
|
|
|
endif
|
2017-01-31 15:01:32 +00:00
|
|
|
|
2016-06-10 13:19:09 +00:00
|
|
|
_LDLIBS-y += --whole-archive
|
|
|
|
|
2017-10-09 15:00:29 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) += -lrte_cfgfile
|
2018-06-23 23:17:41 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_GRO) += -lrte_gro
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_GSO) += -lrte_gso
|
2016-06-10 13:19:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_HASH) += -lrte_hash
|
2017-10-04 03:12:19 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMBER) += -lrte_member
|
2016-06-10 13:19:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lrte_vhost
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) += -lrte_kvargs
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF) += -lrte_mbuf
|
2016-10-03 08:38:45 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_NET) += -lrte_net
|
2016-11-06 18:18:23 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER) += -lrte_ethdev
|
2018-01-11 19:23:18 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_BBDEV) += -lrte_bbdev
|
2015-11-25 13:25:12 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += -lrte_cryptodev
|
2017-10-25 15:07:23 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_SECURITY) += -lrte_security
|
2018-04-27 13:23:54 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_COMPRESSDEV) += -lrte_compressdev
|
2016-12-06 01:51:46 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += -lrte_eventdev
|
rawdev: introduce raw device library
Each device in DPDK has a type associated with it - ethernet, crypto,
event etc. This patch introduces 'rawdevice' which is a generic
type of device, not currently handled out-of-the-box by DPDK.
A device which can be scanned on an installed bus (pci, fslmc, ...)
or instantiated through devargs, can be interfaced using
standardized APIs just like other standardized devices.
This library introduces an API set which can be plugged on the
northbound side to the application layer, and on the southbound side
to the driver layer.
The APIs of rawdev library exposes some generic operations which can
enable configuration and I/O with the raw devices. Using opaque
data (pointer) as API arguments, library allows a high flexibility
for application and driver implementation.
This patch introduces basic device operations like start, stop, reset,
queue and info support.
Subsequent patches would introduce other operations like buffer
enqueue/dequeue and firmware support.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-01-31 09:13:09 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_RAWDEV) += -lrte_rawdev
|
2018-04-04 21:51:09 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_TIMER) += -lrte_timer
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += -lrte_mempool
|
2017-04-13 09:02:07 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_DRIVER_MEMPOOL_RING) += -lrte_mempool_ring
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_RING) += -lrte_ring
|
2017-10-26 10:06:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PCI) += -lrte_pci
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrte_eal
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE) += -lrte_cmdline
|
2017-01-24 16:23:58 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER) += -lrte_reorder
|
2017-10-10 10:18:14 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrte_sched
|
2016-06-10 13:19:08 +00:00
|
|
|
|
2017-02-17 13:42:38 +00:00
|
|
|
ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_KNI) += -lrte_kni
|
|
|
|
endif
|
|
|
|
|
2018-04-04 14:30:25 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL),yy)
|
|
|
|
_LDLIBS-y += -lrte_common_octeontx
|
|
|
|
endif
|
|
|
|
|
2017-10-26 10:06:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += -lrte_bus_pci
|
2017-11-07 06:54:21 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += -lrte_bus_vdev
|
2018-02-23 09:58:03 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += -lrte_bus_dpaa
|
|
|
|
ifeq ($(CONFIG_RTE_EAL_VFIO),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += -lrte_bus_fslmc
|
|
|
|
endif
|
2017-10-26 10:06:08 +00:00
|
|
|
|
mk: fix linking drivers in static apps
The variable CONFIG_RTE_BUILD_SHARED_LIB was in rte.app.mk as
"RTE_BUILD_SHARED_LIB", which meant that none of the example apps linked
in the PMDs and just didn't work with any eth ports in any static builds.
This bug has been introduced in commit 3660cdf990:
pcap: convert to use of PMD_REGISTER_DRIVER and fix linking
Link for l2fwd before patch:
"... -Wl,--whole-archive -Wl,-lrte_kni -Wl,-lrte_timer -Wl,-lrte_hash
-Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_meter -Wl,-lrte_sched -Wl,-lm
-Wl,-lrt -Wl,--start-group -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lethdev
-Wl,-lrte_malloc -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal
-Wl,-lrte_cmdline -Wl,-lrt -Wl,-lm -Wl,-ldl -Wl,--end-group
-Wl,--no-whole-archive"
Link for l2fwd after patch:
"... -Wl,--whole-archive -Wl,-lrte_kni -Wl,-lrte_timer -Wl,-lrte_hash
-Wl,-lrte_lpm -Wl,-lrte_power -Wl,-lrte_meter -Wl,-lrte_sched -Wl,-lm
-Wl,-lrt -Wl,--start-group -Wl,-lrte_kvargs -Wl,-lrte_mbuf -Wl,-lethdev
-Wl,-lrte_malloc -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal
-Wl,-lrte_cmdline -Wl,-lrte_pmd_vmxnet3_uio -Wl,-lrte_pmd_virtio_uio
-Wl,-lrte_pmd_ixgbe -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ring -Wl,-lrt
-Wl,-lm -Wl,-ldl -Wl,--end-group -Wl,--no-whole-archive"
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-23 14:39:24 +00:00
|
|
|
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
|
2014-06-25 20:07:43 +00:00
|
|
|
# plugins (link only if static libraries)
|
2017-04-13 09:02:07 +00:00
|
|
|
|
2018-04-26 10:59:19 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_DRIVER_MEMPOOL_BUCKET) += -lrte_mempool_bucket
|
2017-03-31 05:35:37 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_DRIVER_MEMPOOL_STACK) += -lrte_mempool_stack
|
2018-02-23 09:58:03 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_DPAA_BUS),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_DPAA_MEMPOOL) += -lrte_mempool_dpaa
|
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL) += -lrte_mempool_dpaa2
|
|
|
|
endif
|
ring: convert to use of PMD_REGISTER_DRIVER and fix linking
Convert the ring driver to use the PMD_REGISTER_DRIVER macro and fix up the
Makefile so that its linkage is only done if we are building static libraries.
This means that the test applications now have no reference to the ring library
when building DSO's and must specify its use on the command line with the -d
option. Static linking will still initalize the driver automatically.
Note that the ring driver was also written in such a way that it violated some
general layering principles, several functions were contained in the pmd which
were being called by example from the test application in the app/test
directory. Specifically it was calling eth_ring_pair_attach,
eth_ring_pair_create and rte_eth_ring_devinit, which should only be called
internally to the dpdk core library. To correct this I've removed those
functions, and instead allowed them to be called indirectly at initalization
time using the vdev command line argument key nodeaction=<name>:<node>:<action>
where action is one of ATTACH or CREATE. I've tested out the functionality of
the command line with the testpmd utility, with success, and have removed the
called functions from the test utility. This will affect how the test utility
is invoked (the -d and --vdev option will need to be specified on the command
line now), but honestly, given the way it was coded, I think the testing of the
ring pmd was not the best example of how to code with dpdk to begin with. I
have also left the two layer violating functions in place, so as not to break
existing applications, but added deprecation warnings to them so that apps can
migrate off them.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-04-21 14:59:29 +00:00
|
|
|
|
2016-06-10 13:19:04 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += -lrte_pmd_af_packet
|
2017-04-04 19:50:23 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_ARK_PMD) += -lrte_pmd_ark
|
2018-01-10 13:01:54 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_AVF_PMD) += -lrte_pmd_avf
|
2017-03-28 11:53:59 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_AVP_PMD) += -lrte_pmd_avp
|
2018-04-06 12:36:34 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_AXGBE_PMD) += -lrte_pmd_axgbe
|
2016-06-10 13:19:05 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lrte_pmd_bnx2x -lz
|
2016-06-15 21:23:01 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += -lrte_pmd_bnxt
|
2017-01-31 15:04:48 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += -lrte_pmd_bond
|
2015-06-29 23:28:35 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += -lrte_pmd_cxgbe
|
2017-09-28 12:29:43 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_DPAA_BUS),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_DPAA_PMD) += -lrte_pmd_dpaa
|
|
|
|
endif
|
2018-02-23 09:58:03 +00:00
|
|
|
ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy)
|
2017-04-11 13:49:17 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += -lrte_pmd_dpaa2
|
2018-02-23 09:58:03 +00:00
|
|
|
endif
|
2016-06-10 13:19:04 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += -lrte_pmd_e1000
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += -lrte_pmd_ena
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += -lrte_pmd_enic
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += -lrte_pmd_fm10k
|
2017-07-18 12:48:14 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_FAILSAFE) += -lrte_pmd_failsafe
|
2016-06-10 13:19:04 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += -lrte_pmd_i40e
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe
|
2017-02-17 13:42:38 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_KNI) += -lrte_pmd_kni
|
|
|
|
endif
|
2017-03-25 06:24:12 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_LIO_PMD) += -lrte_pmd_lio
|
2018-01-30 15:34:54 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_MLX4_DLOPEN_DEPS),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -lrte_pmd_mlx4 -ldl
|
|
|
|
else
|
net/mlx4: add RSS flow rule action support
This patch dissociates single-queue indirection tables and hash QP objects
from Rx queue structures to relinquish their control to users through the
RSS flow rule action, while simultaneously allowing multiple queues to be
associated with RSS contexts.
Flow rules share identical RSS contexts (hashed fields, hash key, target
queues) to save on memory and other resources. The trade-off is some added
complexity due to reference counters management on RSS contexts.
The QUEUE action is re-implemented on top of an automatically-generated
single-queue RSS context.
The following hardware limitations apply to RSS contexts:
- The number of queues in a group must be a power of two.
- Queue indices must be consecutive, for instance the [0 1 2 3] set is
allowed, however [3 2 1 0], [0 2 1 3] and [0 0 1 1 2 3 3 3] are not.
- The first queue of a group must be aligned to a multiple of the context
size, e.g. if queues [0 1 2 3 4] are defined globally, allowed group
combinations are [0 1] and [2 3]; groups [1 2] and [3 4] are not
supported.
- RSS hash key, while configurable per context, must be exactly 40 bytes
long.
- The only supported hash algorithm is Toeplitz.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-12 12:19:41 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -lrte_pmd_mlx4 -libverbs -lmlx4
|
2018-01-30 15:34:54 +00:00
|
|
|
endif
|
2018-01-30 15:34:58 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -lrte_pmd_mlx5 -ldl
|
|
|
|
else
|
2017-09-26 15:38:24 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -lrte_pmd_mlx5 -libverbs -lmlx5
|
2018-01-30 15:34:58 +00:00
|
|
|
endif
|
2018-03-26 14:38:50 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_MVPP2_PMD) += -lrte_pmd_mvpp2 -L$(LIBMUSDK_PATH)/lib -lmusdk
|
2017-04-06 14:15:36 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += -lrte_pmd_nfp
|
2016-06-10 13:19:04 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += -lrte_pmd_null
|
2016-06-10 13:19:05 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap -lpcap
|
2016-10-19 04:11:44 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += -lrte_pmd_qede
|
2016-06-10 13:19:04 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING) += -lrte_pmd_ring
|
2017-10-10 10:18:14 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += -lrte_pmd_softnic
|
|
|
|
endif
|
2016-11-29 16:18:33 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_SFC_EFX_PMD) += -lrte_pmd_sfc_efx
|
2016-06-10 13:19:05 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += -lrte_pmd_szedata2 -lsze2
|
2016-12-12 14:38:38 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += -lrte_pmd_tap
|
2017-07-06 14:20:25 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += -lrte_pmd_thunderx_nicvf
|
2018-01-18 13:51:42 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_NETVSC_PMD) += -lrte_pmd_vdev_netvsc
|
2016-06-10 13:19:04 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += -lrte_pmd_virtio
|
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_VHOST),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += -lrte_pmd_vhost
|
net/ifcvf: add ifcvf vDPA driver
The IFCVF vDPA (vhost data path acceleration) driver provides support for
the Intel FPGA 100G VF (IFCVF). IFCVF's datapath is virtio ring compatible,
it works as a HW vhost backend which can send/receive packets to/from
virtio directly by DMA.
Different VF devices serve different virtio frontends which are in
different VMs, so each VF needs to have its own DMA address translation
service. During the driver probe a new container is created, with this
container vDPA driver can program DMA remapping table with the VM's memory
region information.
Key vDPA driver ops implemented:
- ifcvf_dev_config:
Enable VF data path with virtio information provided by vhost lib,
including IOMMU programming to enable VF DMA to VM's memory, VFIO
interrupt setup to route HW interrupt to virtio driver, create notify
relay thread to translate virtio driver's kick to a MMIO write onto HW,
HW queues configuration.
- ifcvf_dev_close:
Revoke all the setup in ifcvf_dev_config.
Live migration feature is supported by IFCVF and this driver enables
it. For the dirty page logging, VF helps to log for packet buffer write,
driver helps to make the used ring as dirty when device stops.
Because vDPA driver needs to set up MSI-X vector to interrupt the
guest, only vfio-pci is supported currently.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-17 07:06:23 +00:00
|
|
|
ifeq ($(CONFIG_RTE_EAL_VFIO),y)
|
2018-06-13 11:32:45 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_IFC_PMD) += -lrte_pmd_ifc
|
net/ifcvf: add ifcvf vDPA driver
The IFCVF vDPA (vhost data path acceleration) driver provides support for
the Intel FPGA 100G VF (IFCVF). IFCVF's datapath is virtio ring compatible,
it works as a HW vhost backend which can send/receive packets to/from
virtio directly by DMA.
Different VF devices serve different virtio frontends which are in
different VMs, so each VF needs to have its own DMA address translation
service. During the driver probe a new container is created, with this
container vDPA driver can program DMA remapping table with the VM's memory
region information.
Key vDPA driver ops implemented:
- ifcvf_dev_config:
Enable VF data path with virtio information provided by vhost lib,
including IOMMU programming to enable VF DMA to VM's memory, VFIO
interrupt setup to route HW interrupt to virtio driver, create notify
relay thread to translate virtio driver's kick to a MMIO write onto HW,
HW queues configuration.
- ifcvf_dev_close:
Revoke all the setup in ifcvf_dev_config.
Live migration feature is supported by IFCVF and this driver enables
it. For the dirty page logging, VF helps to log for packet buffer write,
driver helps to make the used ring as dirty when device stops.
Because vDPA driver needs to set up MSI-X vector to interrupt the
guest, only vfio-pci is supported currently.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-17 07:06:23 +00:00
|
|
|
endif # $(CONFIG_RTE_EAL_VFIO)
|
2016-06-10 13:19:04 +00:00
|
|
|
endif # $(CONFIG_RTE_LIBRTE_VHOST)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += -lrte_pmd_vmxnet3_uio
|
2015-11-25 13:25:14 +00:00
|
|
|
|
2018-01-11 19:23:19 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_BBDEV),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL) += -lrte_pmd_bbdev_null
|
2018-01-11 19:23:20 +00:00
|
|
|
|
|
|
|
# TURBO SOFTWARE PMD is dependent on the FLEXRAN library
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lrte_pmd_bbdev_turbo_sw
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcrc
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps
|
2018-01-11 19:23:19 +00:00
|
|
|
endif # CONFIG_RTE_LIBRTE_BBDEV
|
|
|
|
|
2016-03-11 13:29:40 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
|
2016-10-04 15:11:19 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += -lrte_pmd_aesni_mb
|
2018-03-27 12:14:29 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += -lIPSec_MB
|
2017-07-04 00:12:40 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += -lrte_pmd_aesni_gcm
|
2018-03-27 12:14:30 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += -lIPSec_MB
|
2018-03-19 12:23:35 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CCP) += -lrte_pmd_ccp -lcrypto
|
2016-10-18 11:36:13 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += -lrte_pmd_openssl -lcrypto
|
2016-03-11 01:04:10 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto
|
2016-10-04 15:11:19 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += -lrte_pmd_qat -lcrypto
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += -lrte_pmd_snow3g
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += -L$(LIBSSO_SNOW3G_PATH)/build -lsso_snow3g
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += -lrte_pmd_kasumi
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += -L$(LIBSSO_KASUMI_PATH)/build -lsso_kasumi
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += -lrte_pmd_zuc
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += -L$(LIBSSO_ZUC_PATH)/build -lsso_zuc
|
2017-01-18 20:01:54 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += -lrte_pmd_armv8
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += -L$(ARMV8_CRYPTO_LIB_PATH) -larmv8_crypto
|
2018-05-08 08:14:04 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_MVSAM_CRYPTO) += -L$(LIBMUSDK_PATH)/lib -lrte_pmd_mvsam_crypto -lmusdk
|
2017-01-31 15:04:48 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER) += -lrte_pmd_crypto_scheduler
|
2018-02-23 09:58:03 +00:00
|
|
|
ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy)
|
2017-04-20 05:44:16 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += -lrte_pmd_dpaa2_sec
|
|
|
|
endif # CONFIG_RTE_LIBRTE_FSLMC_BUS
|
2017-10-09 14:21:40 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_DPAA_BUS),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA_SEC) += -lrte_pmd_dpaa_sec
|
|
|
|
endif # CONFIG_RTE_LIBRTE_DPAA_BUS
|
2018-04-17 09:23:17 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO) += -lrte_pmd_virtio_crypto
|
2016-03-11 13:29:40 +00:00
|
|
|
endif # CONFIG_RTE_LIBRTE_CRYPTODEV
|
2016-03-10 16:33:12 +00:00
|
|
|
|
2018-05-09 16:14:26 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_COMPRESSDEV),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += -lrte_pmd_isal_comp
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ISAL) += -lisal
|
|
|
|
endif # CONFIG_RTE_LIBRTE_COMPRESSDEV
|
|
|
|
|
2016-11-18 05:45:01 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_EVENTDEV),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV) += -lrte_pmd_skeleton_event
|
2017-03-30 19:30:31 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += -lrte_pmd_sw_event
|
2017-03-03 17:27:46 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += -lrte_pmd_octeontx_ssovf
|
2018-02-23 09:58:03 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_DPAA_BUS),y)
|
2018-01-16 20:43:58 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA_EVENTDEV) += -lrte_pmd_dpaa_event
|
2018-02-23 09:58:03 +00:00
|
|
|
endif # CONFIG_RTE_LIBRTE_DPAA_BUS
|
|
|
|
ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy)
|
2017-06-30 08:54:16 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += -lrte_pmd_dpaa2_event
|
2018-02-23 09:58:03 +00:00
|
|
|
endif # CONFIG_RTE_LIBRTE_FSLMC_BUS
|
|
|
|
|
2017-10-08 12:40:03 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL) += -lrte_mempool_octeontx
|
2017-10-08 12:44:05 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += -lrte_pmd_octeontx
|
2018-01-09 14:18:50 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_OPDL_EVENTDEV) += -lrte_pmd_opdl_event
|
2016-11-18 05:45:01 +00:00
|
|
|
endif # CONFIG_RTE_LIBRTE_EVENTDEV
|
|
|
|
|
2018-01-31 09:13:15 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_RAWDEV),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_RAWDEV) += -lrte_pmd_skeleton_rawdev
|
2018-05-03 16:06:07 +00:00
|
|
|
ifeq ($(CONFIG_RTE_EAL_VFIO)$(CONFIG_RTE_LIBRTE_FSLMC_BUS),yy)
|
2018-05-04 10:11:26 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_CMDIF_RAWDEV) += -lrte_pmd_dpaa2_cmdif
|
2018-05-03 16:06:07 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_QDMA_RAWDEV) += -lrte_pmd_dpaa2_qdma
|
|
|
|
endif # CONFIG_RTE_LIBRTE_FSLMC_BUS
|
2018-05-11 08:31:29 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_IFPGA_BUS) += -lrte_bus_ifpga
|
2018-05-11 08:31:31 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_IFPGA_BUS),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_IFPGA_RAWDEV) += -lrte_pmd_ifpga_rawdev
|
|
|
|
endif # CONFIG_RTE_LIBRTE_IFPGA_BUS
|
2018-01-31 09:13:15 +00:00
|
|
|
endif # CONFIG_RTE_LIBRTE_RAWDEV
|
|
|
|
|
2016-06-10 13:19:08 +00:00
|
|
|
endif # !CONFIG_RTE_BUILD_SHARED_LIBS
|
|
|
|
|
2016-06-10 13:19:09 +00:00
|
|
|
_LDLIBS-y += --no-whole-archive
|
|
|
|
|
2016-06-10 13:19:08 +00:00
|
|
|
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
|
|
|
|
# The static libraries do not know their dependencies.
|
|
|
|
# So linking with static library requires explicit dependencies.
|
2016-07-18 09:33:52 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrt
|
2017-06-29 05:59:19 +00:00
|
|
|
ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP)$(CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES),yy)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lnuma
|
|
|
|
endif
|
eal: support strlcpy function
The strncpy function is error prone for doing "safe" string copies, so
we generally try to use "snprintf" instead in the code. The function
"strlcpy" is a better alternative, since it better conveys the
intention of the programmer, and doesn't suffer from the non-null
terminating behaviour of it's n'ed brethern.
The downside of this function is that it is not available by default
on linux, though standard in the BSD's. It is available on most
distros by installing "libbsd" package.
This patch therefore provides the following in rte_string_fns.h to ensure
that strlcpy is available there:
* for BSD, include string.h as normal
* if RTE_USE_LIBBSD is set, include <bsd/string.h>
* if not set, fallback to snprintf for strlcpy
Using make build system, the RTE_USE_LIBBSD is a hard-coded value to "n",
but when using meson, it's automatically set based on what is available
on the platform.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
2018-03-12 11:32:59 +00:00
|
|
|
ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP)$(CONFIG_RTE_USE_LIBBSD),yy)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lbsd
|
|
|
|
endif
|
2016-06-10 13:19:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt
|
2017-10-04 03:12:19 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMBER) += -lm
|
2016-06-10 13:19:08 +00:00
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lm
|
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
|
|
|
|
_LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lnuma
|
|
|
|
endif
|
|
|
|
_LDLIBS-$(CONFIG_RTE_PORT_PCAP) += -lpcap
|
|
|
|
endif # !CONFIG_RTE_BUILD_SHARED_LIBS
|
2013-09-18 10:00:00 +00:00
|
|
|
|
2015-05-14 14:21:31 +00:00
|
|
|
_LDLIBS-y += $(EXECENV_LDLIBS)
|
2016-06-10 13:19:06 +00:00
|
|
|
|
2015-05-14 14:21:32 +00:00
|
|
|
LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS)
|
2012-09-04 12:54:00 +00:00
|
|
|
|
2017-04-06 14:14:55 +00:00
|
|
|
# all the words except the first one
|
|
|
|
allbutfirst = $(wordlist 2,$(words $(1)),$(1))
|
|
|
|
|
|
|
|
# Eliminate duplicates without sorting, only keep the last occurrence
|
|
|
|
filter-libs = \
|
|
|
|
$(if $(1),$(strip\
|
|
|
|
$(if \
|
|
|
|
$(and \
|
|
|
|
$(filter $(firstword $(1)),$(call allbutfirst,$(1))),\
|
|
|
|
$(filter -l%,$(firstword $(1)))),\
|
|
|
|
,\
|
|
|
|
$(firstword $(1))) \
|
|
|
|
$(call filter-libs,$(call allbutfirst,$(1)))))
|
|
|
|
|
|
|
|
LDLIBS := $(call filter-libs,$(LDLIBS))
|
2016-03-21 11:33:57 +00:00
|
|
|
|
2016-05-03 15:03:39 +00:00
|
|
|
ifeq ($(RTE_DEVEL_BUILD)$(CONFIG_RTE_BUILD_SHARED_LIB),yy)
|
|
|
|
LDFLAGS += -rpath=$(RTE_SDK_BIN)/lib
|
|
|
|
endif
|
|
|
|
|
2016-07-12 12:25:35 +00:00
|
|
|
MAPFLAGS = -Map=$@.map --cref
|
|
|
|
|
2012-09-04 12:54:00 +00:00
|
|
|
.PHONY: all
|
|
|
|
all: install
|
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install: build _postinstall
|
|
|
|
|
|
|
|
_postinstall: build
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: _postbuild
|
|
|
|
|
|
|
|
exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
|
|
|
|
|
|
|
|
ifeq ($(LINK_USING_CC),1)
|
2017-04-25 16:10:47 +00:00
|
|
|
O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(OBJS-y) $(call linkerprefix, \
|
2016-07-12 13:00:13 +00:00
|
|
|
$(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
|
2016-07-12 12:25:35 +00:00
|
|
|
$(MAPFLAGS))
|
2012-09-04 12:54:00 +00:00
|
|
|
else
|
2016-07-12 12:25:35 +00:00
|
|
|
O_TO_EXE = $(LD) -o $@ $(OBJS-y) \
|
2016-07-12 13:00:13 +00:00
|
|
|
$(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
|
2016-07-12 12:25:35 +00:00
|
|
|
$(MAPFLAGS)
|
2012-09-04 12:54:00 +00:00
|
|
|
endif
|
|
|
|
O_TO_EXE_STR = $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlight
|
|
|
|
O_TO_EXE_DISP = $(if $(V),"$(O_TO_EXE_STR)"," LD $(@)")
|
|
|
|
O_TO_EXE_CMD = "cmd_$@ = $(O_TO_EXE_STR)"
|
|
|
|
O_TO_EXE_DO = @set -e; \
|
|
|
|
echo $(O_TO_EXE_DISP); \
|
|
|
|
$(O_TO_EXE) && \
|
|
|
|
echo $(O_TO_EXE_CMD) > $(call exe2cmd,$(@))
|
|
|
|
|
|
|
|
-include .$(APP).cmd
|
|
|
|
|
|
|
|
# path where libraries are retrieved
|
|
|
|
LDLIBS_PATH := $(subst -Wl$(comma)-L,,$(filter -Wl$(comma)-L%,$(LDLIBS)))
|
|
|
|
LDLIBS_PATH += $(subst -L,,$(filter -L%,$(LDLIBS)))
|
|
|
|
|
|
|
|
# list of .a files that are linked to this application
|
|
|
|
LDLIBS_NAMES := $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS)))
|
|
|
|
LDLIBS_NAMES += $(patsubst -Wl$(comma)-l%,lib%.a,$(filter -Wl$(comma)-l%,$(LDLIBS)))
|
|
|
|
|
|
|
|
# list of found libraries files (useful for deps). If not found, the
|
|
|
|
# library is silently ignored and dep won't be checked
|
2017-10-12 13:15:53 +00:00
|
|
|
LDLIBS_FILES := $(sort $(wildcard $(foreach dir,$(LDLIBS_PATH),\
|
|
|
|
$(addprefix $(dir)/,$(LDLIBS_NAMES)))))
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Compile executable file if needed
|
|
|
|
#
|
|
|
|
$(APP): $(OBJS-y) $(LDLIBS_FILES) $(DEP_$(APP)) $(LDSCRIPT) FORCE
|
|
|
|
@[ -d $(dir $@) ] || mkdir -p $(dir $@)
|
|
|
|
$(if $(D),\
|
|
|
|
@echo -n "$< -> $@ " ; \
|
|
|
|
echo -n "file_missing=$(call boolean,$(file_missing)) " ; \
|
|
|
|
echo -n "cmdline_changed=$(call boolean,$(call cmdline_changed,$(O_TO_EXE_STR))) " ; \
|
|
|
|
echo -n "depfile_missing=$(call boolean,$(depfile_missing)) " ; \
|
|
|
|
echo "depfile_newer=$(call boolean,$(depfile_newer)) ")
|
|
|
|
$(if $(or \
|
|
|
|
$(file_missing),\
|
|
|
|
$(call cmdline_changed,$(O_TO_EXE_STR)),\
|
|
|
|
$(depfile_missing),\
|
|
|
|
$(depfile_newer)),\
|
|
|
|
$(O_TO_EXE_DO))
|
|
|
|
|
|
|
|
#
|
|
|
|
# install app in $(RTE_OUTPUT)/app
|
|
|
|
#
|
|
|
|
$(RTE_OUTPUT)/app/$(APP): $(APP)
|
|
|
|
@echo " INSTALL-APP $(APP)"
|
|
|
|
@[ -d $(RTE_OUTPUT)/app ] || mkdir -p $(RTE_OUTPUT)/app
|
|
|
|
$(Q)cp -f $(APP) $(RTE_OUTPUT)/app
|
|
|
|
|
|
|
|
#
|
|
|
|
# install app map file in $(RTE_OUTPUT)/app
|
|
|
|
#
|
|
|
|
$(RTE_OUTPUT)/app/$(APP).map: $(APP)
|
|
|
|
@echo " INSTALL-MAP $(APP).map"
|
|
|
|
@[ -d $(RTE_OUTPUT)/app ] || mkdir -p $(RTE_OUTPUT)/app
|
|
|
|
$(Q)cp -f $(APP).map $(RTE_OUTPUT)/app
|
|
|
|
|
|
|
|
#
|
|
|
|
# Clean all generated files
|
|
|
|
#
|
|
|
|
.PHONY: clean
|
2015-01-30 10:35:14 +00:00
|
|
|
clean: _postclean
|
2012-09-04 12:54:00 +00:00
|
|
|
$(Q)rm -f $(_BUILD_TARGETS) $(_INSTALL_TARGETS) $(_CLEAN_TARGETS)
|
|
|
|
|
|
|
|
.PHONY: doclean
|
|
|
|
doclean:
|
|
|
|
$(Q)rm -rf $(APP) $(OBJS-all) $(DEPS-all) $(DEPSTMP-all) \
|
2017-02-22 20:54:45 +00:00
|
|
|
$(CMDS-all) $(INSTALL-FILES-all) .$(APP).cmd $(APP).map
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
include $(RTE_SDK)/mk/internal/rte.compile-post.mk
|
|
|
|
include $(RTE_SDK)/mk/internal/rte.install-post.mk
|
|
|
|
include $(RTE_SDK)/mk/internal/rte.clean-post.mk
|
|
|
|
include $(RTE_SDK)/mk/internal/rte.build-post.mk
|
|
|
|
|
|
|
|
ifneq ($(wildcard $(RTE_SDK)/mk/target/$(RTE_TARGET)/rte.app.mk),)
|
|
|
|
include $(RTE_SDK)/mk/target/$(RTE_TARGET)/rte.app.mk
|
|
|
|
else
|
|
|
|
include $(RTE_SDK)/mk/target/generic/rte.app.mk
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: FORCE
|
|
|
|
FORCE:
|