【问题标题】:How to include mk file to SConstruct如何将 mk 文件包含到 SConstruct
【发布时间】:2020-03-30 04:50:05
【问题描述】:

我有 Scons 文件,我想添加一些包含 mk 文件。

我的 SConstruct

env = Environment()

# include file path
env.Append(CPPPATH=[""])

# library file path
#env.Append(LIBPATH=["/usr/lib64/"])

# Linking Flags 
#env.Append(LINKFLAGS="")

# Compile Flags
env.Append(CCFLAGS="-g -Wall -std=c++0 -DHAVE_DPDK")

# library files
env.Append(LIBS=["boost_thread", "boost_filesystem", "boost_system", "boost_log", "boost_regex"])

# define
env.Append(CPPDEFINES=["USER_LITTLE_ENDIAN"])

# source file list for making
src_files = ,
    Glob(test.cpp"),
    ]

# build target file
env.Program(build/test", source=src_files)

这是我要添加的makefile。

ifeq ($(RTE_SDK),)
RTE_SDK = $(HOME)/DPDK
RTE_TARGET = build
endif

# Default target, can be overridden by command line or environment
RTE_TARGET = build

include $(HOME)/DPDK/mk/rte.vars.mk

APP = custom2

SRCS-y := custom2.c

CFLAGS += -g -DHAVE_DPDK

include $(HOME)/DPDK/mk/rte.extapp.mk

如何在 scons 中包含 mk 文件?

以及如何在scons上设置RTE_SDK = $(HOME)/DPDK?

谢谢。


编辑。

或者我尝试找到任何方法,可以用 scons 编译 DPDK。

【问题讨论】:

  • 只要您为此类构建和源指定目标,您始终可以只使用命令在该目录中运行 make。它应该工作。否则,您必须将构建 makefile 转换为 SConscripts。

标签: makefile scons


【解决方案1】:

有 Tungsten Fabric/Contrail vrouter 或者看看这里: https://github.com/Juniper/contrail-vrouter/blob/master/SConscript 也许这会有所帮助,他们似乎正在使用 SConscript 并且将他们的 vrouter 基于 DPDK。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-27
    • 2021-12-22
    • 1970-01-01
    • 2012-12-31
    • 2017-09-30
    相关资源
    最近更新 更多