【发布时间】:2013-04-15 21:43:37
【问题描述】:
我正在尝试使用自动工具。我有以下项目层次结构:
project/src
project/src/utilities
project/src/utilities/util.c
project/src/utilities/util.h
project/src/sharedObject
project/src/sharedObject/sharedObject.c
project/src/sharedObject/sharedObject.h
project/src/sharedObject/thing.c
project/src/executable
project/src/executable/exec.c
project/src/executable/exec.h
project/src/executable/thing1.c
project/src/executable/thing2.c
"executable" 和 "sharedObject.so" 都依赖于 "util.o" 和 "util.h"。我已经看到了创建便利库的示例,但我不确定如何在其他两个子项目的 "Makefile.am" 文件中指定它们。这些项目间的依赖是如何定义的?
"executable" 和 "sharedObject.so" 都将被安装。 "util.o" 和 "util.h" 文件只会在构建过程中使用。
谢谢
【问题讨论】:
-
在深入了解 autotools 之前,我建议您先了解一下 CMake。我发现它比 autotools 更容易使用。但是,如果您正在以传统风格制作开源软件,则需要使用 autotools。