首页 > 代码库 > nmake学习笔记2
nmake学习笔记2
makefile中的“@<<”看起来很奇怪,查很多地方都没有结果。写了两个示例比较其结果:
如果makefile如下:
All:main.obj func.obj link $**.cpp.obj: cl /c $< clean: erase *.obj erase *.exe
输出为:
Microsoft (R) Program Maintenance Utility Version 6.00.9782.0Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl /c main.cppMicrosoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86Copyright (C) Microsoft Corp 1984-1998. All rights reserved.main.cpp cl /c func.cppMicrosoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86Copyright (C) Microsoft Corp 1984-1998. All rights reserved.func.cpp link main.obj func.objMicrosoft (R) Incremental Linker Version 6.00.8447Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
在makefile中加入“@<<”,代码如下:
All:main.obj func.obj link $**.cpp.obj: cl @<</c $<<< clean: erase *.obj erase *.exe
输入出:
Microsoft (R) Program Maintenance Utility Version 6.00.9782.0Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl @C:\Users\ADMINI~1\AppData\Local\Temp\nma15980.Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86Copyright (C) Microsoft Corp 1984-1998. All rights reserved.cl /c main.cppmain.cpp cl @C:\Users\ADMINI~1\AppData\Local\Temp\nmb15980.Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86Copyright (C) Microsoft Corp 1984-1998. All rights reserved.cl /c func.cppfunc.cpp link main.obj func.objMicrosoft (R) Incremental Linker Version 6.00.8447Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
nmake学习笔记2
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。