如何“执行”制作文件
我尝试在 code::blocks 中使用 make 文件,但我做错了。我安装了包含编译器的版本。 http://sourceforge.net/项目/codeblocks/files/Binaries/10.05/Windows/codeblocks-10.05mingw-setup.exe/download。我该如何处理 make 文件?开头为:
CC=gcc
最好,美国
I tried to use a make file in code::blocks but I am doing it wrong. I have the version installed with the compilers included. http://sourceforge.net/projects/codeblocks/files/Binaries/10.05/Windows/codeblocks-10.05mingw-setup.exe/download. What do I do with the make file? It starts with:
CC=gcc
best, US
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您不倾向于执行 make 文件本身,而是执行
make
,将 make 文件作为参数:如果您的 make 文件实际上是标准名称之一(例如
makefile
或Makefile
),您甚至不需要指定它。默认情况下会选择它(如果您的构建目录中有多个标准名称,您最好查找make
手册页以了解哪一个优先)。You don't tend to execute the make file itself, rather you execute
make
, giving it the make file as an argument:If your make file is actually one of the standard names (like
makefile
orMakefile
), you don't even need to specify it. It'll be picked up by default (if you have more than one of these standard names in your build directory, you better look up themake
man page to see which takes precedence).正如paxdiablo所说,
make -f pax.mk
会执行pax.mk makefile,如果你直接输入./pax.mk来执行它,那么你会得到语法错误。如果您的文件名是
makefile
或Makefile
,您也可以只输入make
。假设在同一目录中有两个名为
makefile
和Makefile
的文件,那么如果单独给出make
则执行makefile
。您甚至可以将参数传递给 makefile。在本教程中查看有关 makefile 的更多信息: 基本了解生成文件
As paxdiablo said
make -f pax.mk
would execute the pax.mk makefile, if you directly execute it by typing ./pax.mk, then you would get syntax error.Also you can just type
make
if your file name ismakefile
orMakefile
.Suppose you have two files named
makefile
andMakefile
in the same directory thenmakefile
is executed ifmake
alone is given. You can even pass arguments to makefile.Check out more about makefile at this Tutorial : Basic understanding of Makefile