File: build_app.rst

package info (click to toggle)
dpdk 24.11.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 121,148 kB
  • sloc: ansic: 2,206,055; python: 11,866; sh: 4,627; makefile: 2,025; awk: 70
file content (49 lines) | stat: -rw-r--r-- 1,364 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
..  SPDX-License-Identifier: BSD-3-Clause
    Copyright(c) 2010-2014 Intel Corporation.

Building Your Own Application
=============================

Compiling a Sample Application in the Development Kit Directory
---------------------------------------------------------------

To compile a sample application with make (for example, hello world):

.. code-block:: console

    ~/DPDK$ cd examples/helloworld/
    ~/DPDK/examples/helloworld$ make

The binary is generated in the build directory by default:

.. code-block:: console

    ~/DPDK/examples/helloworld$ ls build/app
    helloworld helloworld.map

Please refer to :doc:`../linux_gsg/build_dpdk` for details on compiling with meson.

Build Your Own Application Outside the Development Kit
------------------------------------------------------

The sample application (Hello World) can be duplicated in a new directory as a starting point for your development:

.. code-block:: console

    ~$ cp -r DPDK/examples/helloworld my_rte_app
    ~$ cd my_rte_app/
    ~/my_rte_app$ make

Customizing Makefiles
---------------------

Application Makefile
~~~~~~~~~~~~~~~~~~~~

The default makefile provided with the Hello World sample application is a good starting point.

The user must define several variables:

*   APP: Contains the name of the application.

*   SRCS-y: List of source files (\*.c, \*.S).