C/C++构建系统 GNU autotool

我们在网上经常可以看到c/c++开源的项目,其中很多都是使用GNU的构建系统进行配置和编译的,如果按照规范构造这些的步骤,有一定的门槛和复杂度,下文把关于auotools系列的工具和概要的流程简要汇总一下,这样我们就知道整个的构建系统是咋回事了。

Autotools

If you’re writing open source software that targets Unix or Linux systems, you should absolutely be using the GNU Autotools, and even if you’re writing proprietary software for Unix or Linux systems, you’ll still benefit significantly from using them. The Autotools provide you with a build environment that will allow your project to build successfully on future versions or distributions with virtually no changes to the build scripts. This is useful even if you only intend to target a single Linux distribution, because—let’s be honest—you really can’t know in advance whether or not your company will want your software to run on other platforms in the future.

GNU Coding Standards (GCS)  http://www.gnu.org/prep/standards/

Filesystem Hierarchy Standard (FHS) http://www.pathname.com/fhs/

The GNU Autotools framework includes three main packages: Autoconf, Automake, and Libtool.

Autoconf

wps_clip_image-5879

Automake

Ø automake

Ø aclocal

wps_clip_image-14543

Libtool

wps_clip_image-24589

Configure / Make

wps_clip_image-23538

wps_clip_image-2963

以上可建,使用这个构建系统还是有些复杂,不过在当时GNU的初始阶段还是起到很到的作用的。

如果想用更简单的工具,还有cmake等,后文再讲。

posted @   2012  阅读(629)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
点击右上角即可分享
微信分享提示