1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2010-2014 Intel Corporation.
4 .. _External_Application/Library_Makefile_help:
6 External Application/Library Makefile help
7 ==========================================
9 External applications or libraries should include specific Makefiles from RTE_SDK, located in mk directory.
12 * ${RTE_SDK}/mk/rte.extapp.mk: Build an application
14 * ${RTE_SDK}/mk/rte.extlib.mk: Build a static library
16 * ${RTE_SDK}/mk/rte.extobj.mk: Build objects (.o)
21 The following variables must be defined:
23 * ${RTE_SDK}: Points to the root directory of the DPDK.
25 * ${RTE_TARGET}: Reference the target to be used for compilation (for example, x86_64-native-linuxapp-gcc).
30 Build targets support the specification of the name of the output directory, using O=mybuilddir.
31 This is optional; the default output directory is build.
33 * all, "nothing" (meaning just make)
35 Build the application or the library in the specified output directory.
39 .. code-block:: console
45 Clean all objects created using make build.
49 .. code-block:: console
60 Other Useful Command-line Variables
61 -----------------------------------
63 The following variables can be specified at the command line:
67 Specify the directory in which the sources are located. By default, it is the current directory.
71 Specify the Makefile to call once the output directory is created. By default, it uses $(S)/Makefile.
75 Enable verbose build (show full compilation command line and some intermediate commands).
79 Enable dependency debugging. This provides some useful information about why a target must be rebuilt or not.
81 * EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
83 Append specific compilation, link or asm flags.
87 Specify a cross-toolchain header that will prefix all gcc/binutils applications. This only works when using gcc.
89 Make from Another Directory
90 ---------------------------
92 It is possible to run the Makefile from another directory, by specifying the output and the source dir. For example:
94 .. code-block:: console
96 export RTE_SDK=/path/to/DPDK
97 export RTE_TARGET=x86_64-native-linuxapp-icc
98 make -f /path/to/my_app/Makefile S=/path/to/my_app O=/path/to/build_dir