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