doc: remove references to make from apps guide
[dpdk.git] / doc / guides / sample_app_ug / compiling.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2015 Intel Corporation.
3
4 Compiling the Sample Applications
5 =================================
6
7 This section explains how to compile the DPDK sample applications.
8
9 To compile all the sample applications
10 --------------------------------------
11
12 Go to DPDK build directory:
13
14     .. code-block:: console
15
16        cd dpdk/<build_dir>
17
18 Enable examples compilation:
19
20    .. code-block:: console
21
22       meson configure -Dexamples=all
23
24 Build:
25
26    .. code-block:: console
27
28       ninja
29
30 For additional information on compiling see
31 :ref:`Compiling DPDK on Linux <linux_gsg_compiling_dpdk>` or
32 :ref:`Compiling DPDK on FreeBSD <building_from_source>`.
33 Applications are output to: ``dpdk/<build_dir>/examples``.
34
35
36 To compile a single application
37 -------------------------------
38
39
40 Using meson
41 ~~~~~~~~~~~
42
43 Go to DPDK build directory:
44
45     .. code-block:: console
46
47        cd dpdk/<build_dir>
48
49 Enable example app compilation:
50
51    .. code-block:: console
52
53       meson configure -Dexamples=helloworld
54
55 Build:
56
57    .. code-block:: console
58
59       ninja
60
61
62 Using Make
63 ~~~~~~~~~~
64
65 Pkg-config is used when building an example app standalone using make, please
66 see :ref:`building_app_using_installed_dpdk` for more information.
67
68 Go to the sample application directory. Unless otherwise specified the sample
69 applications are located in ``dpdk/examples/``.
70
71 Build the application:
72
73     .. code-block:: console
74
75         make
76
77 To build the application for debugging use the ``DEBUG`` option.
78 This option adds some extra flags, disables compiler optimizations and
79 sets verbose output.
80
81     .. code-block:: console
82
83        make DEBUG=1