如何从构建目录中的 src 目录进行制作?

Onu*_*urA 8 linux makefile build

我的问题简短而简单。我有我的源目录 mySrcDir,myMakefile也位于其中,我想将其编译到我的构建目录 myBuildDir 中。

我如何将make我的内容/some/path/mySrcDir放入/another/path/myBuildDir

PS:操作系统Ubuntu 14.04

Bad*_*uel 6

1)在你的构建目录中调用:

make -f /some/path/mySrcDir/your-makefile
Run Code Online (Sandbox Code Playgroud)

-f 选项用于指定您要“制作”的文件。

2) 如果 Makefile 是由 GNU autotools 生成的,您可以尝试以下操作:

./configure --prefix=/another/path/myBuildDir
Run Code Online (Sandbox Code Playgroud)

进而make