我正在尝试自动工具。我有以下的项目层次:autotools:一个项目包含一个可执行文件,一个共享obj和一个“共享”内部库
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"
文件将只在构建过程中使用。
谢谢
之前你太深入到自动工具,我建议考虑看看CMake的。与autotools相比,我发现使用起来要容易得多。但是,如果您以传统风格制作开源软件,那么预计会有autotools。 –