2 Copyright(c) 2010-2014 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 .. _External_Application/Library_Makefile_help:
33 External Application/Library Makefile help
34 ==========================================
36 External applications or libraries should include specific Makefiles from RTE_SDK, located in mk directory.
39 * ${RTE_SDK}/mk/rte.extapp.mk: Build an application
41 * ${RTE_SDK}/mk/rte.extlib.mk: Build a static library
43 * ${RTE_SDK}/mk/rte.extobj.mk: Build objects (.o)
48 The following variables must be defined:
50 * ${RTE_SDK}: Points to the root directory of the DPDK.
52 * ${RTE_TARGET}: Reference the target to be used for compilation (for example, x86_64-native-linuxapp-gcc).
57 Build targets support the specification of the name of the output directory, using O=mybuilddir.
58 This is optional; the default output directory is build.
60 * all, "nothing" (meaning just make)
62 Build the application or the library in the specified output directory.
66 .. code-block:: console
72 Clean all objects created using make build.
76 .. code-block:: console
87 Other Useful Command-line Variables
88 -----------------------------------
90 The following variables can be specified at the command line:
94 Specify the directory in which the sources are located. By default, it is the current directory.
98 Specify the Makefile to call once the output directory is created. By default, it uses $(S)/Makefile.
102 Enable verbose build (show full compilation command line and some intermediate commands).
106 Enable dependency debugging. This provides some useful information about why a target must be rebuilt or not.
108 * EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
110 Append specific compilation, link or asm flags.
114 Specify a cross-toolchain header that will prefix all gcc/binutils applications. This only works when using gcc.
116 Make from Another Directory
117 ---------------------------
119 It is possible to run the Makefile from another directory, by specifying the output and the source dir. For example:
121 .. code-block:: console
123 export RTE_SDK=/path/to/DPDK
124 export RTE_TARGET=x86_64-native-linuxapp-icc
125 make -f /path/to/my_app/Makefile S=/path/to/my_app O=/path/to/build_dir