阅读:905回复:1
请问大佬关于编译问题?
我按书的工程配置文件的设定成功的对驱动程序进行了编译,连接。
但我实在想不通这几者之间的运行关系: 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 10:08
build.exe的输入是source,source主要是设置一些环境变量
默认下build会调nmake,nmake的输入是makefile nmake在makefile的指导下干活如以makefile的指定的参数调用指定的编译器、链接器等 makefile.def是makefile的实际内容(针对DDK) dir被build处理,用来build一个或多个子目录下的源文件 After locating the relevant make files, the Build utility might search for other files (makefile0 and makefile.inc); this occurs only on a clean build, or if NTTARGETFILES is specified in the sources file. After the NMAKE utility evaluates the macros in all the relevant make files, it spawns the C compiler (cl.exe) with the proper switches. After compilation is complete, the Build utility again spawns NMAKE, this time to link the compiled object files. |
|