cpp-fixes-20080630
[openafs.git] / src / ntbuild.bat
1 rem Copyright 2000, International Business Machines Corporation and others.
2 rem All Rights Reserved.
3 rem 
4 rem This software has been released under the terms of the IBM Public
5 rem License.  For details, see the LICENSE file in the top-level source
6 rem directory or online at http://www.openafs.org/dl/license10.html
7
8
9 REM AFS build environment variables for Windows NT.
10 REM Modify for local configuration; common defaults shown.
11 REM ########################################################################
12
13 REM ########################################################################
14 REM NOTE: You will need to copy the NLS files into your windows\system32 
15 REM directory prior to building non-english files.
16 REM
17 REM ########################################################################
18
19
20 REM ########################################################################
21 REM General required definitions:
22 REM     SYS_NAME = AFS system name
23 REM Choose one of "i386_w2k", "amd64_w2k", or "i64_w2k"
24 SET SYS_NAME=i386_w2k
25
26 REM Specify the targeted version of Windows and IE: 0x400 for Win9x/NT4 
27 REM and above; 0x500 for Windows 2000 and above
28 SET _WIN32_IE=0x400
29
30 REM ########################################################################
31 REM Location of base folder where source lies, build directory
32 REM e.g. AFSROOT\SRC is source directory of the build tree (8.3 short name)
33 set AFSROOT=C:\SRC\OpenAFS
34
35 REM ########################################################################
36 REM NTMakefile required definitions:
37 REM     AFSVER_CL  = version of the Microsoft compiler:
38 REM                  "1200" for VC6
39 REM                  "1300" for VC7 (.NET)
40 REM                  "1310" for .NET 2003
41 REM                  "1400" for VC8
42 set AFSVER_CL=1310
43
44 REM Location of Microsoft Visual C++ development folder (8.3 short name)
45 set MSVCDIR=c:\progra~1\micros~2\vc98
46
47 REM Location of Microsoft Platform SDK (8.3 short name)
48 set MSSDKDIR=c:\progra~1\micros~4
49
50 REM Location of npapi.h (from DDK or Platform SDK samples - 8.3 short name)
51 set NTDDKDIR=c:\progra~1\micros~5
52
53 REM Location of netmpr.h/netspi.h (from Windows 95/98 DDK - 8.3 short name)
54 SET W9XDDKDIR=c:\progra~1\micros~6
55
56 REM Location of Microsoft IDN Normalization SDK
57 set MSIDNNLS=C:\progra~1\MI5913~1
58
59 REM ########################################################################
60 REM NTMakefile optional definitions:
61 REM
62 REM See NTMakefile.SYS_NAME; will normally use defaults.
63 REM
64
65 IF [%HOMEDRIVE%]==[] SET HOMEDRIVE=C:
66
67 REM ########################################################################
68 REM Options necessary when using bison
69 REM
70
71 set BISON_SIMPLE=c:\bin\bison.simple
72 set BISON_HAIRY=c:\bin\bison.hairy
73
74 REM ########################################################################
75 REM Accept build type as an argument; default to checked.
76
77 if "%1"=="" goto checked
78 if "%1"=="checked" goto checked
79 if "%1"=="CHECKED" goto checked
80
81 if "%1"=="free" goto free
82 if "%1"=="FREE" goto free
83
84 goto usage
85
86 :checked
87 set AFSBLD_TYPE=CHECKED
88 set AFSDEV_CRTDEBUG=1
89 goto ifs_arg
90
91 :free
92 set AFSBLD_TYPE=FREE
93 set AFSDEV_CRTDEBUG=0
94 goto ifs_arg
95
96 :ifs_arg
97
98 set AFSIFS=
99 if "%2"=="ifs" goto is_ifs
100 if "%2"=="IFS" goto is_ifs
101
102 goto args_done
103
104 :is_ifs
105
106 set AFSIFS=TRUE
107
108 :args_done
109
110 REM #######################################################################
111 REM Construct Variables Required for NTMakefile
112 REM     AFSDEV_BUILDTYPE = CHECKED / FREE 
113 REM     AFSDEV_INCLUDE = default include directories
114 REM     AFSDEV_LIB = default library directories
115 REM     AFSDEV_BIN = default build binary directories
116
117 set AFSDEV_BUILDTYPE=%AFSBLD_TYPE%
118
119 set AFSDEV_INCLUDE=%MSSDKDIR%\include;%MSVCDIR%\include;%MSIDNNLS%\include
120 IF "%AFSVER_CL%" == "1400" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atlmfc\include
121 IF "%AFSVER_CL%" == "1310" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atlmfc\include
122 IF "%AFSVER_CL%" == "1300" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atlmfc\include
123 IF "%AFSVER_CL%" == "1200" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atl\include;%MSVCDIR%\mfc\include
124 set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%NTDDKDIR%\include;%W9XDDKDIR%\include
125
126 set AFSDEV_LIB=%MSSDKDIR%\lib;%MSVCDIR%\lib
127 IF "%AFSVER_CL%" == "1400" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
128 IF "%AFSVER_CL%" == "1310" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
129 IF "%AFSVER_CL%" == "1300" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
130 IF "%AFSVER_CL%" == "1200" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\mfc\lib
131
132 set AFSDEV_BIN=%MSSDKDIR%\bin;%MSVCDIR%\bin
133
134 goto end
135
136 :usage
137 echo.
138 echo Usage: %0 [free^|^checked^|^wspp]
139 echo.
140
141 :end