]> git.proxmox.com Git - ceph.git/blame - ceph/src/seastar/dpdk/doc/guides/prog_guide/ext_app_lib_make_help.rst
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / doc / guides / prog_guide / ext_app_lib_make_help.rst
CommitLineData
9f95a23c
TL
1.. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2010-2014 Intel Corporation.
7c673cae
FG
3
4.. _External_Application/Library_Makefile_help:
5
6External Application/Library Makefile help
7==========================================
8
9External applications or libraries should include specific Makefiles from RTE_SDK, located in mk directory.
10These Makefiles are:
11
12* ${RTE_SDK}/mk/rte.extapp.mk: Build an application
13
14* ${RTE_SDK}/mk/rte.extlib.mk: Build a static library
15
16* ${RTE_SDK}/mk/rte.extobj.mk: Build objects (.o)
17
18Prerequisites
19-------------
20
21The following variables must be defined:
22
23* ${RTE_SDK}: Points to the root directory of the DPDK.
24
9f95a23c 25* ${RTE_TARGET}: Reference the target to be used for compilation (for example, x86_64-native-linux-gcc).
7c673cae
FG
26
27Build Targets
28-------------
29
30Build targets support the specification of the name of the output directory, using O=mybuilddir.
31This is optional; the default output directory is build.
32
33* all, "nothing" (meaning just make)
34
35 Build the application or the library in the specified output directory.
36
37 Example:
38
39 .. code-block:: console
40
41 make O=mybuild
42
43* clean
44
45 Clean all objects created using make build.
46
47 Example:
48
49 .. code-block:: console
50
51 make clean O=mybuild
52
53Help Targets
54------------
55
56* help
57
58 Show this help.
59
60Other Useful Command-line Variables
61-----------------------------------
62
63The following variables can be specified at the command line:
64
65* S=
66
67 Specify the directory in which the sources are located. By default, it is the current directory.
68
69* M=
70
71 Specify the Makefile to call once the output directory is created. By default, it uses $(S)/Makefile.
72
73* V=
74
75 Enable verbose build (show full compilation command line and some intermediate commands).
76
77* D=
78
79 Enable dependency debugging. This provides some useful information about why a target must be rebuilt or not.
80
81* EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
82
83 Append specific compilation, link or asm flags.
84
85* CROSS=
86
87 Specify a cross-toolchain header that will prefix all gcc/binutils applications. This only works when using gcc.
88
89Make from Another Directory
90---------------------------
91
92It is possible to run the Makefile from another directory, by specifying the output and the source dir. For example:
93
94.. code-block:: console
95
96 export RTE_SDK=/path/to/DPDK
9f95a23c 97 export RTE_TARGET=x86_64-native-linux-icc
7c673cae 98 make -f /path/to/my_app/Makefile S=/path/to/my_app O=/path/to/build_dir