DPDK有关变量(二)

一、构建系统提供的有用的变量
  1. RTE_SDK: DPDK源码包的绝对路径。编译开发套件时框架会自动设置。当编译外部应用时,用户必须定义这个环境变量。
  2. RTE_SRCDIR: 源码的路径。当编译开发套件时RTE_SRCDIR等于RTE_SDK。编译外部应用时则指向外部应用的源码目录。
  3. RTE_OUTPUT: 输出文件的路径。通常情况下是$(RTE_SRCDIR)/build,通过make命令的O=选项可以重写该变量。
  4. RTE_TARGET:一个标识了编译目标的字符串。格式为arch-machine-execenv-toolchain。编译SDK时是由构建系统通过配置文件(.config)推理出来的。编译外部应用时则必须由用户在Makefile或环境变量中指定。
  5. RTE_SDK_BIN: $ ( RTE_SDK ) / $( RTE_TARGET )的引用。
  6. RTE_ARCH: 定义架构(i686,x86_64)。和CONFIG_RTE_ARCH值相同,只是不需要双引号括起来。
  7. RTE_MACHINE:定义目标机器。和CONFIG_RTE_MACHINE值相同,只是不需要双引号括起来。
  8. RTE_TOOLCHAIN :定义工具链(gcc、icc)。和CONFIG_RTE_TOOLCHAIN值相同,只是不需要双引号括起来。
  9. RTE_EXEC_ENV: 定义执行环境(如linuxapp)。和CONFIG_RTE_EXEC_ENV值相同,只是不需要双引号括起来。
  10. RTE_KERNELDIR: 这个变量包含了用来编译内核模块的内核源码的绝对路径。内核头文件必须和执行应用程序的目标机器相匹配。默认情况下,这个变量设置为/lib/modules/$(shell uname-r)/build。当编译机和目标机相同时,这是正确的。
二、Variables that Can be Set/Overridden in a Makefile Only
  1. VPATH: The path list that the build system will search for sources. By default, RTE_SRCDIR will be included in VPATH.
  2. CFLAGS: Flags to use for C compilation. The user should use += to append data in this variable.
  3. LDFLAGS:Flags to use for linking. The user should use += to append data in this variable.
  4. ASFLAGS: Flags to use for assembly. The user should use += to append data in this variable.
  5. CPPFLAGS: Flags to use to give flags to C preprocessor (only useful when assembling .S files). The user should use += to append data in this variable.
  6. LDLIBS: In an application, the list of libraries to link with (for example, -L /path/to/libfoo -lfoo). The user should use += to append data in this variable.
  7. SRC-y: A list of source files (.c,.S, or .o if the source is a binary) in case of application, library or object Makefiles. The sources must be available from VPATH.
  8. INSTALL-y- $ ( INSTPATH ): A list of files to be installed in $( INSTPATH ) . The files must be available from VPATH and will be copied in $ ( RTE_OUTPUT ) / $ ( INSTPATH ) . Can be used in almost any RTE Makefile.
  9. SYMLINK-y-$ ( INSTPATH ): A list of files to be installed in $(INSTPATH) . The files must be available from VPATH and will be linked (symbolically) in $ ( RTE_OUTPUT ) / $ ( INSTPATH ). This variable can be used in almost any Intel DPDK Makefile.
  10. PREBUILD: A list of prerequisite actions to be taken before building. The user should use += to append data in this variable.
  11. POSTBUILD: A list of actions to be taken after the main build. The user should use += to append data in this variable.
  12. PREINSTALL: A list of prerequisite actions to be taken before installing. The user should use += to append data in this variable.
  13. POSTINSTALL: A list of actions to be taken after installing. The user should use += to append data in this variable.
  14. PRECLEAN: A list of prerequisite actions to be taken before cleaning. The user should use += to append data in this variable.
  15. POSTCLEAN: A list of actions to be taken after cleaning. The user should use += to append data in this variable.
  16. DEPDIR-y: Only used in the development kit framework to specify if the build of the current directory depends on build of another one. This is needed to support parallel builds correctly.
三、Variables that can be Set/Overridden by the User on the Command Line Only Some variables can be used to configure the build system behavior. They are documented in Development Kit Root Makefile Help and External Application/Library Makefile help.
  1. WERROR_CFLAGS: By default, this is set to a specific value that depends on the compiler. Users are encouraged to use this variable as follows: CFLAGS += $(WERROR_CFLAGS) This avoids the use of different cases depending on the compiler (icc or gcc ). Also, this variable can be overridden from the command line,which allows bypassing of the flags for testing purposes.
四、Variables that Can be Set/Ove rridden by the User in a Makefile or Command Line
  1. CFLAGS_my_file.o: Specific flags to add for C compilation of my_file.c.
  2. LDFLAGS_my_app: Specific flags to add when linking my_app.
  3. NO_AUTOLIBS: If set, the libraries provided by the framework will not be included in the LDLIBS variable automatically.
  4. EXTRA_CFLAGS: The content of this variable is appended after CFLAGS when compiling.
  5. EXTRA_LDFLAGS: The content of this variable is appended after LDFLAGS when linking.
  6. EXTRA_ASFLAGS: The content of this variable is appended after ASFLAGS when assembling.
  7. EXTRA_CPPFLAGS: The content of this variable is appended after CPPFLAGS when using a C preprocessor on assembly files.
  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值