我正在嘗試自動工具。我有以下的項目層次: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。 –