1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2010-2014 Intel Corporation.
4 .. _Development_Kit_Root_Makefile_Help:
6 Development Kit Root Makefile Help
7 ==================================
9 The DPDK provides a root level Makefile with targets for configuration, building, cleaning, testing, installation and others.
10 These targets are explained in the following sections.
15 The configuration target requires the name of the target, which is specified using T=mytarget and it is mandatory.
16 The list of available targets are in $(RTE_SDK)/config (remove the defconfig _ prefix).
18 Configuration targets also support the specification of the name of the output directory, using O=mybuilddir.
19 This is an optional parameter, the default output directory is build.
23 This will create a build directory, and generates a configuration from a template.
24 A Makefile is also created in the new build directory.
28 .. code-block:: console
30 make config O=mybuild T=x86_64-native-linux-gcc
35 Build targets support the optional specification of the name of the output directory, using O=mybuilddir.
36 The default output directory is build.
38 * all, build or just make
40 Build the DPDK in the output directory previously created by a make config.
44 .. code-block:: console
50 Clean all objects created using make build.
54 .. code-block:: console
60 Build a subdirectory only, without managing dependencies on other directories.
64 .. code-block:: console
66 make lib/librte_eal_sub O=mybuild
70 Clean a subdirectory only.
74 .. code-block:: console
76 make lib/librte_eal_clean O=mybuild
83 The list of available targets are in $(RTE_SDK)/config (remove the defconfig\_ prefix).
85 The GNU standards variables may be used:
86 http://gnu.org/prep/standards/html_node/Directory-Variables.html and
87 http://gnu.org/prep/standards/html_node/DESTDIR.html
91 .. code-block:: console
93 make install DESTDIR=myinstall prefix=/usr
100 Launch automatic tests for a build directory specified using O=mybuilddir.
101 It is optional, the default output directory is build.
105 .. code-block:: console
109 Documentation Targets
110 ---------------------
114 Generate the documentation (API and guides).
118 Generate the Doxygen API documentation in html.
122 Generate the guides documentation in html.
126 Generate the guides documentation in pdf.
135 Other Useful Command-line Variables
136 -----------------------------------
138 The following variables can be specified on the command line:
142 Enable verbose build (show full compilation command line, and some intermediate commands).
146 Enable dependency debugging. This provides some useful information about why a target is built or not.
148 * EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_LDLIBS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
150 Append specific compilation, link or asm flags.
154 Specify a cross toolchain header that will prefix all gcc/binutils applications. This only works when using gcc.
156 Make in a Build Directory
157 -------------------------
159 All targets described above are called from the SDK root $(RTE_SDK).
160 It is possible to run the same Makefile targets inside the build directory.
161 For instance, the following command:
163 .. code-block:: console
166 make config O=mybuild T=x86_64-native-linux-gcc
171 .. code-block:: console
174 make config O=mybuild T=x86_64-native-linux-gcc
177 # no need to specify O= now
183 To compile the DPDK and sample applications with debugging information included and the optimization level set to 0,
184 the EXTRA_CFLAGS environment variable should be set before compiling as follows:
186 .. code-block:: console
188 export EXTRA_CFLAGS='-O0 -g'