相关疑难解决方法(0)

Automake Variables整理Makefile.am

我有一个目录/ src包含我的所有源文件,/ bin用于在运行make命令后存储所有二进制文件.该目录如下所示:

/BuildDirectory
- - /src
- - /bin
- - configure
- - Makefile.am
- - configure.ac 
- - ... 
Run Code Online (Sandbox Code Playgroud)

现在在Makefile.am中,我必须指定:

bin_PROGRAMS = bin/x bin/y bin/z bin/k ...

bin_x_SOURCES = src/x.cpp
bin_y_SOURCES = src/y.cpp
bin_z_SOURCES = src/z.cpp
Run Code Online (Sandbox Code Playgroud)

是否有任何变量可以帮助摆脱所有"bin /"和"src /"?例如,我只需指定:

$BIN = bin
$SRC = src 
Run Code Online (Sandbox Code Playgroud)

他们将在正确的文件夹中查找正确的文件并将其编译到正确的位置.

谢谢

c++ configuration automake makefile gnu-make

13
推荐指数
1
解决办法
1971
查看次数

标签 统计

automake ×1

c++ ×1

configuration ×1

gnu-make ×1

makefile ×1