使用 Autotools 将外部库纳入源代码树
我正在开发一个新项目,使用 Autotools 构建基础设施。我想将外部依赖项包含到我的源代码树中。这些依赖项也使用 Autotools。如何配置项目的构建脚本来构建和链接所包含的依赖项?尽管 Duret-Lutz 的教程非常出色,但仅在几张幻灯片中简要讨论了这种情况。我发现他的解释非常令人困惑。
通过将包含的依赖项的目录名称添加到顶层 Makefile.am 的 SUBDIRS,可以配置和构建依赖项。可以通过 CFLAGS 手动设置包含路径,但如何链接 libtool .la
文件?
I am developing a new project, using Autotools for my build infrastructure. I would like to subsume external dependencies into my source tree. These dependencies are using Autotools, as well. How can I configure my project's build scripts to build and link against subsumed dependencies? Though Duret-Lutz's tutorial is excellent, this situation is only briefly addressed in a few slides. I found his explanation deeply confusing.
By adding the directory name of subsumed dependencies to the toplevel Makefile.am's SUBDIRS the dependency is being configured and built. It is possible to manually set include paths through CFLAGS, but how do I link against libtool .la
files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用相对路径添加库。
You can add the libs with relative paths.