2 Copyright(c) 2015 Intel Corporation. All rights reserved.
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
9 * Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 * Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in
13 the documentation and/or other materials provided with the
15 * Neither the name of Intel Corporation nor the names of its
16 contributors may be used to endorse or promote products derived
17 from this software without specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 Compiling the Sample Applications
32 =================================
34 This section explains how to compile the DPDK sample applications.
36 To compile all the sample applications
37 --------------------------------------
40 Set the path to DPDK source code if its not set:
42 .. code-block:: console
44 export RTE_SDK=/path/to/rte_sdk
48 .. code-block:: console
54 .. code-block:: console
59 Build the sample applications:
61 .. code-block:: console
63 export RTE_TARGET=build
66 For other possible ``RTE_TARGET`` values and additional information on
68 :ref:`Compiling DPDK on Linux <linux_gsg_compiling_dpdk>` or
69 :ref:`Compiling DPDK on FreeBSD <building_from_source>`.
70 Applications are output to: ``$RTE_SDK/examples/app-dir/build`` or
71 ``$RTE_SDK/examples/app-dir/$RTE_TARGET``.
74 In the example above the compiled application is written to the ``build`` subdirectory.
75 To have the applications written to a different location,
76 the ``O=/path/to/build/directory`` option may be specified in the make command.
78 .. code-block:: console
82 To build the applications for debugging use the ``DEBUG`` option.
83 This option adds some extra flags, disables compiler optimizations and
86 .. code-block:: console
91 To compile a single application
92 -------------------------------
94 Set the path to DPDK source code:
96 .. code-block:: console
98 export RTE_SDK=/path/to/rte_sdk
102 .. code-block:: console
108 .. code-block:: console
113 Go to the sample application directory. Unless otherwise specified the sample
114 applications are located in ``$RTE_SDK/examples/``.
117 Build the application:
119 .. code-block:: console
121 export RTE_TARGET=build