xref: /dpdk/doc/guides/prog_guide/build_app.rst (revision daa02b5cddbb8e11b31d41e2bf7bb1ae64dcae2f)
1..  SPDX-License-Identifier: BSD-3-Clause
2    Copyright(c) 2010-2014 Intel Corporation.
3
4.. _Building_Your_Own_Application:
5
6Building Your Own Application
7=============================
8
9Compiling a Sample Application in the Development Kit Directory
10---------------------------------------------------------------
11
12To compile a sample application with make (for example, hello world):
13
14.. code-block:: console
15
16    ~/DPDK$ cd examples/helloworld/
17    ~/DPDK/examples/helloworld$ make
18
19The binary is generated in the build directory by default:
20
21.. code-block:: console
22
23    ~/DPDK/examples/helloworld$ ls build/app
24    helloworld helloworld.map
25
26Please refer to :doc:`../linux_gsg/build_dpdk` for details on compiling with meson.
27
28Build Your Own Application Outside the Development Kit
29------------------------------------------------------
30
31The sample application (Hello World) can be duplicated in a new directory as a starting point for your development:
32
33.. code-block:: console
34
35    ~$ cp -r DPDK/examples/helloworld my_rte_app
36    ~$ cd my_rte_app/
37    ~/my_rte_app$ make
38
39Customizing Makefiles
40---------------------
41
42Application Makefile
43~~~~~~~~~~~~~~~~~~~~
44
45The default makefile provided with the Hello World sample application is a good starting point.
46
47The user must define several variables:
48
49*   APP: Contains the name of the application.
50
51*   SRCS-y: List of source files (\*.c, \*.S).
52