阅读:1949回复:4
请问大佬关于编译问题?
我按书的工程配置文件的设定成功的对驱动程序进行了编译,连接。
但我实在想不通这几者之间的运行关系: 1. Build.exe 2. nmake.exe 3. SOURCES 4. makefile及对应的makefile.def 5. makefile.inc 6. DIRS 请大佬们说说它们之间的运行关系和运行次序. 还有在SOURCES中存在: 1. NTTARGETFILE0 2. NTTARGETFILE1 3. NTTARGETFILES 这三者的功能与区别又是什么? 不胜感激. |
|
沙发#
发布于:2005-04-01 11:24
build是一个实用工具,调用nmake
soruces是build的工程文件。 makefile,makefile.def,makefile.inc都是MAKEFILE,只是用的地方不同,inc,def用于预定义一些东东。 DIRS? 一个宏吧.. |
|
|
板凳#
发布于:2005-04-01 16:44
DDK帮助中全部有解释 NTTARGETFILE0 You can define the NTTARGETFILE0 and/or NTTARGETFILES macros to cause makefile.def to include makefile.inc immediately after it specifies the top level targets (all, clean and loc) and their dependencies. The makefile.def file expands NTTARGETFILE0 as the first dependent for the all target, and NTTARGETFILES as the last dependent for the all target. Use this macro to specify additional targets and dependencies that do not fit the general case covered by makefile.def. NTTARGETFILE0= The fact that NTTARGETFILE0 exists, even if it is defined and empty, causes the Build utility to open makefile.inc in the same subdirectory as the sources file. If you set NTTARGETFILE0 to equal a file name, the Build utility will not only include makefile.inc, but will also build the executable that the macro defines. Thus, if you set: NTTARGETFILE0=myfile.a the Build utility builds myfile.a as part of pass zero. If you do not set NTTARGETFILE0, the Build utility locates the specified subdirectory on pass zero, includes the makefile.inc in that subdirectory, and follows any default rules that this file contains. See Also NTTARGETFILE1 NTTARGETFILE1 The NTTARGETFILE1 macro is exactly like NTTARGETFILE0, except that it occurs later in the build process. NTTARGETFILE0 occurs on pass zero; NTTARGETFILE1 occurs on pass two. Both of these macros cause the Build utility to change directories to a specified subdirectory and to run NMAKE on pass zero or pass two in a case where it ordinarily probably would not do so. Built on Wednesday, July 24, 2002 NTTARGETFILES If you have unique rules in your subdirectory, you can use the NTTARGETFILES macro to signal to the Build utility that you have a makefile.inc file in addition to the sources file in the subdirectory. The makefile.inc file will provide additional information about the build process, including dependencies, command line rules, and other build rules. See Also NTTARGETFILE0, NTTARGETFILE1 |
|
|
地板#
发布于:2005-04-01 21:38
补充一下斑竹的
build只是一个cl的包装而已 编译的工作是由cl来完成的 dirs是用来递归编译的 如果一个目录下有一个dirs文件 那么这个文件里面所记录的子目录也会被build处理 |
|
地下室#
发布于:2005-04-02 11:47
补充一下斑竹的 再补充一下 build只是一个cl和link的包装而已 编译的工作是由cl来完成的,连接由link完成 |
|
|