linux - 如何从构建目录中的 src 目录制作?

标签 linux build makefile

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

如何制作我的/some/path/mySrcDir的内容到/another/path/myBuildDir

附:操作系统Ubuntu 14.04

最佳答案

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

make -f /some/path/mySrcDir/your-makefile

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

2) 如果 Makefile 是由 GNU autotools 生成的,你可以试试这个:

./configure --prefix=/another/path/myBuildDir

然后制作

关于linux - 如何从构建目录中的 src 目录制作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36576209/

相关文章:

java - Eclipse 将不会在 Linux 中生成 R.Java

build - Gradle不会下载自定义sourceSet中定义的测试的依赖项

delphi - 是否可以在 Delphi 2007 中调用多个构建后事件?

android ant -pre-compile 与 -pre-build

Makefile 和 rsync 错误 : Failed to exec ssh: No such file or directory

c++ - noinst_libfoo_ladir 中的 ladir 是什么?

linux - Bash 命令拒绝在后台运行 &

c - RAW-Sockets 应该忽略 MTU

linux - 由于无限的 shell 脚本,RPI 无法启动

linux - 带有静态和共享库的 Makefile