1 Copyright 2000, International Business Machines Corporation and others.
4 This software has been released under the terms of the IBM Public
5 License. For details, see the LICENSE file in the top-level source
6 directory or online at http://www.openafs.org/dl/license10.html
8 Building OpenAFS on Windows NT
9 ------------------------------
11 There are several steps that must be performed before a successful
12 build of AFS on Windows NT can be completed. These steps are as follows:
15 B. Add missing header files
16 C. Optional: Install Installshield 5.x
17 D. Optional: Install flex and bison
18 E. Configure the OpenAFS build environment
21 Each step is explained in detail below:
25 You must install a copy of Microsoft Visual C++ 5.0 (6 might also
26 work). The "Typical" install setting is sufficient. It may be
27 possible to use other compilers, but the source code as provided
28 will work with MS VC++ 5.0.
30 B. Add missing header files
32 Files from Microsoft's Device Driver Development kits for NT and
33 Windows 9x are required to complete a build on NT. They are
34 copyrighted by Microsoft and so cannot be included with the OpenAFS
35 source tree. These files are:
41 These files come from Microsoft DDKs as follows:
43 January 1997 Windows NT Workstation DDK - /ddk/frc/network/inc/npapi.h
44 July 1998 Windows 95 DDK - net/inc/netmpr.h and net/inc/netspi.h
46 The may also be available on more recent releases of the DDKs.
47 These files must live on the include path.
49 C. Optional: Install Installshield 5.x
51 There are two ways to build OpenAFS on NT:
52 1. Build of the product, or
53 2. build of the product plus an installer package
55 In order to do the build that includes the installer package, a
56 copy of InstallShield 5.x must be installed. NOTE: InstallShield
57 versions 6 and higher WILL NOT WORK.
59 D. Optional: Install flex and bison
61 There are two files in the source tree that are processed with lex
62 and yacc on UNIX systems, src/comerr/et_lex.lex.l and
63 src/comerr/error_table.y, that when processed produce the files
64 et_lex.lex_nt.c, error_table_nt.c, and error_table_nt.h.
66 Since NT does not include lex and yacc or any equivalent tools, we
67 have provided the output files that lex and yacc produce (using
68 Win32 ports of flex and bison). This will allow builds to work for
69 anyone who does not need to change the .l and .y files.
71 If you do need to change et_lex.lex.l, then you will need to
72 install Win32 port of flex on your system. Put flex.exe in a
73 directory on the path and rebuild.
75 If you do need to change error_table.y, then you will need to
76 install a Win32 port of bison on your system. Put bison.exe in a
77 directory on the path, configure bison as explained in step 5, and
80 You can also attempt to use other replacements for lex and yacc.
81 This will require modifying the LEX and YACC settings in
82 src/config/NTMakefile.i386_nt40. If the replacements require
83 different command line options than flex and bison, then you may
84 also need to change src/comerr/NTMakefile.
86 E. Configure the OpenAFS build environment
88 A set of environment variables used by the OpenAFS makefiles must
89 be properly set for a build to successfully complete. The file
90 src/ntbuild.bat is a DOS-style batch file that will configure these
91 settings for you. Within this file there are the following lines
92 that must be set to match your system settings:
94 set MSVCDIR=<path to vc directory of MS Visual C++>
95 Ex: set MSVCDIR=c:\progra~1\DevStudio\vc
97 This is the path to the compiler directory of the Microsot Visual
100 set AFSDEV_INCLUDE=<default include directories>
101 Ex: set AFSDEV_INCLUDE=%MSVCDIR%\include;%MSVCDIR%\mfc\include
103 This contains a semicolon separated list of directories that
104 contain compiler provided include files. You do not need to add paths
105 here of AFS include files.
107 set AFSDEV_LIB=<default library directories>
108 Ex: set AFSDEV_LIB=%MSVCDIR%\lib;%MSVCDIR%\mfc\lib
110 This contains a semicolon separated list of directories that
111 contain compiler provided library files. You do not need to add
112 paths here of AFS library files.
114 set AFSDEV_BIN=<compiler binaries directory>
115 Ex: set AFSDEV_BIN=%MSVCDIR%\bin
117 This is the path to the compiler binary files.
119 set AFSROOT=<Root directory of OpenAFS - parent of the src directory>
120 Ex: set AFSROOT=d:\OpenAFS
122 This is the root directory of OpenAFS, which is the parent
123 directory of the src directory.
125 set IS5ROOT=<root directory of the InstallShield5 program files>
126 Ex: set IS5ROOT=d:\progra~1\instal~1\instal~1.1pr
128 This is the path to the InstallShield5 program directory. You
129 should only define this if you have InstallShield installed on
130 your computer and want to create the install package as part of
133 set BISON_SIMPLE=<path to bison.simple>
134 set BISON_HAIRY=<path to bison.hairy>
135 Ex: set BISON_SIMPLE=c:\bin\bison.simple
136 Ex: set BISON_HAIRY=c:\bin\bison.hairy
138 bison has two files (in addition to the bison executable) that
139 must be on the system. In order for bison to find these files,
140 you must set the environment variables listed above to the paths
141 to these files. There are other ways to do this, but this is
142 what the build system expects.
144 NOTE: There are other settings in ntbuild.bat, but the ones listed
145 above must be set correctly for the build to succeed.
147 As can be seen in the examples above, all paths in ntbuild.bat must
148 be in the old MSDOS 8.3 format.
152 1. Make sure you are running the default NT command shell, cmd.exe.
153 Other shells may work, but many do not.
155 2. Run the ntbuild.bat file that was configured in step 5. You can
156 include the word "checked" on the command line to create binaries
157 that include debug information, or the word "free" to create
158 binaries that do not include debug information.
160 For a debug build, run:
163 For a release build, run:
166 3. Copy the file src/NTMakefile to the parent of the src directory.
167 You only need to do this once.
169 4. Begin the build. You can choose to build just the product bits,
170 or, if InstallShield is installed, the product bits and the
173 To build just the product bits, run:
174 nmake /f NTMakefile install
176 To build the product bits and the install package, run:
177 nmake /f NTMakefile media