1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2015 Intel Corporation.
4 Compiling the Sample Applications
5 =================================
7 This section explains how to compile the DPDK sample applications.
9 To compile all the sample applications
10 --------------------------------------
13 Set the path to DPDK source code if its not set:
15 .. code-block:: console
17 export RTE_SDK=/path/to/rte_sdk
21 .. code-block:: console
27 .. code-block:: console
32 Build the sample applications:
34 .. code-block:: console
36 export RTE_TARGET=build
39 For other possible ``RTE_TARGET`` values and additional information on
41 :ref:`Compiling DPDK on Linux <linux_gsg_compiling_dpdk>` or
42 :ref:`Compiling DPDK on FreeBSD <building_from_source>`.
43 Applications are output to: ``$RTE_SDK/examples/app-dir/build`` or
44 ``$RTE_SDK/examples/app-dir/$RTE_TARGET``.
47 In the example above the compiled application is written to the ``build`` subdirectory.
48 To have the applications written to a different location,
49 the ``O=/path/to/build/directory`` option may be specified in the make command.
51 .. code-block:: console
55 To build the applications for debugging use the ``DEBUG`` option.
56 This option adds some extra flags, disables compiler optimizations and
59 .. code-block:: console
64 To compile a single application
65 -------------------------------
67 Set the path to DPDK source code:
69 .. code-block:: console
71 export RTE_SDK=/path/to/rte_sdk
75 .. code-block:: console
81 .. code-block:: console
86 Go to the sample application directory. Unless otherwise specified the sample
87 applications are located in ``$RTE_SDK/examples/``.
90 Build the application:
92 .. code-block:: console
94 export RTE_TARGET=build