External applications or libraries should include specific Makefiles from RTE_SDK, located in mk directory. These Makefiles are:
The following variables must be defined:
Build targets support the specification of the name of the output directory, using O=mybuilddir. This is optional; the default output directory is build.
all, “nothing” (meaning just make)
Build the application or the library in the specified output directory.
Example:
make O=mybuild
clean
Clean all objects created using make build.
Example:
make clean O=mybuild
help
Show this help.
The following variables can be specified at the command line:
S=
Specify the directory in which the sources are located. By default, it is the current directory.
M=
Specify the Makefile to call once the output directory is created. By default, it uses $(S)/Makefile.
V=
Enable verbose build (show full compilation command line and some intermediate commands).
D=
Enable dependency debugging. This provides some useful information about why a target must be rebuilt or not.
EXTRA_CFLAGS=, EXTRA_LDFLAGS=, EXTRA_ASFLAGS=, EXTRA_CPPFLAGS=
Append specific compilation, link or asm flags.
CROSS=
Specify a cross-toolchain header that will prefix all gcc/binutils applications. This only works when using gcc.
It is possible to run the Makefile from another directory, by specifying the output and the source dir. For example:
export RTE_SDK=/path/to/DPDK
export RTE_TARGET=x86_64-native-linuxapp-icc
make -f /path/to/my_app/Makefile S=/path/to/my_app O=/path/to/build_dir