【发布时间】:2014-09-11 04:00:54
【问题描述】:
我有一个递归 autoconf + automake 项目,其结构如下:
+
|- configure.ac
|- Makefile.am
|- Makefile.in
|- ...
|-- (subdir1) --+
| |- Makefile.am
| |- source.c
| |- ...
|
|-- (subdir2) --+
| |- Makefile.am
|- source.c
|- ...
顶级配置/Makefile 检查各种库是否可用 (AC_CHECK_LIB),然后在子目录中构建库(如果选择)。
问题是传递给每个子目录的 LIBS 变量 make 包含所有必需库的联合,即:
# each subdir sees:
LIBS = -lfoo -lbar -lbaz -lbif
但我想要的是:
# subdir1 gets
LIBS = -lfoo -lbar
# subdir2 gets
LIBS = -lbaz -lbif
是否有一种机制来指定每个子项目的 LIBS?
【问题讨论】:
标签: autotools autoconf automake libtool