Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1846 lines
247 KiB

{\rtf1\ansi \deff7\deflang1033{\fonttbl{\f0\froman\fcharset0\fprq2 Tms Rmn;}{\f1\froman\fcharset2\fprq2 Symbol;}{\f2\fswiss\fcharset0\fprq2 Helv{\*\falt Arial};}{\f3\fmodern\fcharset0\fprq1 Courier;}
{\f4\froman\fcharset0\fprq2 Times New Roman;}{\f5\fswiss\fcharset0\fprq2 Arial;}{\f6\froman\fcharset0\fprq2 MS Serif;}{\f7\fswiss\fcharset0\fprq2 MS Sans Serif;}{\f8\froman\fcharset0\fprq2 Times;}{\f9\fswiss\fcharset0\fprq2 Helvetica;}
{\f10\fswiss\fcharset0\fprq2 System;}{\f11\fmodern\fcharset0\fprq1 Courier New;}{\f12\froman\fcharset0\fprq2 New York;}{\f13\fswiss\fcharset0\fprq2 Geneva;}{\f14\fswiss\fcharset0\fprq2 AvantGarde;}{\f15\froman\fcharset0\fprq2 ITC Bookman;}
{\f16\fswiss\fcharset0\fprq2 Helvetica-Narrow;}{\f17\froman\fcharset0\fprq2 NewCenturySchlbk;}{\f18\froman\fcharset0\fprq2 Palatino;}{\f19\froman\fcharset0\fprq2 ZapfChancery;}{\f20\fdecor\fcharset2\fprq2 ZapfDingbats;}{\f21\fnil\fcharset2\fprq2 Marlett;}
{\f22\fmodern\fcharset0\fprq1 Lucida Console;}{\f23\fnil\fcharset2\fprq2 Wingdings;}{\f24\fswiss\fcharset0\fprq2 Lucida Sans Unicode;}{\f25\fnil\fcharset0\fprq2 Bodoni-DTC;}{\f26\fnil\fcharset0\fprq2 Dom Casual;}
{\f27\fnil\fcharset0\fprq2 Fette Engschrift;}{\f28\fswiss\fcharset0\fprq2 Franklin Cond. Gothic;}{\f29\fswiss\fcharset0\fprq2 Franklin Gothic;}{\f30\fswiss\fcharset0\fprq2 Garrison Cond. Sans;}{\f31\fswiss\fcharset0\fprq2 Garrison ExtraBold Sans;}
{\f32\fswiss\fcharset0\fprq2 Garrison ExtraCond. Sans;}{\f33\fswiss\fcharset0\fprq2 Garrison Light Sans;}{\f34\fswiss\fcharset0\fprq2 Garrison Sans;}{\f35\froman\fcharset0\fprq2 Goudy Old Style;}{\f36\fdecor\fcharset0\fprq2 Kauflinn;}
{\f37\fnil\fcharset0\fprq2 Optimum;}{\f38\fdecor\fcharset0\fprq2 VAG Round;}{\f39\froman\fcharset0\fprq2 Village Square;}{\f40\fdecor\fcharset0\fprq2 Windsor;}{\f41\fswiss\fcharset0\fprq2 Arial Rounded MT Bold;}{\f42\fswiss\fcharset0\fprq2 Arial Narrow;}
{\f43\fswiss\fcharset0\fprq2 Arial Black;}{\f44\froman\fcharset0\fprq2 Book Antiqua;}{\f45\froman\fcharset0\fprq2 Bookman Old Style;}{\f46\fswiss\fcharset0\fprq2 Century Gothic;}{\f47\froman\fcharset0\fprq2 Century Schoolbook;}
{\f48\fnil\fcharset2\fprq2 Monotype Sorts;}{\f49\fswiss\fcharset0\fprq2 Haettenschweiler;}{\f50\fdecor\fcharset0\fprq2 Algerian;}{\f51\fdecor\fcharset0\fprq2 Braggadocio;}{\f52\fswiss\fcharset0\fprq2 Britannic Bold;}
{\f53\fscript\fcharset0\fprq2 Brush Script MT;}{\f54\fdecor\fcharset0\fprq2 Colonna MT;}{\f55\fdecor\fcharset0\fprq2 Desdemona;}{\f56\froman\fcharset0\fprq2 Footlight MT Light;}{\f57\froman\fcharset0\fprq2 Garamond;}{\f58\fswiss\fcharset0\fprq2 Impact;}
{\f59\fdecor\fcharset0\fprq2 Kino MT;}{\f60\froman\fcharset0\fprq2 Wide Latin;}{\f61\fscript\fcharset0\fprq2 Matura MT Script Capitals;}{\f62\fdecor\fcharset0\fprq2 Playbill;}{\f63\fmodern\fcharset2\fprq1 MS LineDraw;}
{\f64\froman\fcharset255\fprq2 Roman;}{\f65\fscript\fcharset255\fprq2 Script;}{\f66\fmodern\fcharset255\fprq2 Modern;}{\f67\fswiss\fcharset0\fprq1 MS Dialog;}{\f68\fswiss\fcharset0\fprq2 MS Shell Dlg;}{\f69\froman\fcharset0\fprq2 CG Times (WN);}
{\f70\fscript\fcharset238\fprq2 Phyllis ATT;}{\f71\fnil\fcharset0\fprq2 EmpireBuilder;}{\f72\fscript\fcharset0\fprq2 Comic Sans MS;}{\f73\froman\fcharset0\fprq2 Lucida Bright;}{\f74\fscript\fcharset0\fprq2 Lucida Calligraphy;}
{\f75\fscript\fcharset0\fprq2 Lucida Blackletter;}{\f76\fscript\fcharset0\fprq2 Monotype Corsiva;}{\f77\fswiss\fcharset0\fprq2 News Gothic MT;}{\f78\froman\fcharset2\fprq0 MT Symbol;}{\f79\froman\fcharset2\fprq2 Times New Roman Special G1;}
{\f80\fswiss\fcharset0\fprq0 Tahoma;}{\f81\fswiss\fcharset0\fprq2 Copperplate Gothic Bold;}{\f82\fscript\fcharset0\fprq2 Lucida Handwriting;}{\f83\fscript\fcharset0\fprq2 Mistral;}{\f84\froman\fcharset0\fprq2 Century;}
{\f85\fswiss\fcharset0\fprq2 Albertus Medium;}{\f86\fmodern\fcharset128\fprq2 \'82l\'82r \'82o\'83S\'83V\'83b\'83N;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;
\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
{\stylesheet{\ri130\sa240\widctlpar \f7\fs20 \snext0 Normal;}{\s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \sbasedon0\snext0 heading 1;}{\s2\li360\ri360\sb120\sa48\widctlpar \b\f7 \sbasedon0\snext0 heading 2;}{
\s3\li115\ri130\sb240\sa60\keepn\widctlpar \b\f7 \sbasedon0\snext0 heading 3;}{\s4\li360\ri130\sa48\widctlpar \f7 \sbasedon0\snext0 heading 4;}{\s5\li115\ri130\sb240\sa60\widctlpar \f7\fs22 \sbasedon0\snext0 heading 5;}{
\s6\li115\ri130\sb240\sa60\widctlpar \i\f7\fs22 \sbasedon0\snext0 heading 6;}{\s7\li115\ri130\sb240\sa60\widctlpar \f7\fs16 \sbasedon0\snext0 heading 7;}{\s8\li115\ri130\sb240\sa60\widctlpar \i\f7\fs16 \sbasedon0\snext0 heading 8;}{
\s9\li115\ri130\sb240\sa60\widctlpar \i\f7\fs18 \sbasedon0\snext0 heading 9;}{\*\cs10 \additive Default Paragraph Font;}{\s15\ri130\sa240\widctlpar \f7\fs20 \sbasedon0\snext15 footnote text;}{\*\cs16 \additive\super \sbasedon10 footnote reference;}{
\s17\qr\sb50\keep\keepn\widctlpar\noline\pvpara\phpg\posy0\absw540\dxfrtext180\dfrmtxtx180\dfrmtxty0{\*\pn \pnlvl10\pnstart1\pnhang}\hyphpar0 \f4\fs20\kerning20 \sbasedon0\snext0 Art Button,ab;}{\s18\ri130\sa240\widctlpar\tqc\tx4320\tqr\tx8640 \f7\fs20
\sbasedon0\snext18 header;}{\s19\li302\ri130\sa240\widctlpar \f7\fs20 \sbasedon0\snext19 Topic Text Indent;}{\s20\li720\ri130\sa240\widctlpar \f7\fs20 \sbasedon0\snext20 Normal Indent;}{\s21\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28
\sbasedon1\snext0 Tip/Note Heading;}{\s22\li302\ri130\sa240\widctlpar \f7\fs20 \sbasedon0\snext22 Tip/Note Text;}{\s23\fi-187\li302\ri130\sa240\widctlpar\tx302{\*\pn \pnlvl11\pnf23\pnfs10\pnstart1\pnindent187\pnhang{\pntxtb n}}\f7\fs20
\sbasedon22\snext23 Tip/Note Text Bulleted;}{\s24\fi-187\li302\ri130\sa240\widctlpar\tx302{\*\pn \pnlvl11\pnf23\pnfs10\pnstart1\pnindent187\pnhang{\pntxtb n}}\f7\fs20 \sbasedon0\snext24 Topic Text Bulleted;}{
\s25\fi-187\li302\ri130\sa240\widctlpar\tx302{\*\pn \pnlvl10\pndec\pnb0\pni0\pnf5\pnfs16\pnstart1\pnindent187\pnhang}\f7\fs20 \sbasedon0\snext25 Topic Text Numbered;}{\s26\ri130\sa240\widctlpar\tqc\tx4320\tqr\tx8640 \f7\fs20 \sbasedon0\snext26 footer;}}{\*\revtbl {Unknown;}{Dee Christian (EDP)
;}{Don Goldberg (Wasser);}}{\info{\title Help Project generated with RoboHELP\'ae 95.}{\author Test}{\operator Test}{\creatim\yr1996\mo4\dy12\hr15\min25}{\revtim\yr1996\mo4\dy12\hr15\min55}{\printim\yr1996\mo4\dy5\hr10\min18}{\version3}{\edmins1}{\nofpages174}{\nofwords16322}
{\nofchars93037}{\*\company test}{\vern57443}}\widowctrl\ftnbj\aenddoc\noextrasprl\prcolbl\cvmme\sprsspbf\brkfrm\swpbdr\hyphcaps0\fracwidth \fet0{\*\template C:\\MSOffice\\Templates\\Robohelp.dot}\sectd \linex0\endnhere {\*\pnseclvl1
\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5
\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang
{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #}
Contents}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $} Contents}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Contents}} {\cs16\super +{\footnote \pard\plain
\s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} BUILD:0}} Contents
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Click on a topic formatted in green to view more information about that topic.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa60\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}{\uldb\cf11 Getting Started}{\v Getting_Started}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Windows}{\f1\fs24\uldb\cf11 \'e2}{\uldb\cf11 NT}{\f1\fs24\uldb\cf11 \'e2}{\uldb\cf11 Directory Structure}{\v Directory_Structure}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Using the Build Utility}{\v Using_the_Build_Utility}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Building Multiple Targets from One Subdirectory}{\v Building_Multiple_Targets_from_One_Subdirectory}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Multi-processor Build Issues}{\v Multi_processor_Build_Issues}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Specifying Libraries}{\v Specifying_Libraries}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Precompiled Headers}{\v Precompiled_Headers}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Environment Variables}{\v Environment_Variables}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Macro Definitions}{\v Macro_Definitions}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Rules}{\v Rules}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Debugging}{\v Debugging}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Building Windows NT Software}{\v Building_NT_Software}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Building Chicago Software}{\v Building_Chicago_Software}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Building Win32 Subsystem Software}{\v Building_Win32_Subsystem_Software}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Frequently Asked Questions}{\v Frequently_Asked_Questions}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 Glossary}{\v Glossary}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Getting_Started}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Getting Started}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Getting Started}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} BEGIN:0}} Getting Started
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The Build Utility, {\i build.exe}, was created by{\i }{\uldb\cf11 Steve Wood}{\v Steve_Wood} it to build Windows\~
NT. The Build Utility provides a structured way of building things. This is the default build process for Windows\~NT. Groups who use it enable the Windows\~NT group to be able to build with their group and to make changes to the group\rquote
s source files when needed. Other groups, such as the VC team, use the Build Utility for precisely this reason. Even though the VC team did not need the same multi-platform support for their build process as the build process for Windows\~
NT needed, the Build Utility enabled them to override all the default settings for build.exe and still take advantage of Windows\~NT.
\par {\b See Also}\line {\uldb\cf11 Features}{\v Features}\line {\uldb\cf11 Why Use the Build Utility}{\v Why_use_the_Build_Utility}\line {\uldb\cf11 Where is the Build Utility Located}{\v Where_is_the_build_utility_located}\line {\uldb\cf11 Quick Start}{\v
Quick_Start}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Steve_Wood}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Steve Wood}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Steve Wood}} Steve Wood
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Steve Wood was one of the initial ten people working on Windows\~NT. They knew that t
hey were going to build something really, really big. Steve came from OS/2 where everyone used individual procedures for building products. In OS/2, there were the UI people, the base kernel people, and the net people, who all had their own way of doing t
hings. The build was tremendously difficult to coordinate. If you went to one subdirectory, you built a certain way, but if you went to another subdirectory, you built a different way. There were people in different geographic locations, all of them makin
g changes and none of them compatible with each other or working together. So Steve came from that environment and realized there was a need for something better. That\rquote s how the Build Utility came into being.
\par The question Steve asked was how could he abstract out all of this complicated gobbeldy-gook and put it in a master file? Steve noticed that nmake itself does not have some of the functions needed to build Windows\~
NT: the ability to occasionally exclude directories or only build certain directories. He also wanted to have a way to have a global look at the whole tree for Windows\~
NT. If a file changed anywhere in the tree, the developers could easily answer the question: \ldblquote What do we have to rebuild as a result of that change?\rdblquote
\par One of the things the Build Utility does is create a master database of all the inter-dependencies in the tree. This means you can go to any subdirectory, make a change to a file, and check it in. Then you can go to the top of the build tree for Windows\~
NT, run build.exe, and anything in the tree that needs to be rebuilt, {\ul will} be rebuilt. You don\rquote t have to worry if you did the right thing. There would have been no way to build Windows\~NT without this type of structure and methodology.
\par The Build Utility eliminates the requirement of testing every single release against every single platform. This requirement is not needed for Windows\~NT because Windows\~NT performs the same way on all platforms: Intel, Alpha, MIPS, and PowerPC.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Features}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Features}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Features}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} BEGIN:0}} Features
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The Build Utility:
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa240\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}Automatically establishes file dependencies.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Provides tools to build products for multiple hardware platforms without specifying any target-specific information.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Shields you from the details of the various compilers and machine architectures.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Is multiprocessor aware for speedier compilation.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Provides feedback during compilation, including: \line \line * How much longer before the build will finish \line * How many lines are compiling\line * How fast it\rquote s compiling them\line
* How many files you have to link\line * How many targets you are creating
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Provides detailed information about the build process.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Why_use_the_Build_Utility}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} Why use the Build Utility? }} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Why use the Build Utility? }} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super +} BEGIN:0}} Why Use the Build Utility?
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The great benefit to using this Build Utility, rather than creating your own make or nmake files, is because:
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa240\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
The Build Utility isolates all target-dependent information in a centralized location (including header and library include paths, compiler names and switches, and linker switches).
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}You can build products for multiple hardware platforms without specifying any target-specific information.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}The Build Utility ensures that everyone builds consistently. \line \line
This is important when you have multiple files to build, many .exe files that you are generating, and multiple developers working on a project, You never have to be specific places. Once you are set up in one subdirectory in Windows\~
NT, you can build all your subdirectories using build.exe. For this reason, the Build Utility has been used successfully by the following groups: Exchange, VC, Media Foundation, and MSN.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Where_is_the_build_utility_located}} {\cs16\super ${\footnote \pard\plain
\s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $} Where is the build utility located?}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Where is the build utility located?}} {\cs16\super +{\footnote \pard\plain
\s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} BEGIN:0}} Where Is the Build Utility Located?
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Every drop of Windows\~
NT includes build.exe in the Internal Development Workstation (IDW) subdirectory. It also ships in the DDK as a tool for people who are writing device drivers. You can copy build.exe from the most recent build drop of Windows\~NT. {\f5
The X86 version runs on Windows}{\f1\fs24 \'e2}{\f5 \~95}{\f1\fs24 \'e2}{\f5 as well as Windows\~NT.
\par }\pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Quick_Start}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Quick Start}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Quick Start}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} BEGIN:0}} Quick Start
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The sources.tpl file is contained in this topic. It is a template that specifies the target component that you want to build and the list of sources files needed to build it. It also specif
ies optional compiler switches and libraries that are unique for the component being built. Follow the instructions in this topic to copy and edit this template so you can use it to run the Build Utility.
\par {\uldb\cf11 Steve Wood}{\v Steve_Wood} (stevewo) wrote sources.tpl in April of 1990, and it was later modified. There is a commented description of this file is in \\nt\\bak\\bin\\sources.tpl. For more detailed information, see {\uldb\cf11
Getting Started. }{\v Getting_Started}
\par \pard\plain \s2\li360\ri360\sb120\sa48\widctlpar \b\f7 Instructions
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Here is what you need to do to get started using the Build Utility:
\par {\pntext\pard\plain\f7\fs20 1.\tab}\pard \fi-360\li475\ri130\sa240\widctlpar\tx475{\*\pn \pnlvlbody\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}Choose {\b Edit, Copy} from the menu bar to copy this topic to the Clipboard.
\par {\pntext\pard\plain\f7\fs20 2.\tab}Paste this topic into a file using a text editor.
\par {\pntext\pard\plain\f7\fs20 3.\tab}Replace the xxxxx in the {\ul\cf11 MAJORCOMP}{\v MAJORCOMP} and {\ul\cf11 MINORCOMP}{\v MINORCOMP} macros below with your component's major and minor component name for example:\line \line MAJORCOMP=ntos, MINORCOMP=ke
\line \line {\b Note}: Do not type spaces surrounding the equal sign.
\par {\pntext\pard\plain\f7\fs20 4.\tab}Replace the xxxxx in the {\ul\cf11 TARGETNAME}{\v TARGETNAME} macro with your target name, for example:\line \line TARGETNAME={\i myprogram}
\par {\pntext\pard\plain\f7\fs20 5.\tab}Edit the {\ul\cf11 TARGETPATH}{\v TARGETPATH} and {\uldb\cf11 TARGETTYPE}{\v TARGETTYPE} macros to specify the location and type of the target.
\par {\pntext\pard\plain\f7\fs20 6.\tab}Edit the {\uldb\cf11 INCLUDES}{\v INCLUDES} macro if you have a private include directory to search.
\par {\pntext\pard\plain\f7\fs20 7.\tab}Carefully edit the {\ul\cf11 SOURCES}{\v SOURCES} macro so that it defines all the source files for the component that you are building.
\par {\pntext\pard\plain\f7\fs20 8.\tab}Remove these instructions and all comments.
\par {\pntext\pard\plain\f7\fs20 9.\tab}Save this file, naming it sources.tpl, and quit your text editor.
\par {\pntext\pard\plain\f7\fs20 10.\tab}Run the Build Utility from the command line by typing \ldblquote build\rdblquote and pressing{\b Enter}.\line From now on, you can run either build or nmake to build the component.
\par \pard \ri130\widctlpar #
\par # The MAJORCOMP and MINORCOMP variables are defined
\par # so that $(MAJORCOMP)$(MINORCOMP)filename can be used in
\par # cross compiling to provide unique filenames in a flat namespace.
\par #
\par MAJORCOMP=xxxxx
\par MINORCOMP=xxxxx
\par #
\par # The developer defines the TARGETNAME variable. It is the name of
\par # the target (component) that is being built by this makefile.
\par # It should {\ul not} include any path or filename extension.
\par #
\par TARGETNAME=xxxxx
\par #
\par # The developer defines the TARGETPATH and TARGETTYPE variables.
\par # The first variable specifies where the target will be built. The second specifies
\par # the type of target (either PROGRAM, DYNLINK, LIBRARY, UMAPPL_NOLIB or
\par # BOOTPGM). Use UMAPPL_NOLIB when you are only building user-mode
\par # programs and do not need to build a library.
\par #
\par TARGETPATH=obj
\par # Select one of the following, and delete the others:
\par TARGETTYPE=PROGRAM
\par TARGETTYPE=DYNLINK
\par TARGETTYPE=LIBRARY
\par TARGETTYPE=UMAPPL_NOLIB
\par TARGETTYPE=BOOTPGM
\par #
\par # The {\uldb\cf11 TARGETLIBS}{\v TARGETLIBS} macro specifies additional libraries to link against your target
\par # image. Each library path specification should contain an asterisk (*)
\par # where the machine-specific subdirectory name should go.
\par #
\par TARGETLIBS=
\par #
\par # The {\uldb\cf11 INCLUDES}{\v INCLUDES} variable specifies any include paths that are specific to
\par # this source directory. Separate multiple paths with single
\par # semicolons. Relative path specifications are okay.
\par #
\par INCLUDES=..\\inc
\par #
\par # The developer defines the {\ul\cf11 SOURCES}{\v SOURCES} macro. It contains a list of all the
\par # source files for this component. Specify each source file on a separate
\par # line using the line-continuation character. This minimizes merge
\par # conflicts if two developers are adding source files to the same component.
\par #
\par
\par SOURCES=source1.c \\
\par source2.c \\
\par source3.c \\
\par source4.c
\par i386_SOURCES=i386\\source1.asm
\par ALPHA_SOURCES=alpha\\source1.s
\par MIPS_SOURCES=mips\\source1.s
\par PPC_SOURCES=ppc\\source1.s
\par #
\par # Next, specify options for the compiler using {\ul\cf11 C_DEFINES. }{\v CDEFINES}
\par #
\par C_DEFINES=
\par #
\par # Next, specify one or more user-mode test programs and their type.
\par # Use {\ul\cf11 UMTEST}{\v UMTEST} for optional test programs. Use {\uldb\cf11 UMAPPL}{\v UMAPPL} for
\par # programs that are always built when the directory is built. See also
\par # {\uldb\cf11 UMTYPE, }{\v UMTYPE} {\ul\cf11 UMBASE, }{\v UMBASE} and {\ul\cf11 UMLIBS. }{\v UMLIBS}
\par #
\par UMTYPE=nt
\par UMTEST=bunny*baz
\par UMAPPL=bunny*baz
\par UMBASE=0x1000000
\par UMLIBS=obj\\*\\bunny.lib
\par #
\par # Defining either (or both) the variables {\uldb\cf11 NTTARGETFILE0}{\v NTTARGETFILE0} and/or {\ul\cf11 NTTARGETFILES}{\v NT_TARGETFILES}
\par # causes makefile.def to include .\\{\uldb\cf11 makefile.inc}{\v mk_inc} immediately after it
\par # specifies the top level targets (all, clean and loc) and their dependencies.
\par # The makefile.def file expands NTTARGETFILE0 as the first dependent for the
\par # "all" target and NTTARGETFILES as the last dependent for the "all" target.
\par # This is useful for specifying additional targets and dependencies that do not fit the
\par # general case covered by makefile.def.
\par #
\par # NTTARGETFILE0=
\par # NTTARGETFILES=
\par # For more information about the macros in this file, see {\uldb\cf11 Macro Definitions. }{\v Macro_Definitions}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Building_Multiple_Targets_from_One_Subdirectory}} {\cs16\super ${\footnote \pard\plain
\s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $} Building Multiple Targets from One Subdirectory}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Building Multiple Targets from One Subdirectory}} {\cs16\super +
{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} BEGIN:0}} Building Multiple Targets from One Subdirectory
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
In a typical build model, every subdirectory builds one target. The Build Utility gives you the advantage of having a single subdirectory where you can build multiple executable output files. The Build Utility supports a library-linked-to-main model, whic
h enables you to have one subdirectory that builds multiple targets that are very similar. This eliminates the need to move recursively through 10 different subdirectories to build 10 different .exe files when they are all pretty much the same except for
one source file that\rquote s different between them.
\par In a single subdirectory you can have a number of files that share some common subset of code. Each of them will have a single source file that will have the unique code for that product. If your build product consists of several source files, you can spe
cify all but the main source file as components of a library. The Build Utility links this library with the file containing main.
\par This model is especially useful in situations like in the tree for Windows\~NT tr
ee where you have a subdirectory or in which you are building UNIX tools that all have a common file I/O code, memory code, and registry code. Then they also have a little wrapper around it that implements the name, which is the thing specific to that too
l. What the Build Utility enables you to do is set up a target type of library in that subdirectory and use the use remote applications macro (UMAPPL) to specify the target names.
\par Consider, for example the simple UNIX commands tar, cat and grep:
\par \pard \li720\ri130\sa240\widctlpar UMAPPL=tar*cat*grep
\par \pard \ri130\sa240\widctlpar
Put all your common source files in the SOURCES macro. The Build Utility compiles all of those into a library, then compiles each one of the individual source files for tar.c, cat.c, and grep.c and links each of those against the common library that you b
uilt to produce tar.exe, cat.exe, and grep.exe.
\par {\b See Also}\line {\uldb\cf11 UMAPPL}{\v UMAPPL}\line {\uldb\cf11 SOURCES}{\v SOURCES}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} SOURCES_File}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} SOURCES File}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} SOURCES File}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} sources File
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 You describe build products in a file named \ldblquote sources\rdblquote that resides in each source code subdirectory. The sources file contains a series of {\uldb\cf11 macro definitions}{\v Macro_Definitions}
that are recognized by the Build Utility. A sample of this file is contained in {\uldb\cf11 Quick Start. }{\v Quick_Start}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} binplace_exe}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} binplace.exe}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} binplace.exe}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} binplace.exe
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Binplace.exe is the utility that the Build Utility uses to create the installable share point for the product. When you build an image, the Binplace Utility determines where that image will reside.
\par {\f5 The Build Utility only calls binplace.exe if }_NT<platform>TREE is defined before building. When enabled, the build process will run binplace.exe after building every{\f5
image. If there are extra files you want distributed, use the MISCFILES macro to specify them in your sources file.
\par }BINPLACE_PLACEFILE is something you define when you do not want to have a public directory. The Build Utility expects to find this file in public, but if you do not want it there, you can override it with your own name.
\par The platform determines whether or not the Build Utility should run binplace. Binplace will be run if _NT<platform>TREE is defined, for example:
\par \pard \li720\ri130\sa240\widctlpar _NTMIPSTREE={\i root_of_the_ mips_release_tree}\line _NTALPHATREE={\i root_of_the_alpha_release_tree} \line _NT386TREE={\i root_of_the_x86_release_tree}\line _NTPPCTREE={\i root_of_the_ppc_release_tree}
\par \pard \ri130\sa240\widctlpar {\b See Also}\line {\ul\cf11 BINPLACE_FLAGS}{\v BINPLACE_FLAGS}\line {\uldb\cf11 NTDBGFILES}{\v NTDBGFILES}\line {\uldb\cf11 BINPLACE_PLACEFILE}{\v BINPLACE_PLACEFILE}\line
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} build_dat}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} build.dat}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} build.dat}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} build.dat
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
When you use the Build Utility, it looks for a sources file and a dirs file. It processes the dependencies and builds a file called build.dat, which it puts in the NT subdirectory by default. Build.dat is basically a dump from build.exe o
f what the dependency graph looks like.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} DIRS_File}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} DIRS File}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} DIRS File}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} dirs File
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 You can instruct the Build Utility to recursively build an entire source tree by using the {\i dirs}
file. The dirs file resides in a directory that contains subdirectories (that is, at the root of a source code tree or subtree). Each subdirectory can be a source directory or another source tree. You should place a dirs file at the root of each source c
ode subtree. Then go to the leaf node in each source code subdirectory and specify your build products in a {\i sources} file. To view a sample of a sources file, see {\uldb\cf11 Quick Start. }{\v Quick_Start}
\par You should define the following macros in your dirs file:
\par \trowd \trgaph108\trleft-108 \cellx1980\cellx8748 \pard \ri130\sa240\widctlpar\intbl DIRS\cell
This macro lists the directories that the Build Utility should always go into. Specify a list of subdirectories to be built unconditionally. Separate the entries in this list with spaces or tabs\line \cell \pard \widctlpar\intbl \row \trowd
\trgaph108\trleft-108 \cellx1980\cellx8748 \pard \ri130\sa240\widctlpar\intbl OPTIONAL_DIRS\cell This macro lists the directories that the Build Utility does not have to go into, and by default will not go into. Specify a list of subdirectories to be
built only if they are explicitly specified on the original build command line.\line \cell \pard \widctlpar\intbl \row \pard \ri130\sa240\widctlpar {\b\f5 Example}{\f5 :
\par }\pard \li720\ri130\sa240\widctlpar {\f5 DIRS=dir1 dir2 dir3\line OPTIONAL_DIRS=dir4 dir5
\par }\pard \ri130\sa240\widctlpar {\f5 Build <}{\i\f5 currentdir}{\f5 >\\dir1 <}{\i\f5 currentdir}{\f5 >\\dir2 <}{\i\f5 currentdir}{\f5 >\\dir3 in that order, all the time. <}{\i\f5 currentdir}{\f5 >\\dir4 and <}{\i\f5 currentdir}{\f5 >\\
dir5 will only be built if you specify them to build on the command line or in the }{\ul\cf11 BUILD_OPTIONS}{\v BUILD_OPTIONS}{\f5 environment variable.
\par The Build Utility supports a 'not' switch (~) for removing a directory from the default build. Using the above example,
\par }\pard \li720\ri130\sa240\widctlpar {\f5 build ~dir1 ~dir3 dir4
\par }\pard \ri130\sa240\widctlpar {\f5
would build only dir2 and dir4. If you follow a distinct pattern when naming your directories, it's trivial to use this to build multiple versions of a product. List the current version in the DIRS macro, the new or previous versions in the OPTIONAL_DIRS
macro. On your build machine, you can then build whichever version you want.
\par }\pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} makefile_def}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} makefile.def}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} makefile.def}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} makefile.def
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The Build Utility makes use of a generic makefile called makefile.def, which contains all the {\uldb\cf11 macro definitions}{\v Macro_Definitions} tha
t the sources file uses. (For an example of a sources file, see {\uldb\cf11 Quick Start}{\v Quick_Start}
.) The Build Utility sets the appropriate header and library include paths, compiler names and switches, and linker switches that are defined in makefile.def, and invokes nmake.exe.
\par The current version of makefile.def resides on \\\\orville\\razzel\\src\\public\\oak\\bin.
\par {\b Note}: You must use nmake version 1.30 or greater because earlier versions do not understand the message command and the Build Utility depends on a number of features that are only in version 1.30 or greater.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} makefile_plt}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} makefile.plt}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} makefile.plt}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} makefile.plt
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
The platform-specific information for the makefiles is contained in makefile.plt. You can include makefile.plt in your own makefiles to select the build target and set platform-specific variables. For an example of this, see {\uldb\cf11 makefile.def}{\v
makefile_def}. The latest {\v copy of makefile.def} is stored on \\\\orville\\razzel\\src\\public\\oak\\bin.
\par There are three very useful macros in this file:
\par {\uldb\cf11 TARGET_DIRECTORY}{\v TARGET_DIRECTORY}\line {\ul\cf11 FREEBUILD}{\v FREEBUILD}\line {\ul\cf11 TARGET_CPP}{\v TARGET_CPP}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} makefile_tpl}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} makefile.tpl}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} makefile.tpl}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} makefile.tpl
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 This is the template makefile. Nothing has to be in the makefile except:
\par }\pard \li720\ri130\sa240\widctlpar {\f5 !include $(NTMAKEENV)\\makefile.def
\par }\pard \ri130\sa240\widctlpar The complete text of makefile.tpl is as follows:
\par \pard \ri130\widctlpar #
\par # DO NOT EDIT THIS FILE!!! Edit .\\sources. if you want to add a new source
\par # file to this component. This file merely indirects to the real makefile
\par # that is shared by all the components of Windows\~NT and OS/2
\par #
\par !INCLUDE $(NTMAKEENV)\\makefile.def
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} verrc_tpl}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} verrc.tpl}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} verrc.tpl}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} verrc.tpl
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use this template file to add a version resource to an image. The final name would be something like <myimage.rc>. }The following is the complete text of verrc.tpl:
\par \pard \ri130\widctlpar /*
\par ** Template for version resources. Place this in your .rc file,
\par ** editing the values for VER_FILETYPE, VER_FILESUBTYPE,
\par ** VER_FILEDESCRIPTION_STR and VER_INTERNALNAME_STR as needed.
\par ** See winver.h for possible values.
\par **
\par ** Ntverp.h defines several global values that do not need to be
\par ** changed except for official releases such as betas, SDK updates, etc.
\par **
\par ** Common.ver has the actual version resource structure that all these
\par ** #defines eventually initialize.
\par */
\par
\par /* #include <windows.h> needed if this will be the .rc file */
\par
\par #include <ntverp.h>
\par
\par /*-----------------------------------------------*/
\par /* the following lines are specific to this file */
\par /*-----------------------------------------------*/
\par
\par /* VER_FILETYPE, VER_FILESUBTYPE, VER_FILEDESCRIPTION_STR
\par * and VER_INTERNALNAME_STR must be defined before including COMMON.VER
\par * The strings do not need a '\\0', because common.ver has them.
\par */
\par #define\tab VER_FILETYPE\tab VFT_DLL
\par /* possible values:\tab \tab VFT_UNKNOWN
\par \tab \tab \tab \tab VFT_APP
\par \tab \tab \tab \tab VFT_DLL
\par \tab \tab \tab \tab VFT_DRV
\par \tab \tab \tab \tab VFT_FONT
\par \tab \tab \tab \tab VFT_VXD
\par \tab \tab \tab \tab VFT_STATIC_LIB
\par */
\par #define\tab VER_FILESUBTYPE\tab VFT2_UNKNOWN
\par /* possible values\tab \tab VFT2_UNKNOWN
\par \tab \tab \tab \tab VFT2_DRV_PRINTER
\par \tab \tab \tab \tab VFT2_DRV_KEYBOARD
\par \tab \tab \tab \tab VFT2_DRV_LANGUAGE
\par \tab \tab \tab \tab VFT2_DRV_DISPLAY
\par \tab \tab \tab \tab VFT2_DRV_MOUSE
\par \tab \tab \tab \tab VFT2_DRV_NETWORK
\par \tab \tab \tab \tab VFT2_DRV_SYSTEM
\par \tab \tab \tab \tab VFT2_DRV_INSTALLABLE
\par \tab \tab \tab \tab VFT2_DRV_SOUND
\par \tab \tab \tab \tab VFT2_DRV_COMM
\par */
\par #define VER_FILEDESCRIPTION_STR "Version Checking and File Installation Libraries"
\par #define VER_INTERNALNAME_STR "VERSION.DLL"
\par #define VER_ORIGINALFILENAME_STR "VERSION.DLL"
\par
\par #include "common.ver"
\par \pard \ri130\sa240\widctlpar
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} mk_inc}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} makefile.inc}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} makefile.inc;mipsmk.inc;alphamk.inc;ppcmk.inc;i386mk.inc}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +}
FILES:0}} makefile.inc
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 For each platform, there is a special {\i makefile.inc}:
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li475\ri130\sa240\widctlpar\tx475{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}mipsmk.inc
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}alphamk.inc
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}ppcmk.inc
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}i386mk.inc
\par \pard \ri130\sa240\widctlpar The current version of these files reside on \\\\orville\\razzel\\src\\public\\oak\\
bin. In these files, there are optimization rules or assembler instructions that are specific for that target. There may also be extra link flags, resource compiler flags, or C preprocessor rules that are needed to make it all work. The {\i makefile}
.inc files are not something you would usually edit because there are macros to override all the settings in makefile.inc in your sources file. If you want to change optimization, use{\uldb\cf11 MSC_OPTIMIZATION. }{\v MSC_OPTIMIZATION}
If you want to change linker flags, use{\ul\cf11 LINKER_FLAGS. }{\v LINKER_FLAGS}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} ntverp}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} ntverp.h}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} ntverp.h;Master Version File}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} ntverp.h
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 This is the master version file for Windows\~NT, from which all of version resources are built. It's located in {\f5 \\\\orville\\razzle\\src\\public\\sdk\\inc}
(more conventionally known as in the public project in the \\sdk\\inc subdirectory). Every image has a version resource on it. When they release a build from the Windows\~
NT Build Lab, they increase that master version number. Anything they link or build after that will automatically get a new version resource attached to it with the correct build number.
\par You can either use ntverp or the MASTER_VERSION_FILE macro to specify a different master version file. You do not have to have \\\\public\\sdk\\inc\\ntverp
.h. The VC team uses a different master version file because they have a different version scheme than Windows\~NT does.
\par If you look on the very last line of {\uldb\cf11 makefile.def}{\v makefile_def}, you will see the one place where {\uldb\cf11 MASTER_VERSION_FILE}{\v MASTER_VERSION_FILE} is used as a dependency for the resources.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} objects_mac}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} _objects.mac}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} _objects.mac}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} FILES:0}} _objects.mac
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 The Build Utility puts a file in the obj subdirectory called _objects.mac which contains the object dependencies for each platform.} If you type that file out, all you see is something like:
\par \pard \li720\ri130\sa240\widctlpar i386objects=i386\\x.obj i386\\y.obj
\par mipsobjects=mips\\x.obj mips\\y.obj
\par ppcobjects=ppc\\x.obj ppc\\y.obj
\par \pard \ri130\sa240\widctlpar This is something that the Build Utility creates. It is not something you need to edit. Every time the sources file gets updated, this file is regenerated.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Directory_Structure}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20
{\cs16\super $} Directory Structure}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Directory Structure}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} DIRSTR:0}}
Directory Structure
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Windows{\f1\fs24 \'e2}\~NT{\f1\fs24 \'e2} has a fixed directory tree. {\f5 The root of the build process is usually \\NT (you can change this if you set the }{\ul\cf11 BASEDIR}{\v BASEDIR} {\f5
environment variable). Underneath are two subdirectories. Public, and Private. Public contains all the headers, libraries, build rules, etc shared by the source projects. Private contains all the source code. Each subcomponent in Windows\~
NT has its own directory under private. The major components are:
\par }\trowd \trgaph108\trleft-108 \cellx1094\cellx4839 \pard \ri130\sa240\widctlpar\intbl {\f5 ntos\cell The kernel, core OS, and most drivers\cell }\pard \widctlpar\intbl {\f5 \row }\trowd \trgaph108\trleft-108 \cellx1094\cellx4839 \pard
\ri130\sa240\widctlpar\intbl {\f5 windows\cell The shell\cell }\pard \widctlpar\intbl {\f5 \row }\pard \ri130\sa240\widctlpar\intbl {\f5 ole\cell The OLE source\cell }\pard \widctlpar\intbl {\f5 \row }\pard \ri130\sa240\widctlpar\intbl {\f5 rpc\cell
RPC-related tools and libraries\cell }\pard \widctlpar\intbl {\f5 \row }\trowd \trgaph108\trleft-108 \cellx1094\cellx4839 \pard \ri130\sa240\widctlpar\intbl {\f5 sdktools\cell The source to all the tools\cell }\pard \widctlpar\intbl {\f5 \row }\pard
\ri130\sa240\widctlpar {\f5
\par }Here is an example of the Windows\~NT directory structure:
\par \pard \ri130\widctlpar {\f5 nt
\par +---private
\par \'a6 +---csr
\par \'a6 \'a6 +---inc
\par \'a6 \'a6 +---server
\par \'a6 \'a6 +---alpha
\par \'a6 \'a6 +---daytona
\par \'a6 \'a6 +---i386
\par \'a6 \'a6 +---km
\par \'a6 \'a6 +---mips
\par \'a6 \'a6 +---ppc
\par \'a6 +---dcomidl
\par \'a6 +---developr
\par \'a6 +---dfs
\par |...
\par |
\par +---public
\par +---oak
\par \'a6 +---bin
\par \'a6 \'a6 +---alpha
\par \'a6 \'a6 +---i386
\par \'a6 \'a6 +---mips
\par \'a6 \'a6 +---ppc
\par \'a6 +---inc
\par +---sdk
\par \'a6 +---bin
\par \'a6 +---inc
\par \'a6 \'a6 +---chicago
\par \'a6 \'a6 +---crt
\par \'a6 \'a6 \'a6 +---mrc
\par \'a6 \'a6 \'a6 +---sys
\par \'a6 \'a6 +---gl
\par \'a6 \'a6 +---mfc40
\par \'a6 \'a6 \'a6 +---l.chs
\par \'a6 \'a6 \'a6 +---l.deu
\par \'a6 \'a6 \'a6 +---l.esp
\par \'a6 \'a6 \'a6 +---l.fra
\par \'a6 \'a6 \'a6 +---l.ita
\par \'a6 \'a6 \'a6 +---l.jpn
\par \'a6 \'a6 \'a6 +---l.kor
\par \'a6 \'a6 \'a6 +---res
\par \'a6 \'a6 +---posix
\par \'a6 \'a6 +---sys
\par \'a6 +---lib
\par \'a6 +---alpha
\par \'a6 +---i386
\par \'a6 +---mips
\par \'a6 +---ppc
\par }\pard \ri130\sa240\widctlpar {\f5 +---tools
\par }You can follow the directory structure that Windows\~NT uses for your own build process or you can specify the following macros in your sources file. These macros enable you to specify alternate object directories:
\par \pard \ri130\sa240\widctlpar\tx2718\tx8856 {\f5\ul\cf11 BINPLACE_PLACEFILE}{\v\f5 BINPLACE_PLACEFILE}{\f5 \line }{\f5\ul\cf11 COFFBASE_TXT_FILE}{\v\f5 COFFBASE_TXT_FILE}{\f5 \line }{\f5\ul\cf11 COMPILER_WARNINGS}{\v\f5 COMPILER_WARNINGS}{\f5 \line }{
\ul\cf11 SDK_INC_PATH}{\v SDK_INC_PATH}\line {\ul\cf11 SDK_LIB_PATH}{\v SDK_LIB_PATH}\line {\ul\cf11 CRT_INC_PATH}{\v CRT_INC_PATH}\line {\ul\cf11 CRT_LIB_PATH}{\v CRT_LIB_PATH}\line {\f5\uldb\cf11 MASTER_VERSION_FILE}{\v\f5 MASTER_VERSION_FILE}{\f5
\line }{\ul\cf11 OAK_INC_PATH}{\v OAK_INC_PATH}\line
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Using_the_Build_Utility}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} Using the Build Utility}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Using the Build Utility}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +}
USING:0}} Using the Build Utility
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The Build Utility enables you to build multiple pieces of your product in a logical way and exactly the same. In a typical development environment, you have everybody doing
their own sequence of steps to build their .exe files. The Build Utility eliminates all those differences.
\par {\f5 The files used by build.exe are}:
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa240\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}{\uldb\cf11 sources}{\v SOURCES_File} - {\f5
lists the rules and macros. needed to build a specific component subdirectory.}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\uldb\cf11 dirs}{\v DIRS_File} - contains macros called DIRS and OPTIONAL_DIRS that {\f5 specify the directories to open recursively and the order in which they should be opened.}
\par \pard \ri130\sa240\widctlpar Build.exe looks into the dirs file for the macros DIRS and OPTIONAL_DIRS. It then recurses to each directory li
sted where it might find another dirs file (indicating more directories to recurse into) or a sources file (indicating something needs to be built). If the latter, it looks for the macros SOURCES, INCLUDES, TARGETNAME, and TARGETPATH. These are parsed to
determine the dependencies, the list of files to build, and the end result. Normally, this information is then kept in a file called build.dat that the build utility will create for future reference. Depending on the options you pass to build, it does
the appropriate action and then calls a make program (For more information, see {\ul\cf11 BUILD_MAKE_PROGRAM}{\v BUILD_MAKE_PROGRAM}) to build the component. There are files (makefil0 and {\uldb\cf11 makefile.inc}{\v mk_inc}
) that build will recognize in special circumstances (for instance, only on a clean build or only when NTTARGETFILES is specified in the sources file). When the entire directory tree is built, build terminates. For an introduction to the Build Utility, s
ee {\uldb\cf11 Getting Started. }{\v Getting_Started}
\par Invoke build.exe with the \ldblquote -?\rdblquote option to display the following syntax and command line options:
\par \trowd \trgaph108\trleft-108 \cellx1080\cellx8748 \pard \sa240\widctlpar\intbl -b\cell Displays full error message text without truncating anything.\cell \pard \widctlpar\intbl \row \trowd \trgaph108\trleft-108 \cellx1080\cellx8748 \pard
\sa240\widctlpar\intbl -c\cell Deletes all object files.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -C\cell Deletes all .lib files only.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -e\cell
Generates the build.log, build.err, and build.wrn files.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -E\cell Always keep the log files.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -f\cell
Forces rescan of all source and include files.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -i\cell Ignores extraneous compiler warning messages. \cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -j {\i filename}\cell Use {
\i filename} as the name for log files. The j switch changes the first field, so it produces {\i filename}.log, {\i filename}
.wrn, and filename.err. Some people have it set up on their machine where they share their source drive and then they connect with their x86 or Alpha or MIPS and in each of those they set the j switch so they can build all those machines at the same time
across the net and produce the log, warning and error files for each platform\rquote s build.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -k\cell Keep out-of-date targets (do not delete them).\cell \pard \widctlpar\intbl \row \pard
\sa240\widctlpar\intbl -l\cell Link only, no compiles.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -L\cell Compile only, no link phase.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -M\cell Multiprocessor\cell \pard
\widctlpar\intbl \row \pard \sa240\widctlpar\intbl -m\cell Background mode; run build in the idle priority class.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -o\cell Display out-of-date files.\cell \pard \widctlpar\intbl \row \pard
\sa240\widctlpar\intbl -O\cell Generate obj\\_objects.mac file for current directory.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -p\cell Pause before compile and link phases.\cell \pard \widctlpar\intbl \row \pard
\sa240\widctlpar\intbl -P\cell Print elapsed time after every directory.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -q\cell Query only; do not run nmake.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -r {\i dirpath}
\cell Restarts clean build at specified path.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -s\cell Display status line at top of display.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -S\cell
Display status line with include file line counts.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -t\cell Display the first level of the dependency tree\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -T\cell
Display the complete dependency tree.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -$\cell Display the complete dependency tree hierarchically.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -v\cell
Enable include file version checking.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -w\cell Show warnings on screen.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -z\cell
No dependency checking or scanning of source files; one pass compile and link.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -Z\cell No dependency checking or scanning of source files; two passes.\cell \pard \widctlpar\intbl \row \pard
\sa240\widctlpar\intbl -why\cell List reasons for building targets.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -all\cell Same as specifying -386 , -mips, -alpha and -ppc\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl
-alpha\cell Build targets for Alpha.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -mips\cell Build targets for MIPS.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -386\cell Build targets for i386.\cell \pard
\widctlpar\intbl \row \pard \sa240\widctlpar\intbl -ppc\cell Build targets for PowerPC.\cell \pard \widctlpar\intbl \row \pard \sa240\widctlpar\intbl -x{\i filename}\cell Exclude include file from dependency checks.\cell \pard \widctlpar\intbl \row
\trowd \trgaph108\trleft-108 \cellx1080\cellx8748 \pard \sa240\widctlpar\intbl -nmake {\i arg}\cell Argument to pass to nmake.\cell \pard \widctlpar\intbl \row \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #
{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Multi_processor_Build_Issues}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $} Multi-processor Build Issues}} {\cs16\super K{\footnote
\pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Multi-processor Build Issues;SYNCHRONIZE_DRAIN;SYNCHRONIZE_BLOCK}} Multi-processor Build Issues
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 There are two important multi-processor directives: SYNCHRONIZE_DRAIN and SYNCHRONIZE_BLOCK. Their syntax and meaning are as follows:
\par \trowd \trgaph108\trleft-108 \cellx2610\cellx7424 \pard \sa240\widctlpar\intbl {\f5 SYNCHRONIZE_DRAIN=1\cell Do not build this subdirectory until all the prior subdirectories are done.\cell }\pard \widctlpar\intbl {\f5 \row }\trowd \trgaph108\trleft-108
\cellx2610\cellx7424 \pard \sa240\widctlpar\intbl {\f5 SYNCHRONIZE_BLOCK=1\cell Do not continue building until this subdirectory is done.\cell }\pard \widctlpar\intbl {\f5 \row }\pard \ri130\sa240\widctlpar
Use SYNCHRONIZE_DRAIN when you have a subdirectory that needs the results from a prior subdirectory on the {\ul same} pa
ss. For example, when building a DLL, you may have several subdirectories with TARGETTYPE=LIBRARY where each builds some component. You have another subdirectory with TARGETTYPE=DYNLINK, and the Build Utility will build a DLL that exports functions from t
he component libraries. In such a case, set LINKLIBS to the component libraries, make sure the DLL subdirectory is the last in the parent DIRS file, and add SYNCHRONIZE_DRAIN=1 to the sources file for the DLL.
\par Use SYNCHRONIZE_BLOCK when you have a subdirect
ory that other subdirectories require the results from in order to build. The usual example is a global precompiled header. List the precompiled directory first in the DIRS list, add SYNCHRONIZE_BLOCK=1 to that sources file, and the subsequent directories
that use the PCH will not be built until the PCH is created.
\par {\b Note}: Use these directives very sparingly because they completely stall an MP build when they're encountered. In most cases, the problem is not with the MP nature of the build, but rather the mac
ros used in the sources file. A common mistake is using LINKLIBS to specify import libraries when building a DLL. You almost never want to do this. LINKLIBS {\ul mus}
t exist during pass 1 because they're used to build the import library for the DLL. TARGETLIBS do not need to exist until pass 2 because they are only used to link the image. Use LINKLIBS for component libraries only. Use TARGETLIBS for import libraries.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Specifying_Libraries}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} Specifying Libraries}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Specifying Libraries}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} LIBR:0
}} Specifying Libraries
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Unlike some other environments that use }the LIB environment variable, the Build Utility always requires the full path to eliminate any ambiguity.
\par For instance, s{\f5 ome build processes rely on the linker to "}{\i\f5 figure out"}{\f5
the correct libraries by using paths stored in the LIB environment variable and a list of default libraries stored in the objects. However, there's an inherent (and undesirable) side-effect in this approach because you never really know what library you
're using, and controlling this on a per-library basis is difficult. For consistency, the Built Utility requ
ires you specify the full path to the library(s) and it will disable any default library lookup the linker might perform. Additionally, when specifying the libraries, you should try to abstract any absolute dependencies in the path. The build process pro
vides an asterisk to take the place of the platform. You can use }{\ul\cf11 BASEDIR}{\v BASEDIR} {\f5 macro to take the place for the root of the source tree. You can use the}{\f5\ul\cf11 }{\ul\cf11 SDK_LIB_PATH}{\f5\ul\cf11 }{\v\f5 SDK_LIB_PATH}{\f5
if you don't want to rely on the Windows\~NT} {\uldb\cf11 directory structure. }{\v Directory_Structure}
\par Additionally, you should use an asterisk to indicate the target platform in the path. For instance, assume you're building a typical Win32 Windows exe. Normally, this would require you to link against kernel32.lib, user32.lib, gdi32.lib, and maybe a compo
nent library you built called mylib.lib. Here's what the {\uldb\cf11 TARGETLIBS}{\v TARGETLIBS} macro would look like:
\par \pard \li360\ri130\widctlpar {\f5 TARGETLIBS = \\
\par $(BASEDIR)\\public\\sdk\\lib\\*\\kernel32.lib \\
\par $(BASEDIR)\\public\\sdk\\lib\\*\\user32.lib \\
\par $(BASEDIR)\\public\\sdk\\lib\\*\\gdi32.lib \\
\par }\pard \li360\ri130\sa240\widctlpar {\f5 ..\\mylib\\obj\\*\\mylib.lib
\par }\pard \ri130\sa240\widctlpar When building on X86, this would mean the same as:
\par \pard \li360\ri130\widctlpar {\f5 TARGETLIBS = \\
\par $(BASEDIR)\\public\\sdk\\lib\\i386\\kernel32.lib \\
\par $(BASEDIR)\\public\\sdk\\lib\\i386\\user32.lib \\
\par $(BASEDIR)\\public\\sdk\\lib\\i386\\gdi32.lib \\
\par }\pard \li360\ri130\sa240\widctlpar {\f5 ..\\mylib\\obj\\i386\\mylib.lib
\par }\pard \ri130\sa240\widctlpar\tx4428\tx8856 {\b See Also}\line {\uldb\cf11 LINKLIBS}{\v LINKLIBS}\line {\uldb\cf11 TARGETLIBS}{\v TARGETLIBS}\line {\uldb\cf11 TARGETPATH}{\v TARGETPATH}\line {\ul\cf11 UMLIBS}{\v UMLIBS}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Precompiled_Headers}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20
{\cs16\super $} Precompiled Headers}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Precompiled Headers;Headers}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} HEADERS:0
}} Precompiled Headers
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The easiest way to use precompiled headers is to state in your sources file:
\par PRECOMPILED_INCLUDE={\i some_header_file_that_every_source_file_include}s
\par If you are building C++ code you state:
\par PRECOMPILED_CXX=1
\par Then you are done!
\par {\cf1 Precompiled headers are put into the obj\\platform subdirectory by default or $(O). Therefore, they should not collide with simultaneous compilations.
\par }{\b See Also}\line {\ul\cf11 PRECOMPILED_CXX}{\v PRECOMPILED_CXX}\line {\ul\cf11 PRECOMPILED_INCLUDE}{\v PRECOMPILED_INCLUDE}\line {\ul\cf11 PRECOMPILED_OBJ}{\v PRECOMPILED_OBJ}\line {\ul\cf11 PRECOMPILED_TARGET}{\v PRECOMPILED_TARGET}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Environment_Variables}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} Environment Variables}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Environment Variables;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
+} ENVVAR:00}} Environment Variables
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 You can set the following variables in your environment:
\par \pard \ri130\widctlpar {\ul\cf11 BUILD_OPTIONS}{\v BUILD_OPTIONS}\line {\ul\cf11 BUILD_DEFAULTS}{\v BUILD_DEFAULTS}\line {\uldb\cf11 BUILD_MAKE_PROGRAM}{\v BUILD_MAKE_PROGRAM}\line {\uldb\cf11 BUILD_DEFAULT_TARGETS}{\v BUILD_DEFAULT_TARGETS}\line {
\uldb\cf11 BUILD_ALT_DIR}{\v BUILD_ALT_DIR}
\par \pard \ri130\sa240\widctlpar
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} BUILD_ALT_DIR}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} BUILD_ALT_DIR}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} BUILD_ALT_DIR;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} ENVVAR:05}}
BUILD_ALT_DIR
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
Use this to specify an alternate object directory name. It must be ten characters or less and contain no spaces. The value is added to the end of the .obj name and (if no -j switch is used for build.exe) the logfile name, for example:
\par \pard \li720\ri130\sa240\widctlpar c:\\> set BUILD_ALT_DIR=Debug\line c:\\> build -MIPS -e
\par \pard \ri130\sa240\widctlpar Would generate objects in the objDebug\\
mips subdirectory and logfiles named "buildDebug.log/buildDebug.wrn/buildDebug.err". If you do not set this, the default is nothing. Use this macro when you want to build the same source in different windows using different language, optim
izations, or debugging information.
\par \pard \ri130\sa240\widctlpar\tx2718\tx8856 This Build Alternate Directory macro was added to the Build Utility so the VC group could use the same build process as the Windows\~
NT group. They wanted to be able to build debug and retail versions from the same subdirectory at the same time on the same machine. This macro enabled them to specify the output directory. Instead of always being OBJ{\i machine_name}
, it would be OBJ plus whatever they tacked onto this BUILD_ALT_DIR macro. That enabled them to specify a "D" for where the debug files went. They had another screen group that did retail builds.
\par You could extend this logic and make it one screen group that does USA and one that does Korean, or one that does optimize and one that does not, The only limitations on BUILD
_ALT_DIR are that it be less than 10 characters and it cannot have embedded spaces or dots.
\par \pard \ri130\sa240\widctlpar If you do not want to build using the same {\uldb\cf11 directory structure}{\v Directory_Structure} as the Windows\~NT group, specify the following macros and you do not need it any more.
\par \pard \ri130\sa240\widctlpar\tx2718\tx8856 {\f5\ul\cf11 BINPLACE_PLACEFILE}{\v\f5 BINPLACE_PLACEFILE}{\f5 \line }{\f5\ul\cf11 COFFBASE_TXT_FILE}{\v\f5 COFFBASE_TXT_FILE}{\f5 \line }{\f5\ul\cf11 COMPILER_WARNINGS}{\v\f5 COMPILER_WARNINGS}{\f5 \line }{
\ul\cf11 SDK_INC_PATH}{\v SDK_INC_PATH}\line {\ul\cf11 SDK_LIB_PATH}{\v SDK_LIB_PATH}\line {\ul\cf11 CRT_INC_PATH}{\v CRT_INC_PATH}\line {\ul\cf11 CRT_LIB_PATH}{\v CRT_LIB_PATH}\line {\f5\uldb\cf11 MASTER_VERSION_FILE}{\v\f5 MASTER_VERSION_FILE}{\f5
\line }{\ul\cf11 OAK_INC_PATH}{\v OAK_INC_PATH}\line
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} BUILD_DEFAULT_TARGETS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} BUILD_DEFAULT_TARGETS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} BUILD_DEFAULT_TARGETS}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +}
ENVVAR:10}} BUILD_DEFAULT_TARGETS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
Use this to specify the default target platform for which you are building. Assuming cross compilers existed, you could set it to -MIPS on an X86 and build MIPS binaries. Usually, you can just set it to the platform you're hosted on, for example:
\par \pard \ri130\widctlpar c:\\> build -mips
\par
\par means the same as:
\par
\par c:\\> set BUILD_DEFAULT_TARGETS=-mips
\par c:\\> build
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} BUILD_DEFAULTS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} BUILD_DEFAULT}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} BUILD_DEFAULT}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} ENVVAR:15}} BUILD_DEFAULT
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Used this to specify options to build, for example:
\par \pard \ri130\widctlpar c:\\> build -eswM -nmake -i
\par
\par means the same as:
\par
\par c:\\> set BUILD_DEFAULT=-eswM -nmake -i
\par c:\\> build
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} BUILD_MAKE_PROGRAM}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} BUILD_MAKE_PROGRAM}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} BUILD_MAKE_PROGRAM}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} ENVVAR:20}}
BUILD_MAKE_PROGRAM
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5
Use this to specify the make program to execute. The default is nmake.exe, but if you want to use some other make program, just set this variable. You can specify the full path name to the make program, if desired.
\par }\pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} BUILD_OPTIONS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} BUILD_OPTIONS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} BUILD_OPTIONS}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} ENVVAR:25}} BUILD_OPTIONS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this to specify the OPTIONAL_DIRS to process, for example:
\par \pard \ri130\widctlpar // DIRS file:
\par DIRS=dir1 dir2 dir3
\par OPTIONAL_DIRS=OptDir1 OptDir2 OptDir3
\par
\par c:\\> build OptDir1 OptDir2 OptDir3
\par
\par means the same as:
\par
\par c:\\> set BUILD_OPTIONS=OptDir1 OptDir2 OptDir3
\par c:\\> build
\par \pard \ri130\sa240\widctlpar
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Macro_Definitions}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Macro Definitions}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Macro Definitions}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
Macro Definitions
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
You set the variables for most of the following macros in a sources file; a few are set in your environment (for a list of these, see Environment Variables): Except for DIRS and OPTIONAL_DIRS, which are used by build.exe, these macros are all used by nmak
e. All that build.exe does is open all the files, figure out the dependencies, and then calls nmake. The other macros us
ed in the build process are all used by nmake. Here are all the macro names, how they are used and why you would want to put them in your sources file.
\par \pard \ri130\widctlpar {\uldb\cf11 INCLUDES}{\v INCLUDES}
\par {\uldb\cf11 SOURCES}{\v SOURCES}
\par {\uldb\cf11 TARGETEXT}{\v TARGETEXT}
\par {\uldb\cf11 TARGETNAME}{\v TARGETNAME}
\par {\uldb\cf11 TARGETPATH}{\v TARGETPATH}
\par {\uldb\cf11 TARGETTYPE}{\v TARGETTYPE}
\par {\uldb\cf11 UMAPPL}{\v UMAPPL}
\par {\uldb\cf11 UMAPPLEXT}{\v UMAPPLEXT}
\par {\uldb\cf11 UMLIBS}{\v UMLIBS}
\par \pard \ri130\sa240\widctlpar
\par Optional macros that you may want to define in your sources file include:
\par \pard \ri130\widctlpar {\uldb\cf11 BASEDIR}{\v BASEDIR}
\par {\uldb\cf11 BINPLACE_FLAGS}{\v BINPLACE_FLAGS}
\par {\uldb\cf11 BINPLACE_PLACEFILE}{\v BINPLACE_PLACEFILE}
\par {\uldb\cf11 C_DEFINES}{\v CDEFINES}{\uldb\cf11
\par COFFBASE}{\v COFFBASE}
\par {\uldb\cf11 COFFBASE_TXT_FILE}{\v COFFBASE_TXT_FILE}
\par {\uldb\cf11 COMPILER_WARNINGS}{\v COMPILER_WARNINGS}
\par {\uldb\cf11 CRT_INC_PATH}{\v CRT_INC_PATH}
\par {\uldb\cf11 CRT_LIB_PATH}{\v CRT_LIB_PATH}
\par {\uldb\cf11 DEBUG_CRTS}{\v DEBUG_CRTS}
\par {\uldb\cf11 DLLBASE}{\v DLLBASE}
\par {\uldb\cf11 DLLDEF}{\v DLLDEF}
\par {\uldb\cf11 DLLENTRY}{\v DLLENTRY}
\par {\uldb\cf11 DLLLIBOBJECTS}{\v DLLLIBOBJECTS}
\par {\uldb\cf11 DLLORDER}{\v DLLORDER}
\par {\uldb\cf11 DRIVERBASE}{\v DRIVERBASE}
\par {\uldb\cf11 EXEPROFILEINPUT}{\v EXEPROFILEINPUT}
\par {\uldb\cf11 FREEBUILD}{\v FREEBUILD}
\par {\uldb\cf11 GPSIZE}{\v GPSIZE}
\par {\uldb\cf11 HALBASE}{\v HALBASE}
\par {\uldb\cf11 IDL_RULES}{\v IDL_RULES}
\par {\uldb\cf11 IDL_TYPE}{\v IDL_TYPE}
\par {\uldb\cf11 LANGUAGE}{\v LANGUAGE}
\par {\uldb\cf11 LINKER_FLAGS}{\v LINKER_FLAGS}
\par {\uldb\cf11 LINKER_NOREF}{\v LINKER_NOREF}
\par {\uldb\cf11 LINKLIBS}{\v LINKLIBS}
\par {\uldb\cf11 MAJORCOMP}{\v MAJORCOMP}
\par {\uldb\cf11 MAKEDLL}{\v MAKEDLL}
\par {\uldb\cf11 MASTER_VERSION_FILE}{\v MASTER_VERSION_FILE}
\par {\uldb\cf11 MFC_FLAGS}{\v MFC_FLAGS}
\par {\uldb\cf11 MFC_INC_PATH}{\v MFC_INC_PATH}
\par {\uldb\cf11 MFC_INCLUDES}{\v MFC_INCLUDES}
\par {\ul\cf11 MFC_LIB_PATH}{\v MFC_LIB_PATH}
\par {\uldb\cf11 MFC_LIBS}{\v MFC_LIBS}
\par {\ul\cf11 MFC_VER}{\v MFC_VER}
\par {\uldb\cf11 MIDL_OPTIMIZATION}{\v MIDL_OPTIMIZATION}
\par {\uldb\cf11 MIDL_UUIDDIR}{\v MIDL_UUIDDIR}
\par {\uldb\cf11 MINORCOMP}{\v MINORCOMP}
\par {\uldb\cf11 MISCFILES}{\v MISCFILES}
\par {\uldb\cf11 MSC_OPTIMIZATION}{\v MSC_OPTIMIZATION}
\par {\uldb\cf11 MSC_WARNING_LEVEL}{\v MSC_WARNING_LEVEL}
\par {\uldb\cf11 NOLINK}{\v NOLINK}
\par {\uldb\cf11 NOMFCPDB}{\v NOMFCPDB}
\par {\f5\ul\cf11 NO_NTDLL}{\v\f5 NO_NTDLL}{\uldb\cf11
\par NOT_LEAN_AND_MEAN}{\v NOT_LEAN_AND_MEAN}
\par {\uldb\cf11 NT_INST}{\v NT_INST}
\par {\uldb\cf11 NT_UP}{\v NT_UP}
\par {\uldb\cf11 NTDBGFILES}{\v NTDBGFILES}
\par {\uldb\cf11 NTDEBUG}{\v NTDEBUG}
\par {\uldb\cf11 NTDEBUGTYPE}{\v NTDEBUGTYPE}
\par {\uldb\cf11 NTKEEPRESOURCETMPFILES}{\v NTKEEPRESOURCETMPFILES}
\par {\uldb\cf11 NTNOFUZZYLOOKUP}{\v NTNOFUZZYLOOKUP}
\par {\uldb\cf11 NTNOPCH}{\v NTNOPCH}
\par {\uldb\cf11 NTPFROFILEINPUT}{\v NTPROFILEINPUT}
\par {\uldb\cf11 NTTARGETFILE0}{\v NTTARGETFILE0}
\par {\uldb\cf11 NTTARGETFILE1}{\v NTTARGTFILE1}
\par {\uldb\cf11 NTTARGETFILES}{\v NT_TARGETFILES}
\par {\uldb\cf11 O}{\v O}
\par {\uldb\cf11 OAK_INC_PATH}{\v OAK_INC_PATH}
\par {\uldb\cf11 PASS0_CLIENTDIR}{\v PASS0_CLIENTDIR}
\par {\uldb\cf11 PASS0_HEADERDIR}{\v PASS0_HEADERDIR}
\par {\uldb\cf11 PASS0_SERVERDIR}{\v PASS0_SERVERDIR}
\par {\uldb\cf11 PASS0_SOURCEDIR}{\v PASS0_SOURCEDIR}
\par {\uldb\cf11 PNP_POWER}{\v PNP_POWER}
\par {\uldb\cf11 PRECOMPILED_CXX}{\v PRECOMPILED_CXX}
\par {\uldb\cf11 PRECOMPILED_INCLUDE}{\v PRECOMPILED_INCLUDE}
\par {\uldb\cf11 PRECOMPILED_OBJ}{\v PRECOMPILED_OBJ}
\par {\uldb\cf11 PRECOMPILED_TARGET}{\v PRECOMPILED_TARGET}
\par {\uldb\cf11 RC_COMPILER}{\v RC_COMPILER}
\par {\uldb\cf11 SDK_INC_PATH}{\v SDK_INC_PATH}
\par {\uldb\cf11 SDK_LIB_PATH}{\v SDK_LIB_PATH}
\par {\uldb\cf11 SOURCES_USED}{\v SOURCES_USED}
\par {\uldb\cf11 SUBSYSTEM_VERSION}{\v SUBSYSTEM_VERSION}
\par {\uldb\cf11 TARGET_CPP}{\v TARGET_CPP}
\par {\uldb\cf11 TARGET_DIRECTORY}{\v TARGET_DIRECTORY}
\par {\uldb\cf11 TARGETLIBS}{\v TARGETLIBS}
\par {\uldb\cf11 TARGETPATHLIB}{\v TARGETPATHLIB}
\par {\uldb\cf11 UMBASE}{\v UMBASE}
\par {\uldb\cf11 UMENTRY}{\v UMENTRY}
\par {\uldb\cf11 UMENTRYABS}{\v UMENTRYABS}
\par {\uldb\cf11 UMTEST}{\v UMTEST}
\par {\uldb\cf11 UMTYPE}{\v UMTYPE}
\par {\uldb\cf11 USE_CRTDLL}{\v USE_CRTDLL}
\par {\uldb\cf11 USE_INCREMENTAL_LINKING}{\v USE_INCREMENTAL_LINKING}
\par {\uldb\cf11 USE_LIBCNTPR}{\v USE_LIBCNTPR}
\par {\uldb\cf11 USE_MFCUNICODE}{\v USE_MFCUNICODE}
\par {\uldb\cf11 USE_MFC}{\v USE_MFC}
\par {\ul\cf11 USE_MFC30}{\v\f5 USE_MFC30}{\uldb\cf11
\par USE_MSVCRT}{\v USE_MSVCRT}
\par {\uldb\cf11 USE_NATIVE_EH}{\v USE_NATIVE_EH}
\par {\uldb\cf11 USE_NOLIBS}{\v USE_NOLIBS}
\par {\uldb\cf11 USE_NTDLL}{\v USE_NTDLL}
\par {\uldb\cf11 USE_PDB}{\v USE_PDB}
\par {\uldb\cf11 USE_STATIC_MFC}{\v USE_STATIC_MFC}
\par {\uldb\cf11 USECXX_FLAG}{\v USECXX_FLAG}
\par {\uldb\cf11 USER_C_FLAGS}{\v USER_C_FLAGS}
\par {\uldb\cf11 USE_LIBCMT}{\v USE_LIBCMT}
\par {\uldb\cf11 USER_INCLUDES}{\v USER_INCLUDES}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} BASEDIR}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} BASEDIR}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} BASEDIR;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} BASEDIR
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use the BASEDIR macro when referring to the base of the source tree. By default, the source tree starts at $(_NTDRIVE)\\
nt, but it's not required. By using BASEDIR to refer to the base, you abstract out this dependency.
\par Example
\par Instead of this:
\par TARGETLIBS=d:\\nt\\public\\sdk\\lib\\*\\kernel32.lib
\par Use this:
\par } TARGETLIBS=$(BASEDIR)\\public\\sdk\\lib\\*\\kernel32.lib
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} BINPLACE_FLAGS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} BINPLACE_FLAGS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} BINPLACE_FLAGS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
BINPLACE_FLAGS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify arguments that you want to pass to {\uldb\cf11 binplace.exe. }{\v binplace_exe} Type binplace-? to display a list of these switches.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} BINPLACE_PLACEFILE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} BINPLACE_PLACEFILE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} BINPLACE_PLACEFILE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
BINPLACE_PLACEFILE
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify the placefile used by binplace. If nothing is listed,
\par $({\ul\cf11 BASEDIR}{\v BASEDIR})\\public\\sdk\\lib\\placefil.txt is used by default.
\par For more information, see {\uldb\cf11 binplace.exe. }{\v binplace_exe}
\par Set this macro if you don't use the Windows\~NT {\uldb\cf11 directory structure. }{\v Directory_Structure}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} CDEFINES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} C_DEFINES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} C_DEFINES;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} C_DEFINES
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify switches you want passed to the compiler. Typically, they are compiler #defines.
\par You might specify:
\par \pard \li720\ri130\sa240\widctlpar C_DEFINES = /DDEBUG_BUILD
\par \pard \ri130\sa240\widctlpar
to define DEBUG_BUILD to the compiler. There's no limit to what this #define can be except that C_DEFINES gets passed to the compiler and it also gets passed to the resource compiler. Therefore, you cannot put compiler optimization or other machine-
or tool-specific switches in the C_DEFINES macro. Instead, use one of the following macros for this:
\par {\uldb\cf11 MSC_OPTIMIZATION}{\v MSC_OPTIMIZATION}\line {\uldb\cf11 MSC_WARNING_LEVEL}{\v MSC_WARNING_LEVEL}\line {\ul\cf11 USER_C_FLAGS}{\v USER_C_FLAGS}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} COFFBASE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} COFFBASE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} COFFBASE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} COFFBASE
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use this macro to specify the name to look up in }{\ul\cf11 COFFBASE_TXT_FILE. }{\v COFFBASE_TXT_FILE} If you do not specify a name, it defaults to the value of {\ul\cf11 TARGETNAME}{\v TARGETNAME}
(if building a DYNLINK) or{\f5 usermode (if you are building a UMAPPL, PROGLIB, or PROGRAM). If you want to specify an absolute base address for your image and not use a global file for all, see }{\uldb\cf11 DLLBASE}{\v DLLBASE} or {\uldb\cf11 UMBASE.
}{\v UMBASE}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} COFFBASE_TXT_FILE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} COFFBASE_TXT_FILE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} COFFBASE_TXT_FILE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
COFFBASE_TXT_FILE
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The name of the file passed to the linker with the base addresses for the images you build. By default, this is $({\ul\cf11 BASEDIR}{\v BASEDIR})\\public\\sdk\\lib\\
coffbase.txt. The file should have three columns. The first is the name of the image. The second is the starting address for the image. The last is the maximum size of the image. There should also be an entry with the name "usermode"
that will be the default value. Here's an example:
\par \tab usermode\tab 0x60000000\tab 0x20000000
\par \tab MyDll1\tab \tab 0x70000000\tab 0x00010000
\par \tab MyDll2\tab \tab 0x70010000\tab 0x00010000
\par Set this macro if you don't use the Windows NT {\uldb\cf11 directory structure. }{\v Directory_Structure}
\par The Build Utility assumes that coffbase.txt will be in \\\\public\\sdk\\lib and will be called coffbase.txt. You can override this filename and call it anything you want by using COFFBASE_TXT_FILE.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} COMPILER_WARNINGS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} COMPILER_WARNINGS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} COMPILER_WARNINGS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
COMPILER_WARNINGS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The name of the warning file passed to the compiler with the /FI switch. By default, this is $({\ul\cf11 BASEDIR}{\v BASEDIR})\\public\\sdk\\inc\\warning.h. The file contains a list of comp
iler pragmas used to disable, enable, or promote warnings for the entire build.
\par Set this macro if you don't use the Windows\~NT {\uldb\cf11 directory structure}{\v Directory_Structure}.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} CRT_INC_PATH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} CRT_INC_PATH}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} CRT_INC_PATH;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} CRT_INC_PATH
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Specifies the path to the C Runtime headers. The default is $({\ul\cf11 BASEDIR}{\v BASEDIR})\\public\\sdk\\inc\\crt.
\par Set this macro if you don't use the Windows\~NT {\uldb\cf11 directory structure. }{\v Directory_Structure}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} CRT_LIB_PATH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} CRT_LIB_PATH}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} CRT_LIB_PATH;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} CRT_LIB_PATH
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify {\f5 the path to the C Runtime libraries . The default is $(}{\ul\cf11 BASEDIR}{\v BASEDIR}{\f5 )\\public\\sdk\\lib\\*
\par }Set this macro if you don't use the Windows\~NT {\uldb\cf11 directory structure}{\v Directory_Structure}.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} DEBUG_CRTS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} DEBUG_CRTS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} DEBUG_CRTS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} DEBUG_CRTS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
Whether you build checked or free system, the Build Utility always links against the retail runtime libraries and the retail MFC. If you want to link against the debug MFC and the debug runtime libraries, specify the following in your sources file or set
it in your environment variables before you build:
\par \pard \li720\ri130\sa240\widctlpar DEBUG_CRTS=1
\par \pard \ri130\sa240\widctlpar For example, the VC team sets DEBUT_CRT=1 in a batch file that sets up for a debug build of the VC product because the VC team builds differently than the Windows\~NT team, and do not use the debug runtime libraries.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} DLLBASE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} DLLBASE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} DLLBASE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} DLLBASE
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 You only need to use this macro when your {\uldb\cf11 TARGETTYPE}{\v TARGETTYPE}
macro is set to DYNLINK. Use it to set the base address for the DLL image you are creating. If you do not specify an address, the Build Utility will assume that the target name in coffbase.txt is the name of your image. You can override this default targ
et name by specifying a target name with the DL
LBASE macro. You can set DLLBASE to be the hard-coded base address, a hex address, or you can leave it blank. If you leave it blank, the Build Utility will always look up the target name specified in coffbase.txt.
\par Example: If you are building kernel32.dll, the Build Utility will look up kernel32 in coffbase.txt to find that base address.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} DLLDEF}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} DLLDEF}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} DLLDEF;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} DLLDEF
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify the name of the .def file that the Build Utility will pass to the librarian when building the export and import files. If you do
not set this, the Build Utility will assume it is the same name as the image you are building. The most common usage is:
\par \pard \li720\ri130\sa240\widctlpar {\f5 DLLDEF=mydll.def
\par }\pard \ri130\sa240\widctlpar {\f5 Additionally, there is a standard inference rule that will run the C preprocessor over the .def or .src file in the current directory to create build-specific .def files in the object subdirectory. The same compiler }
defines {\f5 you key off of in your source code can be used in the root .def or .src file to create the export list. To enable it, use something like:
\par }\pard \li720\ri130\sa240\widctlpar {\f5 DLLDEF=$O\\mydll.def
\par }\pard \ri130\sa240\widctlpar {\f5 Here's an example of what mydll.src might look like:
\par }\pard \ri130\widctlpar {\f5 ; mydll.src
\par LIBRARY mydll
\par EXPORTS
\par
\par #if defined(_M_IX86)
\par X86Routine
\par #elseif defined(_M_MRX000)
\par MipsRoutine
\par #elseif defined(_M_ALPHA)
\par AlphaRoutine
\par #elseif defined(_M_PPC)
\par PPCRoutine
\par #else
\par #error Unknown platform
\par #endif
\par // Grab some other exports from another file
\par }\pard \ri130\sa240\widctlpar {\f5 #include "master.src"
\par }\pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} DLLENTRY}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} DLLENTRY}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} DLLENTRY;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} DLLENTRY
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify the DLL entry point. {\f5 By default, no entry point is assumed. For example, when you bring over programs that were built in the VC build environment or use the C Run-time, }
you will probably set:
\par \pard \li720\ri130\sa240\widctlpar DLLENTRY=_DllMainCRTStartup
\par \pard \ri130\sa240\widctlpar Look up the documentation on DLL entry point in the Win32 SDK to find the values to use.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} DLLLIBOBJECTS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} DLLLIBOBJECTS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} DLLLIBOBJECTS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
DLLLIBOBJECTS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify extra objects to add to an import library.
\par Usually, when the TARGETTYPE is DYNLINK, the end result is a DLL and an import library. If you want to have different LIB objects for each platform, you
can override this to create different platform-specific DLL LIB objects. DLLLIBOBJECTS enables you to specify additional objects to add to the import library. For example, you{\f5
might have an OLE custom control (with GUIDs used to identify this control) that also exports a non-OLE C interface via an import library. Rather than build two separate libraries (for example, mydll.lib and myuuid.lib), you can list the GUID data object
(s) in DLLLIBOBJECTS. The result is a single library that all your users will link against.
\par }\pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} DLLORDER}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} DLLORDER}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} DLLORDER;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} DLLORDER
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
When you are building a DLL, you can specify an order file that will be passed to the linker. The order file lists the functions and the order in which they should be linked together. By default, the Build Utility passes the name of the DLL as the name of
the order file. For example, if you are building kernel32.dll, the Build Utility expects kernel32.prf as the order file.
\par You can use the DLLORDER macro to specify another name. The Build Utility will use whatever name you give
it. It can be in a different subdirectory, have a different name, or a different an extension. You can set DLLORDER to whatever you want it to be, and you can give it a fully qualified path name.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} DRIVERBASE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} DRIVERBASE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} DRIVERBASE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} DRIVERBASE
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 Similar to DLLBASE and UMBASE, use this macro to specify the base address for a driver. It's generally not necessary to set this because it will be relocated at run time anyway.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} EXEPROFILEINPUT}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} EXEPROFILEINPUT}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} EXEPROFILEINPUT;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
EXEPROFILEINPUT
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 This macro has been changed and is now exactly the same as {\uldb\cf11 NTPROFILEINPUT. }{\v NTPROFILEINPUT}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} FREEBUILD}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} FREEBUILD}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} FREEBUILD}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} FREEBUILD
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify whether your build is checked (debug) or free (retail). You can say, \ldblquote If $FREEBUILD, do things for a retail build.\rdblquote
Maybe you want to set a different set of flags or put it in a different place or compile a different way from a checked (or debug) build.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} GPSIZE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} GPSIZE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} GPSIZE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} GPSIZE
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Specify a value for this macro in your sources file to control the GPSIZE switch to the linker. The GPSIZE is an optimization used on RISC platforms (on MIPS and PowerPC only). The value used for Windows\~
NT is 32.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} HALBASE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} HALBASE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} HALBASE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} HALBASE
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 Similar to {\ul\cf11 DLLBASE}{\v DLLBASE} and {\ul\cf11 UMBASE, }{\v UMBASE}
use this macro to specify the base address for a HAL. It's generally not necessary to set this because it will be relocated at run time anyway.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} IDL_RULES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} IDL_RULES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} IDL_RULES;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} IDL_RULES
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 This macro is only used for Cairo and OLE builds.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} IDL_TYPE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} IDL_TYPE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} IDL_TYPE;Macros;IDL Files}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} IDL_TYPE
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 When you specify an IDL file in your sources rule, you have to specify whether this is an OLE IDL or an RPC IDL because their syntax differs. Based on the syntax, the Build Utility passes different c
ommands to MIDL. The default for IDL_TYPE is OLE. Both of the following commands specify OLE:
\par \pard \li720\ri130\sa240\widctlpar IDL-TYPE=" "\line IDL_TYPE=ole
\par \pard \ri130\sa240\widctlpar Otherwise, specify RPC:
\par \pard \li720\ri130\sa240\widctlpar IDL_TYPE=rpc
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} INCLUDES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} INCLUDES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} INCLUDES;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} INCLUDES
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
Use this macro in your sources file to indicate to the Build Utility where to find the headers that you are including in your build. Specify a list of the paths to be searched for include files during compilation. Separate the entries in this list with a
semicolon. Path names can be absolute or relative, for example:
\par \pard \li720\ri130\sa240\widctlpar INCLUDES=bunny;inc
\par INCLUDES=.\\
\par INCLUDES=.\\inc
\par \pard \ri130\sa240\widctlpar
The INCLUDES macro is read by the Build Utility. It looks at the INCLUDES variable that you specify in your sources file to figure out where to find the header files that you are including in your source code so it can build the dependency tree.
\par You will usually use the INCLUDES macro in your sources file to indicate to the Build Utility where to find the headers that you are including in your build. But there are times when some header files may not exist. Maybe they are built
as part of the build process. Specify those header files in {\uldb\cf11 USER_INCLUDES}{\v USER_INCLUDES}.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} LANGUAGE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} LANGUAGE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} LANGUAGE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} LANGUAGE
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20
Use this macro to specify the language when you set up dependencies so that you can include country-specific parts in your build. If you are building a product for the USA, you may want to include a USA icon, but if you are building for Korea, you would w
ant to use a Korean one. \line \line For example, the Exchange team used this macro because their directory tree was set up so that \\LANG\\LANGUAGE\\USA\\mainscree
n.bmp was used for their main splash screen. So they could just override LANGUAGE to build their product for Korea, Japan or any other country. They set LANGUAGE to something that was unique for them: KOR for Korean, JPN for Japan and GER for German. But
there is no limitation on what this can be so long as it makes sense in your build environment.\line \line The default is LANGUAGE=USA.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} LINKER_FLAGS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} LINKER_FLAGS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} LINKER_FLAGS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} LINKER_FLAGS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use the LINKER_FLAGS macro to override any default linker switch that you want to pass to the linker. Type l
ink-? to view a list of all the linker switches. This macro just gives you a way to pass in flags that you cannot pass in another way.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} LINKER_NOREF}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} LINKER_NOREF}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} LINKER_NOREF;Macros;OPTICAL_AND_REF}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}
} LINKER_NOREF
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
Use this macro to turn off switches to the linker. The Build Utility turns some switches on, by default. One of them is the OPTICAL_AND_REF switch, which says, "Throw out everything that's not referenced in this module." This is the right thing to do if y
ou want small modules, but if you've got some debug routines in there that you want to call from the
debugger, it's kind of annoying to have them all thrown away on you. To avoid this, set LINKER_NOREF in your environment, rebuild your product, load it up in the debugger, and then run these functions that are only used in the debug scenario.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} LINKLIBS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} LINKLIBS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} LINKLIBS;Macros;PERFLIBS;TARGETLIBS}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
LINKLIBS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use the LINKLIBS macro to specify libraries that you need to link against. LINKLIBS enables you to specify a macro called PERFLIBS, which are extra libraries you use for a performance case.
\par Example: The Windows\~NT Performance Lab people do that when they build the system to generate the BBT ordering files. They set PERFLIBS equal to some extra libraries that they want linked in to get some instrumentation stuff.
\par The only difference between TARGETLIBS and LINKLIBS is the ordering on the command line. LINKLIBS usually gets passed first; TARGETLIBS gets passed second. If you order them in your TARGETLIBS macro correctly, that shouldn't be a problem EXCEPT when you a
re building a DLL. When you are building a DLL, you may have some objects that you've buil
t, but you also have some other libraries that you want to export some features from. Maybe you go to subdirectory one and compile a number of objects into a library. In subdirectory two, you compile some more into a library. In subdirectory three, you ac
tually build the DLL, but it exports functions that are defined in library one or library two. So put those libraries in your LINKLIBS macro.
\par {\pntext\tab}\pard\plain \s17\sb50\widctlpar\noline\pvpara\phpg\posy0\absw540\dxfrtext180\dfrmtxtx180\dfrmtxty0{\*\pn \pnlvlbody\pnstart1\pnhang}\hyphpar0 \f4\fs20\kerning20 {\pard\plain
\s17\sb50\widctlpar\noline\pvpara\phpg\posy0\absw540\dxfrtext180\dfrmtxtx180\dfrmtxty0{\*\pn \pnlvlbody\pnstart1\pnhang}\hyphpar0 \f4\fs20\kerning20 {\object\objlink\rsltmerge\rsltbmp\objw0\objh0{\*\objclass }{\*\objdata 010500000100000010000000576f72642e446f63756d656e742e360021000000433a5c47554944455c5052494e545c444f435c4d5350524553535c432e414d5300080000004d414561727438000000000000000000
020000000105000000000000}{\result {{\pict\wmetafile8\picw846\pich846\picwgoal480\pichgoal480 \picbmp\picbpp4
010009000003220800000400d903000000001400000026060f001e00ffffffff040014000000576f72640e004d6963726f736f667420576f7264050000000b0200000000050000000c02640064000d000000fb020000000000000000000000000000000000010044040000002d0100000400000002010100040000002d0100
0015000000fb02d6ff0000000000009001000000000400001254696d6573204e657720526f6d616e000000040000002d01010005000000090200000000040000000201010004000000020101000400000002010100030000001e0007000000160465006500000000000400000002010100040000002d010100030000001e00
0700000016046400640000000000030000001e000700000016046400640000000000030000001e000700000012046400640064006400050000000c0264006400050000000b0200000000050000000b0200000000050000000c0218001800050000000b0200000000060000002606260002000100050000000b020000000005
0000000c0220002000050000000b020000000005000000090200000000050000000102ffffff00040000000701030042010000430fc600880000002000200000000000200020000000000028000000200000002000000001000400000000000002000000000000000000000000000000000000000000001111110022222200
33333300444444005555550066666600777777008888880099999900aaaaaa00bbbbbb00cccccc00dddddd00eeeeee00ffffff00fffff7777777777777777777777777ffffff777777777777777777777777777fff700000000000000000000000077777f7ffffffffffffffffffffffffc077777fffffffffffffffffffff
fffffc07777fffffffffffffffffffffffffff07777ffffffffffffc00cfffffffffff077f7ffffffffffff0000ffffffffffc077ff7fffffffffff0000ffffffffff077fff7fffffffffffc00cfffffffffc077ffff7fffffffffffffffffffffff077fffff7fffffffffff0ffffffffffc077ffffff7fffffffffc0cffff
fffff077fffffff7fffffffff707ffffffffc077ffffffff7ffffffff000ffffffff077fffffffff7fffffffc000cffffffc077ffffffffff7ffffff70007ffffff077fffffffffff7ffffff00000fffffc077ffffffffffff7fffff00000fffff077fffffffffffff7fffff00000ffffc077ffffffffffffff7ffff00000f
fff077fffffffffffffff7ffff00000fffc077ffffffffffffffff7fffc000cfff077fffffffffffffffff7ffffffffffc077ffffffffffffffffff7fffffffff077fffffffffffffffffff7ffffffffc077ffffffffffffffffffff7fffffff077fffffffffffffffffffff7ffffffc077ffffffffffffffffffffff7ffff
f077fffffffffffffffffffffff7ffffc07fffffffffffffffffffffffff7ffc0ffffffffffffffffffffffffffff777fffffffffffffffff000000026062500d501d301254d5345505320507265616d626c6520302030203234203234203020302033322033320d092f70705f736176652073617665206465660d092f7368
6f7770616765207b7d206465660d093430206469637420626567696e202f70705f636c69702066616c736520646566202f70705f62626f782066616c7365206465660d092f46207b20706f70207d20646566202f53207b7d206465660d092f42207b207b202f70705f647931206578636820646566202f70705f6478312065
786368206465660d09092020202f70705f647932206578636820646566202f70705f647832206578636820646566207d0d090973746f70706564206e6f74207b202f70705f62626f78207472756520646566207d206966207d206465660d092f4342207b207b202f70705f6379206578636820646566202f70705f63782065
786368206465660d0909202020202f70705f636874206578636820646566202f70705f637764206578636820646566207d0d090973746f70706564206e6f74207b202f70705f636c6970207472756520646566207d206966207d206465660d092f70705f627831203020646566202f70705f627931203020646566202f7070
5f62783220323420646566202f70705f627932203234206465660d00060000002606260002000000030000001e0007000000fc020100000000000000040000002d01020008000000fa02000000000000feffff00040000002d0103000400000004010b00070000001b042000200000000000040000002701ffff0600000026
06260002000100d500000026062500a0019e010970705f636c69700d097b2070705f63782070705f6379206d6f7665746f2070705f637764203020726c696e65746f20302070705f63687420726c696e65746f0d09202070705f637764206e6567203020726c696e65746f20636c6970206e657770617468207d2069660d09
70705f62626f78207b0d092f70705f6479322070705f6479322070705f64793120616464206465660d092f70705f6478322070705f6478322070705f64783120616464206465660d092f70705f73782070705f6478322070705f647831207375622070705f6278322070705f6278312073756220646976206465660d092f70
705f73792070705f6479322070705f647931207375622070705f6279312070705f6279322073756220646976206465660d092f70705f74782070705f6478312070705f73782070705f627831206d756c20737562206465660d092f70705f74792070705f6479312070705f73792070705f627932206d756c20737562206465
660d0970705f74782070705f7479207472616e736c6174652070705f73782070705f7379207363616c65207d2069660d656e640dd903000026062500a807a607252150532d41646f62652d312e300d0a2525426f756e64696e67426f783a203020302032342032340d0a25255363616c696e673a203130300d0a2525424954
4d4150494e464f4845414445523a203332203332203420323034380d0a252543726561746f723a20466c6173682028313631353736290d0a2525456e64436f6d6d656e74730d0a3020736574677261790d0a3130206469637420626567696e0d0a63757272656e7473637265656e20706f7020706f70206475702031323020
6c74207b706f70203132307d2069662025206e657720636f64650d0a3435207b20616273206578636820616273203220636f7079206164642031206774207b2031207375620d0a647570206d756c206578636820312073756220647570206d756c20616464203120737562207d207b20647570206d756c2065786368206475
700d0a6d756c206164642031206578636820737562207d206966656c7365207d2073657473637265656e0d0a2f77426d7020313620737472696e67206465660d0a3234203234207363616c650d0a33322033322034205b333220302030203332203020305d0d0a2f6368203120737472696e6720646566202f7262207b2063
757272656e7466696c652063682072656164686578737472696e6720706f7020706f70206e207b2077426d70206c2063680a707574696e74657276616c202f6c206c20312061646420646566207d20726570656174207d20646566202f6e62207b202f6e206e203132372073756220646566206e207b2063757272656e7466
696c650a63682072656164686578737472696e6720706f7020706f702077426d70206c20636820707574696e74657276616c202f6c206c20312061646420646566207d20726570656174207d20646566202f67730a7b202f6c203020646566207b202f6e2063757272656e7466696c6520746f6b656e20706f702064656620
6e20313237206774207b6e627d207b72627d206966656c7365206c2031362065710a7b657869747d206966207d206c6f6f70207d20646566202f72203020646566202f63203020646566207b20632030206571207b202f722063757272656e7466696c6520746f6b656e20706f70206465660a6773207d206966202f632063
2031206164642064656620632072206571207b2f632030206465667d2069662077426d70207d20696d6167650a31203133302046464646463720313220373720313238204646203120313239204646464620313320373720313238203746203120313239204646373020313120303020313330203037373737370a31203132
38204637203132204646203133302043303737373720312031323820374620313220464620313330204643303737372031203132382037462031332046462031323920303737372031203132382037460a35204646203133302046433030434620352046462031323920303737462031203132382037462035204646203133
3020463030303046203420464620313330204643303737462031203132382046370a35204646203133302046303030304620342046462031333020463037374646203120313238204637203520464620313330204643303043462034204646203133302043303737464620312031323920464637460a313120464620313330
203037374646462031203132392046463746203520464620313238203046203420464620313331204643303737464646203120313239204646463720342046462031323920464330430a3420464620313331204630373746464646203120313239204646463720342046462031323920463730372034204646203133312043
3037374646464620312031333520464646463746464646464646463030300a34204646203133312030373746464646462031203134332046464646374646464646464643303030434646464646464330373746464646462031203134332046464646463746464646464637303030374646464646463037374646464646460a
31203134332046464646463746464646464630303030304646464646433037374646464646462031203134332046464646464637464646464630303030304646464646303737464646464646460a31203134332046464646464637464646464630303030304646464643303737464646464646462031203133392046464646
46464637464646463030303030464646463037370a342046462031203133392046464646464646374646464630303030304646464330373720342046462031203420464620313335203746464643303030434646463037374620342046460a3120342046462031323820374620342046462031333020464330373746203420
464620312034204646203132382046372034204646203132392046303737203520464620312034204646203132382046370a342046462031323920433037372035204646203120352046462031333320374646464646464630373746203520464620312035204646203133332037464646464646433037374620352046460a
3120352046462031333220463746464646463037372036204646203120352046462031333220463746464646433037462036204646203120362046462031333020374646433046203720464620310a36204646203132392046373737203820464620656e640a2525456e64496d616765446174610a06000000260626000200
0000160000002606250021001f00254d5345505320547261696c65720d70705f7361766520726573746f72650d00040000002701ffff040000002701ffff040000002701ffff0400000002010100040000002701ffff040000002d01000003000000000050436f6c6f724374726c0000002c00700014000800600200000050
4300ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff}}}}}
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\b\cf6 Caution!} The LINKLIB
S macro requires that the library has to be around in pass one of the build, because the Build Utility builds the import libraries during pass one. You must structure your build in such a manner that the libraries will be guaranteed to exist during pass o
ne. You should never specify an import library in your LINKLIBS macro, mainly because you can get into some real nasty cases where you export something that you've imported from somebody else instead of what you actually had, perhaps with typos or whateve
r.
You may not realize this until suddenly your program starts acting really weird. Stick with the rule that you use TARGETLIBS everywhere. There is TARGETLIBS and There is LINKLIBS; if you use TARGETLIBS for everything, life is good. (To avoid problems whe
n doing multi-processor builds, see {\uldb\cf11 Multi-processor Build Issues}{\v Multi_processor_Build_Issues}.)
\par Use LINKLIBS only for the case that meets the following conditions:
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa240\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}You are building a dynamic link.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}You are exporting something that's defined in some other component library that you also build.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}In your dirs file in the subdirectory above, you have ordered it so that the component libraries are around before you build the dynamic link.
\par \pard \ri130\sa240\widctlpar There is a similar macro called {\uldb\cf11 UMLIBS}{\v UMLIBS} that you can use if you are building UMAPPLs.
\par {\b See Also}\line {\uldb\cf11 TARGETLIBS}{\v TARGETEXT}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MAJORCOMP}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MAJORCOMP}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MAJORCOMP;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MAJORCOMP
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20 Use this major component macro to specify the first part of a filename you are building for use by the MIPS compiler. Use the MINORCOMP macro to specify the minor component filename.
\par For example, when you build the kernel for Windows\~NT, you specify:
\par \pard \li720\ri130\sa240\widctlpar MAJORCOMP=ntos\line MINORCOMP=drivers
\par \pard \ri130\sa240\widctlpar\tx4428\tx8856 You can use this if you have global sources file or a global rules file. You can state:
\par \pard \ri130\sa240\widctlpar \tab If MAJORCOMP={\i something}
\par \pard \ri130\sa240\widctlpar\tx4428\tx8856 Then do something you might do for all your NTOS things, but:
\par \pard \ri130\sa240\widctlpar \tab If MAJORCOMP=somethingelse
\par \pard \ri130\sa240\widctlpar\tx4428\tx8856 Then do something you might do for all your drivers.
\par {\b Note}: This macro is required for MIPS and ALPHA builds.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MAKEDLL}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MAKEDLL}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MAKEDLL;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MAKEDLL
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 The build process is a two-pass build. In the first pass, the Build Utility compiles all th
e source files, and creates import libraries and component libraries. In the second pass, it links everything against those libraries. The default, which directs the Build Utility to make the second pass, is as follows:
\par \pard \li720\ri130\sa240\widctlpar MAKEDLL=1
\par \pard \ri130\sa240\widctlpar\tx2718\tx8856 You typically would not set this for yourself. You might do a test in your makefile to say:
\par \pard \li720\ri130\sa240\widctlpar IF MAKEDLL=1\line {\i do things that you want to do on the second pass of the build}
\par \pard \ri130\sa240\widctlpar\tx2718\tx8856 A more frequent use of this macro is to run nmake from the command line to run the compile and link without having to run build.exe:
\par \pard \li720\ri130\sa240\widctlpar nmake MAKEDLL=1
\par \pard \ri130\sa240\widctlpar\tx2718\tx8856 The Build Utility will then do the compile and the link all in one step without having to run build.exe. This works because all that build.exe does is figure out dependencies and call nmake. This works when:
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa240\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}You know the dependencies.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}The source file has changed and you do not care about the header file dependency generation.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}You are in a leaf node subdirectory.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MASTER_VERSION_FILE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20
{\cs16\super $} MASTER_VERSION_FILE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MASTER_VERSION_FILE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
MASTER_VERSION_FILE
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 Every image has a version resource on it. When they release a built from the Windows\~
NT Build Lab, they increase the master version number. Anything they link or build after that will automatically get a new version resource attached to it with the correct build number.
\par You can go into the File Manager or Windows Explorer or you can run filever.exe to view properties and see which version resource setup uses when it copies that image onto a new system. The system checks whether or not the version resource is newer than t
he one already on the system. If it is, it is copied onto the system, otherwise it is not.
\par There is a master version file for Windows\~NT, from which all version resources are built. The Master Version File for Windows\~NT is called ntverp and it's located in \\\\public\\sdk\\
inc. You can either use ntverp or use the MASTER_VERSION_FILE macro to specify a different master version file. You do not have to have \\\\public\\sdk\\inc\\
ntverp.h. The VC team uses a different master version file because they have a different version scheme than the Windows\~NT group does.
\par If you look on the very last line of {\uldb\cf11 makefile.def}{\v makefile_def}
, you will see the one place where MASTER_VERSION_FILE is used as a dependency for the resources. The TARGET_DIRECTORY macro is always dependent on the master version file to determine what the name of the resource is for your image.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MFC_FLAGS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MFC_FLAGS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MFC_FLAGS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MFC_FLAGS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
If you have extra command line options you want to pass to the compiler, you can put them in MFC_FLAGS. They will only affect programs that use MFC. That would be useful if you had a global project. You could set
MFC_FLAGS equal to some macro name or compiler #define that you want to add. There are other ways to handle that, however, for example by using the {\uldb\cf11 C_DEFINES}{\v CDEFINES} macro.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MFC_INC_PATH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MFC_INC_PATH}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MFC_INC_PATH;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MFC_INC_PATH
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify {\f5 the path to the MFC headers. The default is:
\par }\pard \li720\ri130\sa240\widctlpar {\f5 $(}{\ul\cf11 BASEDIR}{\v BASEDIR}{\f5 )\\public\\sdk\\inc\\mfc$(}{\ul\cf11 MFC_VER}{\v MFC_VER}{\f5 )
\par }\pard \ri130\sa240\widctlpar Set this macro if you don't use the Windows\~NT {\uldb\cf11 directory structure. }{\v Directory_Structure}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MFC_INCLUDES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MFC_INCLUDES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MFC_INCLUDES;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MFC_INCLUDES
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 If you have your own MFC include files, use this macro to specify where you put your MFC headers on your system. This is another macro you might use if you choose not to follow the same {\uldb\cf11
directory structure. }{\v Directory_Structure} as{\v }Windows NT uses.
\par For example, the MSN group has their own MFC libraries. They do not use the ones from Windows\~NT. They do not use the public directory. So, they specify their MFC_INCLUDES to be wherever they put their MFC headers on their systems.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MFC_LIB_PATH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MFC_LIB_PATH}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MFC_LIB_PATH;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MFC_LIB_PATH
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use this macro to specify the path to the MFC libraries. The default is $(}{\ul\cf11 BASEDIR}{\v BASEDIR}{\f5 )\\public\\sdk\\lib\\*
\par }Set this macro if you don't use the Windows\~NT {\uldb\cf11 directory structure. }{\v Directory_Structure}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MFC_LIBS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MFC_LIBS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MFC_LIBS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MFC_LIBS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to provide explicit MFC library names and override the default names that the Build Utility uses. This is another macro you might use if you choose not to follow the same {\uldb\cf11
directory structure. }{\v Directory_Structure} as Windows\~NT. For example, the MSN group has their own MFC libraries. They do not use the ones from Windows\~NT. They do not use the public directory.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MFC_VER}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MFC_VER}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MFC_VER;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MFC_VER
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use this macro to specify the version of MFC to build with. By default, it is set to 40. Valid values must be 40 or greater. To use MFC 3.x, define }{\ul\cf11 USE_MFC30}{\f5\ul\cf11 . }{\v\f5 USE_MFC30}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MIDL_OPTIMIZATION}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MIDL_OPTIMIZATION}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MIDL_OPTIMIZATION;Macros;IDL Files}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +}
MACROS:0}} MIDL_OPTIMIZATION
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to override the default optimization that is passed to the MIDL compiler. The default is OI2.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MIDL_UUIDDIR}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MIDL_UUIDDIR}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MIDL_UUIDDIR;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MIDL_UUIDDIR
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify where the {\ul\cf11 GUID}{\v GUIDs} file goes when you generate an OLE IDL file (UUIDs and GUIDs are the same thing). By default everything built in pass zero goes to
wherever you set the TARGETPATH subdirectory. Use this macro to override that.
\par To create the GUIDs in the current subdirectory, set MIDL_UUIDDIR to be dot:
\par \pard \li720\ri130\sa240\widctlpar MIDL_UUIDDIR=.
\par \pard \ri130\sa240\widctlpar It does not matter where you put the GUIDs so long as whatever you set here, you set your #includes to get them from here. Otherwise the subsequent tools used by the Build Utility will not be able to find the GUIDs.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MINORCOMP}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MINORCOMP}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MINORCOMPMacros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MINORCOMP
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20 Use this macro to specify the second part of the filename constructed for use by the MIPS compiler. This is required only for MIPS and ALPHA builds.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MISCFILES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MISCFILES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MISCFILES;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} MISCFILES
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use the MISCFILES macro to list items that you want to put into the appropriate installation point when the Build Utility runs {\uldb\cf11 binplace.exe. }{\v binplace_exe}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MSC_OPTIMIZATION}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MSC_OPTIMIZATION}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MSC_OPTIMIZATION;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
MSC_OPTIMIZATION
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
Use this macro to override the default optimization the Build Utility uses on the compiler. By default, everything is optimized. If you want to turn off optimization to step through your code, you can set MSC_OPTIMIZATION to whatever is appropriate for yo
ur compiler. Most people in the Windows\~
NT group use /Odi, which is unoptimize everything, for the code they want to hand debug. All of these flags also have platform-specific variants. If you know your code works great on all platforms except PowerPC, you can set the
MSC_WARNING_LEVEL to /W3/WX and then you can say PPC_WARNING_LEVEL=/W1. The same is true for optimization, you can specify PPC optimization or MIPS optimization or Alpha optimization or i386 optimization to override for each specific platform. If you do n
ot specify any of those, MSC optimization will be the default. If you do not specify MSC_OPTIMIZATION, the default is:
\par \pard \li720\ri130\sa240\widctlpar Oxs - Fully optimize, size overrules speed.
\par \pard \ri130\sa240\widctlpar {\f5 While performance testing Windows\~
NT, it was determined that the overhead from handling page faults and cache misses usually outweighs any optimization the compiler might make that results in larger code. Therefore /Oxs is used by default. It directs the
compiler, "when presented with an optimization choice that is either bigger/faster or smaller/s
lower, choose the smaller case". This is also the reason why /G5 isn't used when compiling for X86. /G5 directs the compiler to break complex instructions into several more primitive instructions that the Pentium can run faster. Again, larger code typica
lly means more page faults and the net result is slower performance.
\par If, after testing for yourself, you find that this is not the case for your code, you can always override the generic MSC_OPTIMIZATION macro with platform-specific macros. They are:
\par MSC_OPTIMIZATION (all platforms)\line ALPHA_OPTIMIZATION (Alpha)\line 386_OPTIMIZATION (Intel)\line MIPS_OPTIMIZATION (Mips)\line PPC_OPTIMIZATION (Power PC)
\par }{\b See Also}\line {\uldb\cf11 MSC_WARNING_LEVEL}{\v MSC_WARNING_LEVEL}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} MSC_WARNING_LEVEL}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} MSC_WARNING_LEVEL}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} MSC_WARNING_LEVEL;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
MSC_WARNING_LEVEL
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
Use this macro to set the warning level to use on the compiler. The default is W3. After you have your code building without errors, you probably want to change MSC_WARNING_LEVEL to /W3/WX, which always makes any warnings an error.
\par MSC_WARNING_LEVEL is generic to all platforms. Platform-specific variants include:
\par \pard \li720\ri130\widctlpar i386_WARNING_LEVEL
\par MIPS_WARNING_LEVEL
\par ALPHA_WARNING_LEVEL
\par \pard \li720\ri130\sa240\widctlpar PPC_WARNING_LEVEL
\par \pard \ri130\sa240\widctlpar {\b See Also}\line {\uldb\cf11 MSC_OPTIMIZATION}{\v MSC_OPTIMIZATION}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NOLINK}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} NOLINK}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NOLINK;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NOLINK
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 {\f5 The NOLINK and MAKEDLL macros are primarily used in the master makefile (}{\f5\uldb\cf11 makefile.def}{\v\f5 makefile_def}{\f5 ) to indicate which rules to enable or disable }
when the Build Utility goes through two tools. {\f5 NOLINK=1 indicates a link isn't supposed to occur (most likely because this is pass one and build cannot guarantee the libraries needed are built yet). MAKEDLL=1 indicates a link
should occur and is used in pass two after all the libraries are built. If you run a one-pass build (by specifying -z on the command line to build), only MAKEDLL=1 is specified.}
\par You can test for this macro in your makefile. You can say, if NOLINK=1, then you know you are in pass one; if MAKEDLL=1, then you know you are in pass two because in the first pass you do not want to link and in the second pass you just want to make the D
LL.
\par {\b See Also}\line {\uldb\cf11 MAKEDLL}{\v MAKEDLL}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NOMFCPDB}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NOMFCPDB}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NOMFCPDB;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NOMFCPDB
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 By default whenever you are buil
ding an MFC program, the Build Utility generates the symbolic debugging information in a PDB file (a program database). MFC has so much stuff, the Build Utility puts it in the PDB. If you define NOMFCPDB, it won't.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NOT_LEAN_AND_MEAN}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NOT_LEAN_AND_MEAN}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NOT_LEAN_AND_MEAN;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
NOT_LEAN_AND_MEAN
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The windows.h file checks to see if WIN32_LEAN_AND_MEAN is defined. If it isn't, it includes every header file; if it is, it only includes the Windows headers. All of Windows\~NT builds that way.
\par So if you include windows.h, you get just Windows. If you want OLE and RPC and all the net stuff, you include those headers as you need them.
\par The SDK ships with this undefined. If you've got code that you brought over from the SDK or if you've built it in the VC build environment, you probably included windows.h and got all these things for free without realizing that it just made your build so
much slower. When you are bringing code over from that environment, define the following in your sources file:
\par \pard \li720\ri130\sa240\widctlpar NOT_LEAN_AND_MEAN=1
\par \pard \ri130\sa240\widctlpar Then it will all continue to work the same way it worked in your old build environment.
\par The right thing to do, of course, would be to go through and get rid of unneeded headers, but sometimes that's more work than is necessary.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NO_NTDLL}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NO_NTDLL}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NO_NTDLL;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NO_NTDLL
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use this macro to indicate that NTDLL.LIB should not be automatically added to the library list.
\par }\pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NT_INST}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NT_INST}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NT_INST;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NT_INST
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 This macro is used internally by the Windows\~NT build group to specify instrumentation.{\f5 Some components for Windows\~
NT use it to enable some special instrumentation when building. Whatever you set this value to will be passed to the compiler as is. For example:
\par }\pard \li720\ri130\sa240\widctlpar {\f5 NT_INST=1
\par }\pard \ri130\sa240\widctlpar {\f5 Results in:
\par }\pard \li720\ri130\sa240\widctlpar {\f5 /DNT_INST=1
\par }\pard \ri130\sa240\widctlpar {\f5 passed to the compiler. The default is /DNT_INST=0.
\par }\pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NT_UP}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} NT_UP}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NT_UP;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NT_UP
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to indicate whether your driver will run on a uniprocessor machine or multiprocessor machine. The default is uniprocessor, as follows:
\par \pard \li720\ri130\sa240\widctlpar NT_UP=1
\par \pard \ri130\sa240\widctlpar To specify multiprocessor, set\rdblquote
\par \pard \li720\ri130\sa240\widctlpar NT_UP=0
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NTDBGFILES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NTDBGFILES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NTDBGFILES;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NTDBGFILES
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to control whether symbols should be stripped from final image files when the Binplace Utility is run by the Build Utility.
\par Binplace.exe is the utility that the Build Utility uses to create the final installation format for an image. When you build a CD, the Binplace Utility directs which images go in the root of the CD, which images go in different subdirectories, which .inf
files need to be in certain subdirectories with other files, and which symbols need to be split off.
\par As part of this process, the Build Utility enables you to split off the symbols that are used for debugging. This is because in the Windows\~NT build e
nvironment, everything built has symbols. But the final product is not shipped with symbols. Instead, the Build Utility directs binplace.exe to strip the symbols from all the images and put them in a symbols subdirectory. Then the Windows\~
NT group ships the binary subdirectory. The symbols subdirectory goes out separately on the CD, the SDK, or the DDK.
\par What determines whether or not the Build Utility should split off symbols is based on whether NTDBGFILES is set.
\par You usually do this in your environment, not in your sources file.
\par You should do this on your build machine rather than on all of your developers' machines because they probably want the symbols there. It\rquote
s easier to track. The debugger does not have to do all this hand waving to find the debug symbolic files that match the images themselves.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NTDEBUG}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NTDEBUG}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NTDEBUG;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NTDEBUG
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use this macro to specify what type of symbolic information you want when building (and therefore which debugger you'll be using). It is rarely used in the sources file, instead it should
be set in the environment before building the project.
\par }To indicate a checked (or debug) build, specify:
\par \pard \li720\ri130\sa240\widctlpar NTDEBUG=ntsd
\par \pard \ri130\sa240\widctlpar To indicate a free (or retail) build, specify:
\par \pard \li720\ri130\sa240\widctlpar NTDEBUG= ntsdnodbg
\par \pard \ri130\sa240\widctlpar
The only difference between the two of them is that specifying ntsd causes the Build Utility to define DBG=1 and ntsdnodbg causes it to define DBG=0, so the Build Utility can direct the code to do or not do something based on the value of DBG. Some groups
, such as the VC group, define _DEBUG for their debug version and NDEBUG for their non-debug version.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NTDEBUGTYPE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NTDEBUGTYPE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NTDEBUGTYPE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NTDEBUGTYPE
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5
The Blue text on the NTDEBUGTYPE page - Yes, ntsd does specify coff information... and it does make sense... :-) The paragraph at the bottom can be removed. Instead, for NTDEBUGTYPE=windbg, we should add: "specifies Codeview information in the final ima
ge. If you want to generate a program database (.PDB file) for the CV info, you'll need to set }{\ul\cf11 USE_PDB}{\v USE_PDB}{\f5 =1 also.
\par }Use this macro to specify the method of linking, which symbols are used.
\par \pard \li720\ri130\sa240\widctlpar NTDEBUGTYPE
=ntsd The ntsd information is only useful for debugging with NTSD, which is our character-mode debugger that ships with the system and Kernel Debugger (KD). The other debuggers understand CodeView, so most people want to stick with windbg for everything b
ecause every debugger understands it.
\par NTDEBUGTYPE=windbg (specifies CodeView information {\f5 in the final image. If you want to generate a program database (.pdb file) for the CV information, you'll need to set }USE_PDB{\f5 =1 also.})
\par NTDEBUGTYPE=coff
\par NTDEBUGTYPE=both (Specifies both CodeView and ntsd information.)
\par \pard \ri130\sa240\widctlpar
Any of these settings used for NTDEBUGTYPE will compile with C7, which means put the CodeView information in every object. There is a C9 compiler from the VC group and a C10, C11, which enables you to put all the type information in a program database (PD
B). If you want to do that, you have to say USE_PDB=1 in your sources file or in your environment. This is not recommended, however.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NTKEEPRESOURCETMPFILES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} NTKEEPRESOURCETMPFILES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NTKEEPRESOURCETMPFILES;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super +} MACROS:0}} NTKEEPRESOURCETMPFILES
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 In the Windows\~NT build, the RC Compiler generates a binary file, but it cannot be linked into a final image because it hasn't been converted to the right format. When you do a Windows\~
NT build, the Build Utility converts it as soon as the RC Compiler creates it. In most other build processes,
they convert it when they link it in. This means that, in our case if you build it once, it can be linked as many times as you want and it will never need to be reconverted. In their environment, every time you link it, you reconvert it. But in their envi
ronment, after you run it through our C, you can still bring it up in other tools that understand the RC output. In the Windows\~NT environment, it's been converted and it's not in the RC output any more. So, if it\rquote
s important to you that it stay in the RC output and not be converted, you have to set:
\par \pard \li720\ri130\sa240\widctlpar NTKEEPRESOURCETMPFILES=1
\par \pard \ri130\sa240\widctlpar All that says is "Do not do the conversion after you build it. Hold off on converting it until you go to link it." Every time you link it, it will convert it. This makes your links a litt
le slower, but it means you can use other tools, such as the Visual C Resource Editor, to modify it before you link it.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NTNOFUZZYLOOKUP}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NTNOFUZZYLOOKUP}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NTNOFUZZYLOOKUP;Macros;Fuzzy Matching}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +}
MACROS:0}} NTNOFUZZYLOOKUP
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 This macro was added to help bring other projects into the build environment for Windows\~NT.
\par By default, in the method used by Windows\~
NT, you have a .def file. You may have a DLL that you want to build. That DLL is going to export functions a, b, and c. But on x86, it may be _bunny@8; on MIPS, it may be bunny; on Alpha, it may be _bunny. So they all have unique
names, but you do not want to have a different .def file for each platform because then it becomes a maintenance nightmare. What you instead want to do is state in your .def file, "Export function a. Exporting function b." Then call the linker to say, "He
re is the .def file and here are all the .obj files. Go figure out what the right name is supposed to be." That's called fuzzy matching.
\par Some people have set up their build environments so that they specify the fully declared name in the .def file. So instead of saying \ldblquote Export function\~a\rdblquote or \ldblquote Export function\~b,\rdblquote
they say export_functionb@8. If they do that, they already have the declared name in there. They've just made it so that every time they do a new platform, they've got to go through and edit their
.def files and add in the new funky names. If you are bringing a project over that does that, you can prevent the extra step of passing in all the objects and directing the linker to figure out the right names by stating the following in your sources file
:
\par \pard \li720\ri130\sa240\widctlpar NTNOFUZZYLOOKUP=1
\par \pard \ri130\sa240\widctlpar
Once you specify a declared name and you ship a product with the declared name in it, you've got to use that from now on. It makes it very hard, but sometimes it's too late. You cannot fix it. That's when you specify NTNOFUZZYLOOKUP.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NTNOPCH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NTNOPCH}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NTNOPCH;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NTNOPCH
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to turn off precompiled headers for a single source file.
\par If you have precompiled headers on a subdirectory, the Build Utility expects you to build that subdirectory and then make subsequent changes as you go along. Whenever yo
u change one of the source files, you need to rebuild that file. The Build Utility will detect that you used precompiled headers there, and will compile that single source file without them. That enables you to build everything, then change a definition i
n a header file (for example, a #define {\i something} to {\i something else}
). Then you change the source file to use that new definition. You really do not want to regenerate the precompiled header and rebuild everything else. You just want to rebuild that one sour
ce file. But you do not want to use the old precompiled header because that information is not valid any more. So in that case, the Build Utility does a non-precompiled header build. For that one source file, it turns off precompiled headers. That makes i
t reread all the headers, and all the type information is then correct. That's only going to happen when you do a build with a -Z or -z switch when you are directing it to not scan dependencies and therefore do not regenerate the precompiled header.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NTPROFILEINPUT}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NTPROFILEINPUT}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NTPROFILEINPUT;Macros;Profile}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
NTPROFILEINPUT
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
The linker lets you specify a profile, which is a list of all the functions or symbols in your image and the order you want them emitted in the final image. You can optimize page usage by listing the functions in the order they should be emitted in the fi
nal image. You can automate this list generation with the Working Set Tuner (wst.exe).
\par To use the profile, specify the following in your sources file::
\par \pard \li720\ri130\sa240\widctlpar NTPROFILEINPUT=1
\par \pard \ri130\sa240\widctlpar If you set that, the Build Utility expects to find the name of the thi
ng you are building with a .prf filename extension in the current subdirectory. If you are building kernel 32, it expects to find kernel32.prf in the current subdirectory. The Build Utility will use that to order the final image that it builds.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NTTARGETFILE0}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NTTARGETFILE0}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NTTARGETFILE0}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NTTARGETFILE0
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 You can define NTTARGETFILE0 and/or NTTARGETFILES 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 to specify additional targets and dependencies that do not fit the general case covered by makefile.def.
\par \pard \li720\ri130\sa240\widctlpar NTTARGETFILE0=
\par \pard \ri130\sa240\widctlpar The fact that NTTARGETFILE0 exists, even if it is defined to nothing, means that the Build Utility should open makefile.inc in the same subdirectory as the sources file. If you set NTTARGETFILE0, what you are saying is,
\ldblquote Not only should you include makefile.inc, but you should also build the thing that the macro defines.\rdblquote So if:
\par \pard \li720\ri130\sa240\widctlpar NTTARGETFILE0=myfile.a
\par \pard \ri130\sa240\widctlpar Then, as part of pass zero, the Build Utility will build myfile.a.
\par If you do not set NTTARGETFILE0, the Build Utility will go down to the specified subdirectory on pass zero, include {\uldb\cf11 makefile.inc}{\v mk_inc}, and do any default rules that it contains.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NTTARGTFILE1}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NTTARGTFILE1}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NTTARGTFILE1}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NTTARGETFILE1
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 NTTARGETFILE1 is exactly like {\uldb\cf11 NTTARGETFILE0, }{\v NTTARGETFILE0} except that it happens later in the build process. NTTARGETFILE0 happens on pass zero; NTTARGETFILE1 happens
on pass two. Both of these macros cause the Build Utility to change directories to a specified subdirectory and run nmake on pass zero or pass two where it might not ordinarily do that.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} NT_TARGETFILES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} NT_TARGETFILES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} NT_TARGETFILES}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} NTTARGETFILES
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 If you have unique rules in your subdirectory, you can set up this macro to key the build process to say that along with your sources file in the subdirectory, you also have a {\uldb\cf11 makefile.inc}{\v
mk_inc}, which can include extra dependencies, extra command line rules, anything you want to build.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} O}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $} O}
} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} O;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} O
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 Use this macro to specify the final objects subdirectory. Define this macro in your sources file or in {\uldb\cf11 makefile.inc}{\v mk_inc}
to be certain something goes into the object subdirectory. The benefit of using $(O) is that any files that you have built and placed in the objects subdirectory will be deleted on the next clean build. This guarantees that no collisions will occur betwe
en two builds running on the same machine at the same time. They will never override each other's files if you follow the convention that everything you build goes in $(O).
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} OAK_INC_PATH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} OAK_INC_PATH }} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} OAK_INC_PATH }} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} OAK_INC_PATH
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify {\f5 the path to the OEM Adapter Kit headers. The default is:
\par }\pard \li720\ri130\sa240\widctlpar {\f5 $(}{\ul\cf11 BASEDIR}{\v BASEDIR})\\{\f5 public\\oak\\inc
\par }\pard \ri130\sa240\widctlpar Set this macro if you don't use the Windows\~NT {\uldb\cf11 directory structure. }{\v Directory_Structure}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} PASS0_CLIENTDIR}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} PASS0_CLIENTDIR}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} PASS0_CLIENTDIR;Macros;IDL Files}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}
} PASS0_CLIENTDIR
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 PASS0_CLIENTDIR, PASS0_HEADERDIR, and PASS0_SERVERDIR are used when you have a SOURCES macro in your sources file. That macro can contain the following types of files:
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}C
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}C++
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}RC
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}MC
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa240\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}IDL
\par \pard \ri130\sa240\widctlpar Use the PASS0_CLIENTDIR, PASS0_HEADERDIR, and PASS0_SERVERDIR macros to specify where to put the output from MC and MIDL.
\par When you have IDLs in your SOURCES macro and run MIDL, you generate a server part, a client part, a header, and a default source. You specify where you want to put that output in PASS0_SERVERDIR and PASS0_CLIENTDIR.
\par When you run MC, you create a header and a source file. You put that in PASS0_HEADERDIR and PASS0_SOURCEDIR to specify where you want to put that output.
\par When you are building a MIDL stub, it's RPC, so you have what runs on the client side and what runs on the server side. There are stub programs that communicate in RPC to each other. You can override those by default.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} PASS0_HEADERDIR}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} PASS0_HEADERDIR}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} PASS0_HEADERDIR;Macros;Headers}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
PASS0_HEADERDIR
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify where the headers generated by MC and MIDL go. By default everything built in pass zero goes to wherever you set the TARGETPATH subdirectory. Use this macro to override that.
\par To create the headers in the current subdirectory, set PASS0_HEADERDIR to be dot:
\par \pard \li720\ri130\sa240\widctlpar PASS0_HEADERDIR=.
\par \pard \ri130\sa240\widctlpar It does not matter where you put the headers so long as whatever you set here, you set your #includes to get them from here. Otherwise the subsequent tools used by the Build Utility will not be able to find the headers.
\par {\b See Also}\line {\uldb\cf11 PASSO_CLIENTDIR}{\v PASS0_CLIENTDIR}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} PASS0_SERVERDIR}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} PASS0_SERVERDIR}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} PASS0_SERVERDIR;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
PASS0_SERVERDIR
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify where the server part generated by MIDL goes. By default everything built in pass zero goes to wherever you set the TARGETPATH subdirectory. Use this macro to override that.
\par To create the server part in the current subdirectory, set PASS0_SERVERDIR to be dot:
\par \pard \li720\ri130\sa240\widctlpar PASS0_SERVERDIR=.
\par \pard \ri130\sa240\widctlpar
It does not matter where you put the server part so long as whatever you set here, you set your #includes to get them from here. Otherwise the subsequent tools used by the Build Utility will not be able to find the server part.
\par {\b See Also}\line {\uldb\cf11 TARGETPATH}{\v TARGETPATH}\line {\uldb\cf11 PASSO_CLIENTDIR}{\v PASS0_CLIENTDIR}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} PASS0_SOURCEDIR}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} PASS0_SOURCEDIR}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} PASS0_SOURCEDIR;Macros;IDL Files}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}
} PASS0_SOURCEDIR
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify where the source code generated by MIDL and maketype.lib file goes. By default everything built in pass zero goes to w
herever you set the TARGETPATH subdirectory. Use this macro to override that.
\par To create the source code generated by MIDL and maketype.lib in the current subdirectory, set PASS0_SOURCEDIR to be dot:
\par \pard \li720\ri130\sa240\widctlpar PASS0_SOURCEDIR=.
\par \pard \ri130\sa240\widctlpar
It does not matter where you put the source code generated by MIDL and maketype.lib, so long as whatever you set here, you also set your #includes to get them from here. Otherwise the subsequent tools used by the Build Utility will not be able to find the
source code generated by MIDL and maketype.lib file.
\par {\b See Also}\line {\uldb\cf11 TARGETPATH}{\v TARGETPATH}\line {\uldb\cf11 PASSO_CLIENTDIR}{\v PASS0_CLIENTDIR}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} PNP_POWER}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} PNP_POWER}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} PNP_POWER;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} PNP_POWER
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 This macro is used internally by the Windows\~
NT build group to specify plug-and-play power definition. This enables you to build a driver that understands plug and play. If it's not set, the Build Utility does not define a value; if it is, the Build Utility defines
\par \pard \li720\ri130\sa240\widctlpar PNP_POWER=1
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} PRECOMPILED_CXX}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} PRECOMPILED_CXX}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} PRECOMPILED_CXX;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
PRECOMPILED_CXX
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to indicate whether the precompiled header you are building will be used with C files or with C++ fi
les. The default is to use precompiled headers with C. Therefore, to use the precompiled header with C, do not set PRECOMPILED_CXX at all.
\par To use the precompiled header with C++ files, specify
\par \pard \fi720\ri130\sa240\widctlpar PRECOMPILED_CXX=1
\par \pard \ri130\sa240\widctlpar {\b See Also}\line {\uldb\cf11 Precompiled Headers}{\v Precompiled_Headers}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} PRECOMPILED_INCLUDE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20
{\cs16\super $} PRECOMPILED_INCLUDE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} PRECOMPILED_INCLUDE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
PRECOMPILED_INCLUDE
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify the name of the precompiled header. For example, if you have precompiled headers that are a.c, b.c, and c.c as your source files, and all of them include precomp.h, specify:
\par \tab PRECOMPILED_INCLUDE=precomp.h
\par If you omit this, you will not be able to have precompiled headers. PRECOMPILED_INCLUDE is what triggers the build process to understand that you do have precompiled headers.
\par {\b See Also}\line {\uldb\cf11 Precompiled Headers}{\v Precompiled_Headers}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} PRECOMPILED_OBJ}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} PRECOMPILED_OBJ}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} PRECOMPILED_OBJ;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
PRECOMPILED_OBJ
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
By default, the Build Utility takes the precompiled header with the precompiled #include setting that you specify, for example precomp.h. Out of that, it creates precomp.obj for the precompiled object and precomp.pch for the precompiled target. You can ov
erride those names by setting the PRECOMPILED_OBJ and PRECOMPILED_TARGET macros.
\par {\b See Also}\line {\uldb\cf11 Precompiled Headers}{\v Precompiled_Headers}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} PRECOMPILED_TARGET}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} PRECOMPILED_TARGET}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} PRECOMPILED_TARGET;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
PRECOMPILED_TARGET
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
By default, the Build Utility takes the precompiled header with the precompiled #include setting that you specify, for example precomp.h. Out of that, it creates precomp.obj for the precompiled object and precomp.pch for the precompiled target. You can ov
erride those names by setting the{\ul\cf11 PRECOMPILED_OBJ }{\v PRECOMPILED_OBJ} and{\ul\cf11 PRECOMPILED_TARGET }{\v PRECOMPILED_TARGET} macros.
\par {\b See Also}\line {\uldb\cf11 Precompiled Headers}{\v Precompiled_Headers}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} RC_COMPILER}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} RC_COMPILER}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} RC_COMPILER;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} RC_COMPILER
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
The Exchange team uses this macro when they are compiling different builds for different countries. They set the RC code page equal to the code page for Korea, and set the Japanese one to the code page for Japan. That informs the RC Compiler about what to
expect from the input side so it can translate the correct code page. If you do set the code page, it will be passed as the -C switch to the Resource Compiler. You can override other switches to the Resource Compiler with RC_OPTIONS.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} SDK_INC_PATH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} SDK_INC_PATH}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} SDK_INC_PATH;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} SDK_INC_PATH
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use this macro to specify the path to the SDK headers. The default is:
\par }\pard \li720\ri130\sa240\widctlpar {\f5 $(}{\ul\cf11 BASEDIR}{\v BASEDIR}{\f5 )\\public\\sdk\\inc
\par }\pard \ri130\sa240\widctlpar Set this macro if you don't use the Windows\~NT {\uldb\cf11 directory structure. }{\v Directory_Structure}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} SDK_LIB_PATH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} SDK_LIB_PATH}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} SDK_LIB_PATH;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} SDK_LIB_PATH
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify {\f5 the path to the SDK libraries. The default is:
\par }\pard \li720\ri130\sa240\widctlpar {\f5 $(}{\ul\cf11 BASEDIR}{\v BASEDIR}{\f5 )\\public\\sdk\\lib\\*
\par }\pard \ri130\sa240\widctlpar Set this macro if you don't use the Windows\~NT {\uldb\cf11 directory structure. }{\v Directory_Structure}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} SOURCES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} SOURCES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} SOURCES;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} SOURCES
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
The SOURCES macro is the most important macro for the Build Utility. You must have this macro in your sources file. The SOURCES macro specifies which files are going to be compiled. The Build Utility will look at these files and generate a dependency list
. If any of those dependencies change, the Build Utility will rebuild this source file.
\par Use this macro to list your source filenames (except for the file containing main. Include the filename extension and separate the entries in this list with spaces or tabs.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} SOURCES_USED}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} SOURCES_USED}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} SOURCES_USED;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} SOURCES_USED
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to indicate that another sources file or makefile exists elsewhere in the tree when that file has things in it that your build is dependent upon. When you specify:
\par \pard \li720\ri130\sa240\widctlpar SOURCES_USED={\i filename_someplace_else}
\par \pard \ri130\sa240\widctlpar nmake will regenerate the objects file when your sources file in this directory changes and also when another sources file or makefile that you specified in SOURCES_USED changes.
\par For example, the first thing you do in your sources file is include some other file. Then, right underneath that, specify:
\par \pard \li720\ri130\sa240\widctlpar SOURCES_USED={\i that_filename}
\par \pard \ri130\sa240\widctlpar This establishes a link between that file and the sources file. When that other file changes, nmake will regenerate objects.mac.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} SUBSYSTEM_VERSION}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} SUBSYSTEM_VERSION}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} SUBSYSTEM_VERSION;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
SUBSYSTEM_VERSION
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 If your product has to run on Windows\~NT\~3.1 or 3.5 or 3.51, set your subsystem version to that version number. For example, in the current setup program of Windows\~NT:
\par \pard \li720\ri130\sa240\widctlpar SUBSYSTEM_VERSION=3.1
\par \pard \ri130\sa240\widctlpar This is the most common usage. If you do not set SUBSYSTEM_VERSION, the default will be whatever the current build of Windows\~NT is.
\par You can also set individual subsystem versions. If you want to set the Windows version to 4.0, specify:
\par \pard \li720\ri130\sa240\widctlpar SUBSYSTEM_WINVER=4.0
\par \pard \ri130\sa240\widctlpar Likewise, you can set:
\par \pard \li720\ri130\sa240\widctlpar SUBSYSTEM_CONVER\line SUBSYSTEM_OS2VER\line SUBSYSTEM_POSIX\line SUBSYSTEM_NATVER
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} TARGET_CPP}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} TARGET_CPP}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} TARGET_CPP}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} TARGET_CPP
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify name of the compiler. Instead of having to specify that on x86 it\rquote s CL386 and on MIPS, it\rquote s CLMIPS, and on PowerPC, it\rquote s CLPPC, you can simply specify:
\par \pard \li720\ri130\sa240\widctlpar TARGET_CPP={\i name_of_compiler}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} TARGET_DIRECTORY}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} TARGET_DIRECTORY}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} TARGET_DIRECTORY;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
TARGET_DIRECTORY
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro as follows to specify the target directory when you want some dependency file to always end up in the obj subdirectory:
\par \pard \li720\ri130\sa240\widctlpar TARGET_DIRECTORY={\i some_sourcefile:some_dependency_file}
\par \pard \ri130\sa240\widctlpar This enables you to do platform-specific builds from the same source tree at the same time and they won\rquote t override each other. You do not have to hard code the name of the platform.
\par For example, if you have a special build rule for some feature in your code or if you want to build a particular object from a particular C file, specify:
\par \pard \li720\ri130\sa240\widctlpar obj\\$(TARGET_DIRECTORY)\\{\i filename}.obj;{\i filename}.c
\par \pard \ri130\sa240\widctlpar By using the TARGET_DIRECTORY macro, you guarantee that it\rquote s going to end up in the correct platform subdirectory, such as \\obj\\{\i i386subdirectory}\\obj\\.
\par There are some default targets. One of them is .cod. If you go to a subdirectory where you've got source files and specify:
\par \pard \li720\ri130\sa240\widctlpar nmake SOURCE_FILE_NAME=.cod
\par \pard \ri130\sa240\widctlpar it will create an assembler listing for you that you can view to see where the compiler erred.
\par There is another default target called .pp file, a preprocessed listing. Preprocessing adds line numbers. You can look view to see where the Build Utility got your headers, and which #defines and what kinds of structures it added.
\par The other thing with a .pp file is that you can send it out to the compiler group if something goes wrong. It's all self-contained. They do not have to have any header files or anything like that in their environment You can just give it to them. They are
usually quite large, in the neighborhood of a meg or more, with several hundred thousand lines. You can send that to the compiler group.
\par You can, again, go to a subdirectory where you have a source file and say:
\par \pard \li720\ri130\sa240\widctlpar nmake SOURCE_FILE_NAME=.pp
\par \pard \ri130\sa240\widctlpar and it will preprocess it.
\par The .cod and .pp files are very useful for tracking bugs in the build process.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} TARGETEXT}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} TARGETEXT}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} TARGETEXT;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} TARGETEXT
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20 Use this macro to specify the extension name (such as .cpl) when you want the DLLs to have something other than .dll as the filename extension.
\par \pard \ri130\sa240\widctlpar If you specify something unexpected, you will see a message "Unexpected Target Ext." If you want an extension added to the Build Utility, contact Bryan Tuttle (bryant).
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} TARGETLIBS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} TARGETLIBS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} TARGETLIBS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} TARGETLIBS
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20
Use TARGETLIBS to specify other libraries that you want to link against when building your image. It should be your primary method for specifying libraries or objects you want to link against to build your image.
\par You can also use the {\uldb\cf11 LINKLIBS}{\v LINKLIBS} macro to specify libraries that you need to link against. The only difference is the ordering on the command line. LINKLIBS usually gets passed first; TARGETLIBS
gets passed second. If you order them in your TARGETLIBS macro correctly, that shouldn't be a problem EXCEPT when you are building a DLL. When you are building a DLL, you may have some objects that you've built, but you also have some other libraries tha
t you want to export some features from. Maybe you go to subdirectory one and compile a number of objects into a library. In subdirectory two, you compile some more into a library. In subdirectory three, you actually build the DLL, but it exports function
s that are defined in library one or library two. So put those libraries in your LINKLIBS macro.
\par {\pntext\tab}\pard\plain \s17\sb50\widctlpar\noline\pvpara\phpg\posy0\absw540\dxfrtext180\dfrmtxtx180\dfrmtxty0{\*\pn \pnlvlbody\pnstart1\pnhang}\hyphpar0 \f4\fs20\kerning20 {\pard\plain
\s17\sb50\widctlpar\noline\pvpara\phpg\posy0\absw540\dxfrtext180\dfrmtxtx180\dfrmtxty0{\*\pn \pnlvlbody\pnstart1\pnhang}\hyphpar0 \f4\fs20\kerning20 {\object\objlink\rsltmerge\rsltbmp\objw0\objh0{\*\objclass }{\*\objdata 010500000100000010000000576f72642e446f63756d656e742e360021000000433a5c47554944455c5052494e545c444f435c4d5350524553535c432e414d5300080000004d414561727438000000000000000000
020000000105000000000000{\*\bkmkstart _865320947}{\*\bkmkend _865320947}}{\result {{\pict\wmetafile8\picw846\pich846\picwgoal480\pichgoal480 \picbmp\picbpp4
010009000003220800000400d903000000001400000026060f001e00ffffffff040014000000576f72640e004d6963726f736f667420576f7264050000000b0200000000050000000c02640064000d000000fb020000000000000000000000000000000000010044040000002d0100000400000002010100040000002d0100
0015000000fb02d6ff0000000000009001000000000400001254696d6573204e657720526f6d616e000000040000002d01010005000000090200000000040000000201010004000000020101000400000002010100030000001e0007000000160465006500000000000400000002010100040000002d010100030000001e00
0700000016046400640000000000030000001e000700000016046400640000000000030000001e000700000012046400640064006400050000000c0264006400050000000b0200000000050000000b0200000000050000000c0218001800050000000b0200000000060000002606260002000100050000000b020000000005
0000000c0220002000050000000b020000000005000000090200000000050000000102ffffff00040000000701030042010000430fc600880000002000200000000000200020000000000028000000200000002000000001000400000000000002000000000000000000000000000000000000000000001111110022222200
33333300444444005555550066666600777777008888880099999900aaaaaa00bbbbbb00cccccc00dddddd00eeeeee00ffffff00fffff7777777777777777777777777ffffff777777777777777777777777777fff700000000000000000000000077777f7ffffffffffffffffffffffffc077777fffffffffffffffffffff
fffffc07777fffffffffffffffffffffffffff07777ffffffffffffc00cfffffffffff077f7ffffffffffff0000ffffffffffc077ff7fffffffffff0000ffffffffff077fff7fffffffffffc00cfffffffffc077ffff7fffffffffffffffffffffff077fffff7fffffffffff0ffffffffffc077ffffff7fffffffffc0cffff
fffff077fffffff7fffffffff707ffffffffc077ffffffff7ffffffff000ffffffff077fffffffff7fffffffc000cffffffc077ffffffffff7ffffff70007ffffff077fffffffffff7ffffff00000fffffc077ffffffffffff7fffff00000fffff077fffffffffffff7fffff00000ffffc077ffffffffffffff7ffff00000f
fff077fffffffffffffff7ffff00000fffc077ffffffffffffffff7fffc000cfff077fffffffffffffffff7ffffffffffc077ffffffffffffffffff7fffffffff077fffffffffffffffffff7ffffffffc077ffffffffffffffffffff7fffffff077fffffffffffffffffffff7ffffffc077ffffffffffffffffffffff7ffff
f077fffffffffffffffffffffff7ffffc07fffffffffffffffffffffffff7ffc0ffffffffffffffffffffffffffff777fffffffffffffffff000000026062500d501d301254d5345505320507265616d626c6520302030203234203234203020302033322033320d092f70705f736176652073617665206465660d092f7368
6f7770616765207b7d206465660d093430206469637420626567696e202f70705f636c69702066616c736520646566202f70705f62626f782066616c7365206465660d092f46207b20706f70207d20646566202f53207b7d206465660d092f42207b207b202f70705f647931206578636820646566202f70705f6478312065
786368206465660d09092020202f70705f647932206578636820646566202f70705f647832206578636820646566207d0d090973746f70706564206e6f74207b202f70705f62626f78207472756520646566207d206966207d206465660d092f4342207b207b202f70705f6379206578636820646566202f70705f63782065
786368206465660d0909202020202f70705f636874206578636820646566202f70705f637764206578636820646566207d0d090973746f70706564206e6f74207b202f70705f636c6970207472756520646566207d206966207d206465660d092f70705f627831203020646566202f70705f627931203020646566202f7070
5f62783220323420646566202f70705f627932203234206465660d00060000002606260002000000030000001e0007000000fc020100000000000000040000002d01020008000000fa02000000000000feffff00040000002d0103000400000004010b00070000001b042000200000000000040000002701ffff0600000026
06260002000100d500000026062500a0019e010970705f636c69700d097b2070705f63782070705f6379206d6f7665746f2070705f637764203020726c696e65746f20302070705f63687420726c696e65746f0d09202070705f637764206e6567203020726c696e65746f20636c6970206e657770617468207d2069660d09
70705f62626f78207b0d092f70705f6479322070705f6479322070705f64793120616464206465660d092f70705f6478322070705f6478322070705f64783120616464206465660d092f70705f73782070705f6478322070705f647831207375622070705f6278322070705f6278312073756220646976206465660d092f70
705f73792070705f6479322070705f647931207375622070705f6279312070705f6279322073756220646976206465660d092f70705f74782070705f6478312070705f73782070705f627831206d756c20737562206465660d092f70705f74792070705f6479312070705f73792070705f627932206d756c20737562206465
660d0970705f74782070705f7479207472616e736c6174652070705f73782070705f7379207363616c65207d2069660d656e640dd903000026062500a807a607252150532d41646f62652d312e300d0a2525426f756e64696e67426f783a203020302032342032340d0a25255363616c696e673a203130300d0a2525424954
4d4150494e464f4845414445523a203332203332203420323034380d0a252543726561746f723a20466c6173682028313631353736290d0a2525456e64436f6d6d656e74730d0a3020736574677261790d0a3130206469637420626567696e0d0a63757272656e7473637265656e20706f7020706f70206475702031323020
6c74207b706f70203132307d2069662025206e657720636f64650d0a3435207b20616273206578636820616273203220636f7079206164642031206774207b2031207375620d0a647570206d756c206578636820312073756220647570206d756c20616464203120737562207d207b20647570206d756c2065786368206475
700d0a6d756c206164642031206578636820737562207d206966656c7365207d2073657473637265656e0d0a2f77426d7020313620737472696e67206465660d0a3234203234207363616c650d0a33322033322034205b333220302030203332203020305d0d0a2f6368203120737472696e6720646566202f7262207b2063
757272656e7466696c652063682072656164686578737472696e6720706f7020706f70206e207b2077426d70206c2063680a707574696e74657276616c202f6c206c20312061646420646566207d20726570656174207d20646566202f6e62207b202f6e206e203132372073756220646566206e207b2063757272656e7466
696c650a63682072656164686578737472696e6720706f7020706f702077426d70206c20636820707574696e74657276616c202f6c206c20312061646420646566207d20726570656174207d20646566202f67730a7b202f6c203020646566207b202f6e2063757272656e7466696c6520746f6b656e20706f702064656620
6e20313237206774207b6e627d207b72627d206966656c7365206c2031362065710a7b657869747d206966207d206c6f6f70207d20646566202f72203020646566202f63203020646566207b20632030206571207b202f722063757272656e7466696c6520746f6b656e20706f70206465660a6773207d206966202f632063
2031206164642064656620632072206571207b2f632030206465667d2069662077426d70207d20696d6167650a31203133302046464646463720313220373720313238204646203120313239204646464620313320373720313238203746203120313239204646373020313120303020313330203037373737370a31203132
38204637203132204646203133302043303737373720312031323820374620313220464620313330204643303737372031203132382037462031332046462031323920303737372031203132382037460a35204646203133302046433030434620352046462031323920303737462031203132382037462035204646203133
3020463030303046203420464620313330204643303737462031203132382046370a35204646203133302046303030304620342046462031333020463037374646203120313238204637203520464620313330204643303043462034204646203133302043303737464620312031323920464637460a313120464620313330
203037374646462031203132392046463746203520464620313238203046203420464620313331204643303737464646203120313239204646463720342046462031323920464330430a3420464620313331204630373746464646203120313239204646463720342046462031323920463730372034204646203133312043
3037374646464620312031333520464646463746464646464646463030300a34204646203133312030373746464646462031203134332046464646374646464646464643303030434646464646464330373746464646462031203134332046464646463746464646464637303030374646464646463037374646464646460a
31203134332046464646463746464646464630303030304646464646433037374646464646462031203134332046464646464637464646464630303030304646464646303737464646464646460a31203134332046464646464637464646464630303030304646464643303737464646464646462031203133392046464646
46464637464646463030303030464646463037370a342046462031203133392046464646464646374646464630303030304646464330373720342046462031203420464620313335203746464643303030434646463037374620342046460a3120342046462031323820374620342046462031333020464330373746203420
464620312034204646203132382046372034204646203132392046303737203520464620312034204646203132382046370a342046462031323920433037372035204646203120352046462031333320374646464646464630373746203520464620312035204646203133332037464646464646433037374620352046460a
3120352046462031333220463746464646463037372036204646203120352046462031333220463746464646433037462036204646203120362046462031333020374646433046203720464620310a36204646203132392046373737203820464620656e640a2525456e64496d616765446174610a06000000260626000200
0000160000002606250021001f00254d5345505320547261696c65720d70705f7361766520726573746f72650d00040000002701ffff040000002701ffff040000002701ffff0400000002010100040000002701ffff040000002d01000003000000000050436f6c6f724374726c0000002c00700014000800600200000050
4300ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff}}}}}
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20 {\cf6 Caution!}
The LINKLIBS macro requires that the library has to be around in pass one of the build, because the Build Utility builds the import libraries during pass one. You must structure your build in such a manner that the libraries will be guaranteed to exist d
uring pass one. You should never specify an import library
in your LINKLIBS macro, mainly because you can get into some real nasty cases where you export something that you've imported from somebody else instead of what you actually had, perhaps with typos or whatever. You may not realize this until suddenly your
program starts acting really weird. Stick with the rule that you use TARGETLIBS everywhere. There is TARGETLIBS and There is LINKLIBS; if you use TARGETLIBS for everything, life is good. (To avoid problems when doing multi-processor builds, see {
\uldb\cf11 Multi-processor Build Issues}{\v Multi_processor_Build_Issues}.)
\par Use LINKLIBS {\ul only} for the case that meets the following conditions:
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa240\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}You are building a dynamic link.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}You are exporting something that's defined in some other component library that you also build.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}In your dirs file in the subdirectory above, you have ordered it so that the component libraries are around before you build the dynamic link.
\par \pard \ri130\sa240\widctlpar There is a similar macro called {\uldb\cf11 UMLIBS}{\v UMLIBS} that you can use if you are building UMAPPLs.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} TARGETNAME}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} TARGETNAME}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} TARGETNAME;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} TARGETNAME
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20 Use this macro to specify the name of the library being built, excluding the filename extension. You must have this macro in your sources file.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} TARGETPATH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} TARGETPATH}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} TARGETPATH;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} TARGETPATH
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20
Use this macro to specify the target directory name that is the destination of all build products ( such as .exe, .dll, and .lib files). Notice that object files always end up in the obj subdirectory. You must have this macro in your sources file. For exa
mple:
\par \pard \li720\ri130\sa240\widctlpar TARGETPATH=obj
\par \pard \ri130\sa240\widctlpar\tx4428\tx8856 {\b See Also}\line {\uldb\cf11 Specifying Libraries}{\v Specifying_Libraries}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} TARGETPATHLIB}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} TARGETPATHLIB}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} TARGETPATHLIB;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
TARGETPATHLIB
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use the TARGETPATHLIB macro to specify where to put the import library when you are building a DLL.
\par When you are building a DLL, you create the DLL itself and you create an import library that other images can use that need to use your DLL. For example, a Windows\~
NT developer built kernel32.dll and also kernel32.lib that users of kernel32.dll would link against. In the past, you would handle all that by specifying:
\par \pard \li720\ri130\sa240\widctlpar TARGETPATH=publicsdk.lib
\par \pard \ri130\sa240\widctlpar and it would put both the DLL and the import library in the public tree. By specifying TARGETPATHLIB, you can say, \ldblquote Put the library in the public tree.\rdblquote
Then you can set TARGETPATH=obj and we use the DLL in the obj subdirectory in the source tree and put the import library in the public tree where people might want to share it.
\par The VC team uses this because on their release point they have the root of the VC tree and then they have a bin subdirectory and a lib subdirectory. They put all their DLLs in the bin subdirectory and all their libraries in the lib subdirectory. So they w
ould specify:
\par \pard \li720\ri130\sa240\widctlpar TARGETPATH=bin\line TARGETPATHLIBS=vc\\lib
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} TARGETTYPE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} TARGETTYPE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} TARGETTYPE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} TARGETTYPE
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20
Use this macro to specify the type of product being built. This is typically LIBRARY or DYNLINK (for DLLs), but can take other values. This is a required field in the sources file. TARGETTYPE gives the Build Utility some clues about some of the input fil
es that it should be expecting. You must have this macro in your sources file. The valid values for TARGETYPE include:
\par \pard\plain \s20\li720\ri130\sa240\widctlpar \f7\fs20 PROGLIB is an executable that exports something. It's a program library.
\par PROGRAM - This is just a plain, program file that does not export anything. It just imports stuff in the default .exe on the command line.
\par DYNLINK - A DLL, a control panel applet, anything that can be dynamically loaded or that people can import from that has to have when its linked, it uses the DLL switch to the linker to indicate it's not a standalone .exe. It's actually something that's d
ynamically linked. When you build a dynamic link, you may also need to set the {\ul\cf11 TARGETEXT}{\v TARGETEXT} macro.
\par LIBRARY
- A component library. This is a library of objects, not an import library (an import library is built as a side effect of building a dynamic link. Anytime you build a dynamic link, you get a .lib file and a .dll file. When you build a library, you just g
et a .lib file.)
\par DRIVER - A system kernel driver.
\par EXPORT_DRIVER - An export driver is like a driver except it exports things. It provides services to other drivers. There are two of those in Windows\~NT.
\par HAL - {\ul\cf11 Hardware Abstraction Layer. }{\v Hardware_Abstraction_Layer} This is the kernel HAL for Windows\~NT.
\par BOOTPGM - A kernel driver.
\par MINIPORT - A kernel driver.
\par GDI_DRIVER - A kernel driver that is similar to a DLL, which is loaded in user and kernel space. This was added for Windows\~NT\~4.0.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} UMAPPL}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} UMAPPL}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} UMAPPL;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} UMAPPL
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20 This macro enables you to build multiple targets from a single subdirectory where every target is a source file and some other .lib files that you link against.
\par To use this macro, specify a list of source filenames containing a main function. Specify these filenames without filename extensions and separate them with an asterisk. For example:
\par \pard \li720\ri130\sa240\widctlpar UMAPPL=a*b*c*d
\par \pard \ri130\sa240\widctlpar\tx4428\tx8856
The Build Utility will compile and link each file in this list after the main target in the sources file is built. The only restriction is that there can only be one source file and you must specify what it links with using the UMLIBS macro.
\par The Build Utility links against whatever things you list in the UMLIBS macro. Those things could be a .res file if you have a common resource, a library that you just buil
t in a subdirectory, a library or object from another subdirectory. There is no limit to what can be listed in UMLIBS.
\par The difference between UMTEST and UMAPPL is that if you use UMTEST, you need to specify the executable names that need to be built through the command line to build.exe. If you use UMAPPL, you need not specify anything on the command line, and build.exe w
ill automatically build all the program files.
\par {\b See Also}\line {\ul\cf11 UMLIBS}{\v UMLIBS}\line {\ul\cf11 UMTEST}{\v UMTEST}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} UMAPPLEXT}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} UMAPPLEXT}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} UMAPPLEXT;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} UMAPPLEXT
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20 Use this macro to specify the exten
sion name (for example .COM or .SCR) that will be appended when you want image files to have multiple filename extensions when you are building from a single source file. Use UMAPPLEXT when you want the extension to be something other than .exe. If you wa
nt the filename extension to be .exe, use UMAPPL. If you have questions about using UMAPPLEXT, see {\uldb\cf11 makefile.def}{\v makefile_def} or contact Bryan Tuttle or Wes Witt.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} UMBASE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} UMBASE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} UMBASEMacros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} UMBASE
\par \pard\plain \ri130\sa240\widctlpar\tx2718\tx8856 \f7\fs20 You only need to use this macro when you are building a dynamic link library (a
DLL). Use it to set the base address for the DLL image you are creating. If you do not specify an address, the Build Utility will assume that the target name in coffbase.txt is the name of your image. You can override this default target name by specifyin
g a target name with the DLLBASE macro. You can set DLLBASE to be the hard-coded base address, a hex address, or you can leave it blank. If you leave it blank, the Build Utility will always look up the target name specified in coffbase.txt.
\par Example: If you are building kernel32.dll, the Build Utility will look up kernel32 in coffbase.txt to find that base address.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} UMENTRY}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} UMENTRY}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} UMENTRY;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} UMENTRY
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
Use this macro to override the default entry point (mainCRTStartup) and specify the entry point depending on the UM Type. You can set this name to be anything you choose. If the UM Type is Windows or Console, the default entry point is main and you can ov
erride it with winmain, wmain, or wwinmain.
\par \pard \ri130\sa240\widctlpar\tx4428\tx8856 You can only use this macro if your UMTYPE is Windows or Console.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} UMENTRYABS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} UMENTRYABS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} UMENTRYABS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} UMENTRYABS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify an absolute entry point. For example, you might specify:
\par \pard \li720\ri130\sa240\widctlpar UMENTRY=main
\par \pard \ri130\sa240\widctlpar
but the real entry point is mainCRTStartup. If you do not want mainCRTStartup to be the entry point, specify UMENTRYABS to make main the absolute entry point. This prevents the Build Utility from going through the translation table that says if it\rquote
s main, make it mainCRTStartup.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} UMLIBS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} UMLIBS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} UMLIBS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} UMLIBS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to specify a list of library path names to be linked to the files specified in {\uldb\cf11 UMTEST}{\v UMTEST} or in{\uldb\cf11 UMAPPL. }{\v UMAPPL}
Include the library generated by the sources file. Separate the entries in this list with spaces or tabs.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} UMTEST}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} UMTEST}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} UMTEST;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} UMTEST
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20 Use this macro to list source filenames containing a main function. Type these filenames without filename extensions and separate them with an asterisk.
\par \pard \li720\ri130\sa240\widctlpar UMTEST=a*b*c*d
\par \pard \ri130\sa240\widctlpar\tx4428\tx8856 The Build Utility compiles and links each file in this list.
\par {\b See Also}\line {\uldb\cf11 UMAPPL}{\v UMAPPL}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} UMTYPE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super
$} UMTYPE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} UMTYPE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} UMTYPE
\par \pard\plain \ri130\sa240\widctlpar\tx4428\tx8856 \f7\fs20 Use this macro to specify the type of product being built:
\par \trowd \trgaph108\trleft-108 \cellx2250\cellx6750 \pard \ri130\sa240\widctlpar\intbl {\b Set UMTYPE to This:\cell To Specify This:}\cell \pard \widctlpar\intbl \row \trowd \trgaph108\trleft-108 \cellx2250\cellx6750 \pard \ri130\sa240\widctlpar\intbl {\b
windows\cell }A Win32 Program\cell \pard \widctlpar\intbl \row \pard \ri130\sa240\widctlpar\intbl {\b nt\cell }A Native Kernel-mode System Windows\~NT Program\cell \pard \widctlpar\intbl \row \pard \ri130\sa240\widctlpar\intbl {\b ntss\cell }A Windows\~
NT Subsystem\cell \pard \widctlpar\intbl \row \pard \ri130\sa240\widctlpar\intbl {\b os2\cell }An OS/2 Program\cell \pard \widctlpar\intbl \row \pard \ri130\sa240\widctlpar\intbl {\b posix\cell }A POSIX Program\cell \pard \widctlpar\intbl \row \trowd
\trgaph108\trleft-108 \cellx2250\cellx6750 \pard \ri130\sa240\widctlpar\intbl {\b console\cell }A Win32 Console Program\cell \pard \widctlpar\intbl \row \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote
\pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_CRTDLL}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $} USE_CRTDLL}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super K} USE_CRTDLL;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USE_CRTDLL
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Depending on how you want to link your image, you can link runtime libraries from the DLL for Windows\~NT or use:
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa240\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}The runtime libraries in a DLL
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}The multi-threaded runtime libraries
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}The single-threaded runtime libraries
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}The kernel runtime libraries
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}No runtime libraries at all
\par \pard \ri130\sa240\widctlpar Use this macro, or one of the following macros, to define the type of runtime library you are using. Which one of these macros you use will depend on the type of runtime libraries you want to have on your system.
\par \trowd \trgaph108\trleft-108 \cellx1687\cellx6115 \pard \ri130\sa240\widctlpar\intbl {\b This Marco:\cell Specifies This Runtime Library:\cell }\pard \widctlpar\intbl {\b \row }\trowd \trgaph108\trleft-108 \cellx1687\cellx6115 \pard
\ri130\sa240\widctlpar\intbl USE_CRTDLL\cell Multi-threaded runtime in a DLL\cell \pard \widctlpar\intbl \row \pard \ri130\sa240\widctlpar\intbl USE_MSVCRT\cell Multi-threaded runtime in a DLL\cell \pard \widctlpar\intbl \row \pard
\ri130\sa240\widctlpar\intbl USE_LIBCMT\cell Multi-threaded static\cell \pard \widctlpar\intbl \row \pard \ri130\sa240\widctlpar\intbl USE_LIBCNTPR\cell Kernel\cell \pard \widctlpar\intbl \row \pard \ri130\sa240\widctlpar\intbl USE_NTDLL\cell
The DLL for Windows\~NT\cell \pard \widctlpar\intbl \row \trowd \trgaph108\trleft-108 \cellx1687\cellx6115 \pard \ri130\sa240\widctlpar\intbl USE_NOLIBS\cell None\cell \pard \widctlpar\intbl \row \pard \ri130\sa240\widctlpar
The default is LIBC, statically linked in single-threaded runtime libraries. If you do not define any of these macros, you get LIBC.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_INCREMENTAL_LINKING}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} USE_INCREMENTAL_LINKING}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_INCREMENTAL_LINKING;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super +} MACROS:0}} USE_INCREMENTAL_LINKING
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro to direct the Build Utility to use incremental linking.
\par \pard \li720\ri130\sa240\widctlpar USE_INCREMENTAL_LINKING=1
\par \pard \ri130\sa240\widctlpar If you are running on slower hardware, you may find that using incremental linking can speed up the build.
\par {\b See Also}\line {\uldb\cf11 USE_PDB}{\v USE_PDB}.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_LIBCNTPR}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_LIBCNTPR}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_LIBCNTPR;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USE_LIBCNTPR
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 See {\uldb\cf11 USE_CRTDLL. }{\v USE_CRTDLL}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_MFC}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_MFC}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_MFC;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USE_MFC
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro in your sources file to indicate you are using MFC. The syntax is:
\par \pard \li720\ri130\sa240\widctlpar USE_MFC=1
\par \pard \ri130\sa240\widctlpar This will establish the correct build environment for a program that needs to use MFC. The Build Utility supports either MFC3 or MFC4.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_MFC30}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_MFC30}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_MFC30;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USE_MFC30
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use this macro to direct the Build Utility to use MFC version 3.0 headers and libraries when building. You must list this with }{\ul\cf11 USE_MFC}{\v USE_MFC} or{\ul\cf11 USE_MFCUNICODE }{\v USE_MFCUNICODE
} to{\f5 be effective.}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_MFCUNICODE}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_MFCUNICODE}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_MFCUNICODE;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
USE_MFCUNICODE
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Use this macro in your sources file to indicate you are using Unicode MFC. The syntax is:
\par \pard \li720\ri130\sa240\widctlpar USE_MFCUNICODE=1
\par \pard \ri130\sa240\widctlpar This will establish the correct build environment for a program that needs to use Unicode MFC. The Build Utility supports either MFC3 or MFC4.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_MSVCRT}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_MSVCRT}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_MSVCRT;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USE_MSVCRT
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 See {\uldb\cf11 USE_CRTDLL. }{\v USE_CRTDLL}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_NATIVE_EH}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_NATIVE_EH}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_NATIVE_EH;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
USE_NATIVE_EH
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 If you are using Try Catch and Throw, the standard C++ exception handling (C++EH), you must specify the following in your sources file:
\par \pard \li720\ri130\sa240\widctlpar USE_NATIVE_EH=1
\par \pard \ri130\sa240\widctlpar This directs the Build Utility to turn on some needed switches to the compiler.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_NOLIBS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_NOLIBS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_NOLIBS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USE_NOLIBS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 See {\uldb\cf11 USE_CRTDLL. }{\v USE_CRTDLL}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_NTDLL}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_NTDLL}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_NTDLL}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USE_NTDLL
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 See {\uldb\cf11 USE_CRTDLL. }{\v USE_CRTDLL}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_PDB}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_PDB}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_PDB;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USE_PDB
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 If you want a VC4 PDB for your debug symbolic files, specify:
\par \pard \li720\ri130\sa240\widctlpar USE_PDB=1
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_STATIC_MFC}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_STATIC_MFC}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_STATIC_MFC;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
USE_STATIC_MFC
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
The Build Utility always uses MFC in a DLL, but there are a number of cases where that's not available. In those cases, specify USE_STATIC_MFC in your sources file. Then the Build Utility will link MFC into your program statically instead of dynamically l
oading it from a DLL. Your program will get bigger, but you can do more things.
\par If you need to redefine or change the MFC code, specify USE_STATIC_MFC because that enables you to make the changes you need, and whatever you do not change will be linked in for you. If you build a DLL, you must use what\rquote
s in the DLL. You cannot override classes. You cannot add new members. You cannot change arguments.
\par It\rquote s highly unlikely that you will ever need to use this macro. This macro was used in one case where the rich edit support was not correct for Windows\~NT.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USECXX_FLAG}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USECXX_FLAG}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USECXX_FLAG;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USECXX_FLAG
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 This macro enables you to go to a subdirectory that has all C files and compile them with the C++ compiler rather than the C compiler. One reason for
doing that might be switching to C++. Rather than change all your filenames to be a.cpp, b.cpp, which is a lot of work for no real gain, you can just specify:
\par \pard \li720\ri130\sa240\widctlpar USECXX_FLAG=/Tp
\par \pard \ri130\sa240\widctlpar That switch directs the compiler to compile this subdirectory using the C++ compiler instead of the C compiler.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USER_C_FLAGS}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USER_C_FLAGS}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USER_C_FLAGS;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}} USER_C_FLAGS
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Use this macro to specify flags that only go to the C/C++ compiler. Unlike }{\f5\uldb\cf11 C_DEFINES, }{\v\f5 CDEFINES}{\f5 USER_C_FLAGS doesn't go to the RC compiler.}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USER_INCLUDES}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USER_INCLUDES}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USER_INCLUDES;Macros}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} MACROS:0}}
USER_INCLUDES
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 You will usually use the {\uldb\cf11 INCLUDES}{\v INCLUDES}
macro in your sources file to indicate to the Build Utility where to find the headers that you are including in your build. But there are times when some header files may not exist. Maybe they are built as part of the build process. Specify those header
files in USER_INCLUDES to notify the Build Utility, \ldblquote Here\rquote s another place to go, but do not worry if you cannot find these header files because there may not be anything there.\rdblquote
\par The reason you put things in USER_INCLUDES is because you {\ul do not} want the Build Utility to do dependency checking on them. They either will be there or they won\rquote t, but it\rquote s not up to the Build Utility to figure out if they\rquote
re not found.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} USE_LIBCMT}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} USE_LIBCMT}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} USE_LIBCMT;Macros}} USE_LIBCMT
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 See {\uldb\cf11 USE_CRTDLL. }{\v USE_CRTDLL}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Building_NT_Software}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} Building NT Software}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Building NT Software}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +}
BUILDNT:0}} Building Windows NT Software
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The Build Utility assumes you are building the current version of Windows NT (current meaning what Windows\~
NT is currently working on, not what has already shipped). If you are building something that needs to run on a future version of Windows\~NT, there are other settings available.
\par If you have a single set of source files that build for Chicago, Windows\~NT, or future versions of Windows\~NT, there are some macros that you can specify in your source code to do that. They are:
\par \pard \li720\ri130\sa240\widctlpar WIN_32_WINNT for Windows\~NT
\par WIN32_WINDOWS for Chicago or Win95
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Building_Chicago_Software}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} Building Chicago Software}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Building Chicago Software;Chicago}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super +} CHICAGO:0}} Building Chicago Software
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The Build Utility assumes you are building the current version of Windows\~NT (current meaning what Windows\~NT is currently working on, not what has already shipped). If you want to build a Chicago bin
ary, specify the following in your sources file:
\par \pard \li720\ri130\sa240\widctlpar CHICAGO_PRODUCT=1
\par \pard \ri130\sa240\widctlpar This defines some variables to indicate to the Build Utility that you are building a Chicago product. It defines Chicago to be equal to 200. It does not use any of the system DLLs for Windows\~
NT. It always uses just kernel 32 DLLs. If you specify this in your sources file, when you are all done building, you should have an .exe that will run fine on Win95 and on Windows\~NT at the same time.
\par This macro was used by the OLE team.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Building_Win32_Subsystem_Software}} {\cs16\super ${\footnote \pard\plain
\s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $} Building Win32 Subsystem Software}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Building Win32 Subsystem Software}} {\cs16\super +{\footnote \pard\plain
\s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} WIN:0}} Building Win32 Subsystem Software
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 In the sources file describing a Win32 build product, set UMTPYE to windows:
\par \pard \li720\ri130\sa240\widctlpar UMTYPE=windows
\par \pard \ri130\sa240\widctlpar This selects the appropriate libraries and entry point for the build product(s).
\par For an example of a sources file that builds a Win32 program, see \\\\rastaman\\ntwin\\src\\shell\\accessory\\calc\\sources.
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Rules}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $
} Rules}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Rules}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} RULES:0}} Rules
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard\plain \fi-360\li360\ri130\sa240\widctlpar{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\f7\fs20 There are a number of limitations and rules associated with the Build Utility.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li360\ri130\sa240\widctlpar\tx360{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}Only one DLL or library may be built in a given source directory. The equivalent of an import libr
ary will be generated automatically when you build a DLL.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Any number of .exe files can be generated, as long as each one consists of a single source file (containing main) that is to be linked to the library or DLL being generated.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}If your DLL needs to link with other libraries, these libraries must be specified in the {\uldb\cf11 TARGETLIBS}{\v TARGETLIBS}
statement within your sources file. These libraries must be specified with the same * notation as described for {\ul\cf11 UMLIBS. }{\v UMLIBS}
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Build.exe does not understand NMAKE macros or conditional syntax. So the value of a BUILD keyword in a sources file must be textual; it cannot contain references to NMAKE macros.
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\f5 Only files in the current subdirectory, one directory above, and in the platform subdirectory can be listed in the }{\f5\ul\cf11 SOURCES}{\v\f5 SOURCES}{\f5 macro.}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Debugging}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Debugging}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Debugging}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} DEBUG:0}} Debugging
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 In the build environment for Windows\~NT, you can {\ul always}
debug what you build. No matter how you build using the Build Utility, you get debug symbolic files. This is different from other build processes. In the VC build e
nvironment, when you are building debug you get debug symbolic files; when you are building retail, you get nothing{\f5 You control the type and amount of symbolic information with the }{\uldb\cf11 NTDEBUG, }{\v NTDEBUG}{\f5 }{\uldb\cf11 NTDEBUGTYPE, }{
\v NTDEBUGTYPE}{\f5 and }{\uldb\cf11 MSC_OPTIMIZATION}{\v MSC_OPTIMIZATION} {\f5
variables. For example, NTDEBUG=ntsd, NTDEBUGTYPE=both, MSC_OPTIMIZATION=/Odi will allow you to single step through your code with windbg and the VC ide or you can asm debug with ntsd or the kernel debuggers.}
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Frequently_Asked_Questions}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} Frequently Asked Questions}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Frequently Asked Questions}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super +} FAQ:0}} Frequently Asked Questions
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\ul\cf11 Question #1: }{\v Answer_1} I{\f5 have a new }multi-processor{\f5 machine. How do I take advantage of it with build?}
\par {\ul\cf11 Question #2: }{\v Answer_2}{\v\f5 }{\f5\cf1 I've read the help file. I've tried the quick start. I still have more questions. Is there anyone I can ask for help?}{\f5 }
\par {\uldb\cf11 Question #3: }{\v Answer_3} {\f5\cf1 What about Win16 or OS/2? I have legacy code I need to maintain and the build process I use works. Can I integrate it into the build utility?
\par }{\f5\uldb\cf11 Question #4: }{\v\f5 Answer_4}{\f5 What's the best way to convert a p}roject to use the Build Utility?
\par {\ul\cf11 Question #5: }{\v Answer_5} {\f5 How do I generate debugging information?
\par }{\uldb\cf11 Question #6: }{\v Answer_6} {\f5 {\*\bkmkstart ROBOHELP}{\*\bkmkend ROBOHELP}What's the difference between free and checked builds?}
\par {\ul\cf11 Question #7: }{\v Answer_8} What happened to all the makefiles?
\par {\ul\cf11 Question #8: }{\v Answer_9} Where is my .def file?
\par {\uldb\cf11 Question #9: }{\v Answer_10} Do I have to edit the dirs files to customize which components I build?
\par {\ul\cf11 Question #10: }{\v Answer_11} I get a return code of 4b from binplace - why?
\par {\ul\cf11 Question #11: }{\v Answer_12} I am getting a load of undefined symbols which I know are exported from a DLL (often the shell DLL msvcshl$(D)). Why?
\par {\ul\cf11 Question #12: }{\v Answer_13} Where do the build errors go? I need to know what failed.
\par {\ul\cf11 Question #13: }{\v Answer_14} How do I get browse information?
\par {\ul\cf11 Question #14: }{\v Answer_15} I have a number of small tools that have a subset of common code. There is just one source file between them that\rquote
s different. Can I avoid having a different subdirectory for each one of these little baby tools?
\par {\ul\cf11 Question #15: }{\v Answer_16} I've got five subdirectories and they all use all the same headers. I want to put one precompiled header someplace and have all of them use it.
\par {\ul\cf11 Question #16: }{\v Answer_17} I do not like the idea of having a public folder on my machine. Do I have to follow the build model for Windows\~NT that uses this directory structure?
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Glossary}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Glossary}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Glossary}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} GLOSS:0}} Glossary
\par \pard\plain \ri130\widctlpar \f7\fs20 {\ul\cf11 GDI}{\v GDI}
\par {\ul\cf11 GUIDs}{\v GUIDs}
\par {\ul\cf11 Hardware Abstraction Layer (HAL) }{\v Hardware_Abstraction_Layer}
\par {\ul\cf11 IDL}{\v IDL}
\par {\ul\cf11 MIDL}{\v MIDL}
\par
\par
\par
\par
\par
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} GUIDs}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $
} GUIDs}} GUIDs
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Global Unique Identifiers. A GUID is a 16-byte structure that you use to identify classes in OLE.
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} GDI}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $}
GDI}} GDI
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Graphics Device Interface
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Hardware_Abstraction_Layer}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar
\f7\fs20 {\cs16\super $} Hardware Abstraction Layer}} Hardware Abstraction Layer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 It is a dynamic link library (DLL) that protects the Windows\~
NT Executive from variations in different vendors' hardware platforms to maximize the operating system's portability. The HAL implements functions that abstract I/O interfaces, the interrupt con
troller, hardware caches, multiprocessor communication mechanisms, and so forth.
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} IDL}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super $}
IDL}} IDL
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Interface Description Language. This is used for RPC code to handle stubs that specify how to marshal arguments between the client and server.
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_1}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #1}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 Usually, it is very simple. Just add -M to the command line when you start the build utility. If you want this as the default, add it to your }{\ul\cf11 BUILD_DEFAULT}{\v BUILD_DEFAULTS} {\f5
environment variable. For more information, see }{\uldb\cf11 Multi-processor Build Issues. }{\v Multi_processor_Build_Issues}
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_2}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #2}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5\cf1 Send mail to BryanT or the NT build lab.}
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_3}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #3}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Answer #3}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} BUILD:0}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5\cf1 There are several ways to do this. The easiest is to create a}{\f5\ul\cf11 }{\i\f5\ul\cf11 sources}{\f5\ul\cf11 file }{\v\f5 SOURCES_File}{\f5 }{\f5\cf1
which builds no target. It can then call your existing build process. In this case, the Build Utility is used strictly to spawn nmake. Here's an example:
\par }\pard \ri130\widctlpar {\f5\cf1
\par ======== Sources file ========
\par
\par }{\ul\cf11 TARGETNAME}{\v TARGETNAME}{\f5\cf1 =
\par }{\uldb\cf11 TARGETTYPE}{\v TARGETTYPE}={\f5\cf1 NOTARGET
\par }{\ul\cf11 TARGETPATH}{\v TARGETPATH}{\f5\cf1 =
\par }{\ul\cf11 SOURCES}{\v SOURCES}{\f5\cf1 =
\par }{\ul\cf11 NTTARGETFILES}{\v NT_TARGETFILES}{\f5\cf1 =MyOldBuild
\par }{\ul\cf11 MISCFILES}{\v MISCFILES}{\f5\cf1 =<List of images the existing build will generate>
\par
\par ======== makefile.inc ========
\par MyOldBuild:
\par nmake <existing make command line>
\par
\par Another option is to create a }{\ul\cf11 makefil0}{\v makefile0}. {\f5\cf1 It has the added advantage in that the build utility will execute the all rule for a regular build and the clean rule when the -c switch is used. Here's an example:
\par }{\f5
\par ======== dirs =========
\par DIRS= Win32Dir1 Win32Dir2 Win32Dir3
\par
\par ======== makefil0 ========
\par all:
\par nmake <existing make command line>
\par
\par clean:
\par nmake <command to perform a clean build>
\par }\pard \ri130\sa240\widctlpar
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_4}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #4}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Answer #4}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} BUILD:0}} Answer #4
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5 1. Generate a full build of the project with your existing build. Make sure you can find all the switches passed to the compiler, include paths, linker options, resource compiler usage, ext
ra utilities you use, directory processing order, etc. Most builds try to hide all of this, but it's important for this purpose.
\par 2. Take a look at the extra tools you use. If they aren't available for all platforms (X86, Mips, Alpha, PPC, etc.), find the source code and start building it first. If you can't get the tools for all platforms, don't waste your time converting more co
de.
\par 3. Look over the output from Step1. Many non-trivial builds will have common code. Build library(s) with this code. If you want to do dual builds while you're converting, your existing makefiles can have a wrapper added. Here's an example:
\par }\pard \ri130\widctlpar {\f5
\par ======= Existing makefile =========
\par !ifdef NTMAKEENV
\par !include $(NTMAKEENV)\\makefile.def
\par !else
\par # The current makefile go here
\par !endif
\par
\par }\pard \ri130\sa240\widctlpar {\f5 Now by defining NTMAKEENV, the subdir will use the build utility. Otherwise, your existing build will still work.
\par 4. Build the core DLLs next. This will also generate import libraries.
\par 5. Build the .exes and ancillary DLLs next. These will probably use the common libraries you built in Step 3 and the import libraries from Step 4.
\par 6. Add dirs files as needed to these together. By using DIRS for projects you're sure build and OPTIONAL_DIRS to projects that you're converting, you can keep the build working for other users at the same time. Try to list the directories that build lib
raries and DLL's first as it reduces the chance you'll need Multiprocessor synchronization.
\par 7. Make sure you have someone else build on an alternate platform just to make sure you didn't introduce a platform dependency. Continue working until done.
\par }
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_5}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #5}} Answer #5
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The debugging information is controlled with the {\ul\cf11 NTDEBUGTYPE}{\v NTDEBUGTYPE}
environment variable which you set before you build the project. Usually, windbg or both is appropriate. All builds have debug symbolic information which is later stripped out into a .dbg file with the {\uldb\cf11 Binplace}{\v binplace_exe}
Utility as part of the build. If you want to generate PDBs for the Codeview information, set USE_PDB=1 in the sources file or in the environment when you build.
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_6}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #6}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Answer #6}} {\cs16\super +{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super +} BUILD:0}} Answer #6
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 {\f5
Think of them as Retail and Debug except the ONLY difference is whether DBG is defined or not. Checked defines DBG, Free doesn't. Optimizations are enabled all the time. You're welcome to change these based on the }FREEBUILD{\f5
setting in your sources file. For instance:
\par }\pard \ri130\widctlpar {\f5 ====== sources file ========
\par ...
\par !if !$(FREEBUILD)
\par C_DEFINES = $(C_DEFINES) /D_DEBUG
\par MSC_OPTIMIZATION=-Odi
\par !else
\par C_DEFINES = $(C_DEFINES) /DNDEBUG
\par !endif
\par }\pard \ri130\sa240\widctlpar {\f5 ...
\par The Free/Check setting is controlled by the }{\uldb\cf11 NTDEBUG}{\v NTDEBUG} {\f5 environment variable. Set it to ntsd for a checked build, ntsdnodbg for a free build.
\par }{\f5\cf10 Note:}{\f5 on the NTDEBUG page, all the blue text can be removed. Also the last sentence ("Some groups, such as the VC group, define _DEBUG... version") can be deleted also. A comment should be added that:
\par It is rarely used in the sources file, instead it should be set in the environment before building the project.
\par }\pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_8}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #8}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 All directories still contain a makefile, but it just includes the standard makefile.def file. This makefile should not be edited. Instead look in the corresponding sources and {\uldb\cf11 makefile.inc}{\v
mk_inc}
files when you need to make local changes to how a component builds, or the sources.inc and makefile.inc files in directories above your component to make more global changes. When adding a new component, it will need at least a sources and the standard
makefile, and may need a makefile.inc as well.
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_9}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #9}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 The .def files that need preprocessing have been renamed as .src files so the preprocessing happens automatically.
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_10}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #10}} {\cs16\super K{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super K} Answer #10}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 No. You can give directions to build on the command line, or in the environment variable BUILD_OPTIONS. So with the following dirs file:
\par \pard \li720\ri130\widctlpar DIRS=dir1
\par \pard \ri130\widctlpar \tab OPTIONAL_DIRS=dir2
\par
\par \tab build
\par \tab -or-
\par \tab build ~dir2
\par \tab builds dir1
\par
\par \tab build dir2
\par \tab builds dir1 and dir2
\par
\par \tab build dir2 ~dir1
\par \tab builds dir2 only
\par
\par Or you can set BUILD_OPTIONS=dir2 ~dir1.
\par
\par \pard \ri130\sa240\widctlpar
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_13}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #13}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 If you use the -e flag, you get BUILD.LOG, BUILD.ERR and BUILD.WRN in the directory in which you invoked build.exe.
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_14}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #14}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Set BROWSER_INFO=1.
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_15}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #15}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 Yes. For more information, see {\uldb\cf11 Building Multiple Targets from One Subdirectory. }{\v Building_Multiple_Targets_from_One_Subdirectory}
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_16}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #16}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20
This may be more problematic than it's worth because you then get into issues where if the precompiled header changes, you've got to rebuild five subdirectories instead of just one. If you really want to do this, read {\uldb\cf11 makefile.def}{\v
makefile_def} or send email to Bryan Tuttle to answer questions about how to do it.
\par
\par
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} Answer_17}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} Answer #17}} Answer
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 No. You do not need to follow the same directory structure as Windows\~NT in which s{\f5 ource code is in project directories under $(}{\ul\cf11 BASEDIR}{\v BASEDIR}{\f5 )\\
private and shared libraries and headers are under $(}BASEDIR)\\{\f5 public}. You can specify the following macros in your sources file{\f5 . These macros enable you to eliminate the reliance on public}:
\par \pard \ri130\widctlpar {\f5\ul\cf11 BINPLACE_PLACEFILE}{\v\f5 BINPLACE_PLACEFILE}{\f5 \line }{\f5\uldb\cf11 COFFBASE_TXT_FILE}{\v\f5 COFFBASE_TXT_FILE}{\f5 \line }{\f5\ul\cf11 COMPILER_WARNINGS}{\v\f5 COMPILER_WARNINGS}{\f5 \line }{\ul\cf11 CRT_INC_PATH}{
\v CRT_INC_PATH}
\par {\ul\cf11 CRT_LIB_PATH}{\v CRT_LIB_PATH}
\par {\f5\uldb\cf11 MASTER_VERSION_FILE}{\v\f5 MASTER_VERSION_FILE}{\f5 \line }{\f5\ul\cf11 MFC_INC_PATH}{\v\f5 MFC_INC_PATH}{\f5 \line }{\f5\ul\cf11 MFC_LIB_PATH}{\v\f5 MFC_LIB_PATH}{\ul\cf11 \line OAK_INC_PATH}{\v OAK_INC_PATH}\line {\ul\cf11 SDK_INC_PATH}{
\v SDK_INC_PATH}
\par {\ul\cf11 SDK_LIB_PATH}{\v SDK_LIB_PATH}
\par \pard \ri130\sa240\widctlpar
\par \pard\plain \s1\li115\ri130\sb80\sa120\widctlpar \b\f7\kerning28 \page {\cs16\super #{\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {\cs16\super #} makefile0}} {\cs16\super ${\footnote \pard\plain \s15\ri130\sa240\widctlpar \f7\fs20 {
\cs16\super $} makefile0}} makefile0
\par \pard\plain \ri130\sa240\widctlpar \f7\fs20 This is a makefile you write that exists in the same subdirectory as a {\uldb\cf11 dirs file. }{\v DIRS_File}
It is typically used to build header files needed in the subdirectories. The Build utility will spawn nmake to execute this file before traversing the directory list in the dirs file.
\par
\par }