File: compiling.rst

package info (click to toggle)
dpdk 24.11.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 121,148 kB
  • sloc: ansic: 2,206,055; python: 11,866; sh: 4,627; makefile: 2,025; awk: 70
file content (83 lines) | stat: -rw-r--r-- 1,657 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
..  SPDX-License-Identifier: BSD-3-Clause
    Copyright(c) 2015 Intel Corporation.

Compiling the Sample Applications
=================================

This section explains how to compile the DPDK sample applications.

To compile all the sample applications
--------------------------------------

Go to DPDK build directory:

    .. code-block:: console

       cd dpdk/<build_dir>

Enable examples compilation:

   .. code-block:: console

      meson configure -Dexamples=all

Build:

   .. code-block:: console

      ninja

For additional information on compiling see
:ref:`Compiling DPDK on Linux <linux_gsg_compiling_dpdk>` or
:ref:`Compiling DPDK on FreeBSD <building_from_source>`.
Applications are output to: ``dpdk/<build_dir>/examples``.


To compile a single application
-------------------------------


Using meson
~~~~~~~~~~~

Go to DPDK build directory:

    .. code-block:: console

       cd dpdk/<build_dir>

Enable example app compilation:

   .. code-block:: console

      meson configure -Dexamples=helloworld

Build:

   .. code-block:: console

      ninja


Using Make
~~~~~~~~~~

Pkg-config is used when building an example app standalone using make, please
see :ref:`building_app_using_installed_dpdk` for more information.

Go to the sample application directory. Unless otherwise specified the sample
applications are located in ``dpdk/examples/``.

Build the application:

    .. code-block:: console

        make

To build the application for debugging use the ``DEBUG`` option.
This option adds some extra flags, disables compiler optimizations and
sets verbose output.

    .. code-block:: console

       make DEBUG=1