[英]Cross Compile a automake project?
I am developing an application for enocean
. 我正在开发
enocean
的应用程序。 I am able to compile it for my Host system. 我可以为我的主机系统编译它。 I want to cross compile it for
beaglebone black
running openwrt
. 我想交叉编译它,以便使用
beaglebone black
运行openwrt
。 I have cross compiler and all other libraries. 我有交叉编译器和所有其他库。 I am not sure how to change the existing configure, Makefiles to cross-compile it.
我不确定如何更改现有的配置文件Makefiles进行交叉编译。
Please help! 请帮忙!
you don't have to change anything. 您无需更改任何内容。 autotools comes with full cross-compilation support.
autotools带有完整的交叉编译支持。
Just pass the proper --host=
flag for your target architecture, eg: 只需为您的目标体系结构传递正确的
--host=
标志即可,例如:
./configure --host arm-linux-gnueabihf
This will look for toolchain programs with the given prefix (in the above case, it would look eg for a compiler arm-linux-gnueabihf-gcc
) in your current $PATH
. 这将在当前
$PATH
查找具有给定前缀的工具链程序(在上述情况下,例如,对于编译器arm-linux-gnueabihf-gcc
)。 Most cross-compiling toolchains should automatically adhere to this convention. 大多数交叉编译工具链应自动遵守此约定。
See also the official documentation 另请参阅官方文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.