import-fs-formatting-to-windows-20031207
[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
15 REM NOTE: You should run NTLANG.REG before attempting to build localized
16 REM language files! Failure to do so will cause the resource compiler
17 REM and message-catalog compiler to choke when they hit unknown code pages.
18 REM
19 REM NOTE: You will need to copy the NLS files into your windows\system32 
20 REM directory prior to building non-english files.
21 REM
22 REM ########################################################################
23
24
25 REM ########################################################################
26 REM General required definitions:
27 REM     SYS_NAME = AFS system name
28 REM Choose one of "i386_win95" or "i386_nt40"
29 SET SYS_NAME=i386_nt40
30
31 REM Specify the targeted version of Windows and IE: 0x400 for Win9x/NT4 
32 REM and above; 0x500 for Windows 2000 and above
33 SET _WIN32_IE=0x400
34
35 REM ########################################################################
36 REM Location of base folder where source lies, build directory
37 REM e.g. AFSROOT\SRC is source directory of the build tree (8.3 short name)
38 set AFSROOT=D:\Dev\AfsSorce\OpenAF~2.2
39
40 REM ########################################################################
41 REM NTMakefile required definitions:
42 REM     AFSVER_CL  = version of the Microsoft compiler:
43 REM                  "1200" for VC6
44 REM                  "1300" for VC7 (.NET)
45 REM                  "1310" for .NET 2003
46 set AFSVER_CL=1200
47
48 REM Location of Microsoft Visual C++ development folder (8.3 short name)
49 set MSVCDIR=c:\progra~1\micros~2\vc98
50
51 REM Location of Microsoft Platform SDK (8.3 short name)
52 set MSSDKDIR=c:\progra~1\micros~4
53
54 REM Location of npapi.h (from DDK or Platform SDK samples - 8.3 short name)
55 set NTDDKDIR=c:\progra~1\micros~5
56
57 REM Location of netmpr.h/netspi.h (from Windows 95/98 DDK - 8.3 short name)
58 SET W9XDDKDIR=c:\progra~1\micros~6
59
60 REM ########################################################################
61 REM NTMakefile optional definitions:
62 REM
63 REM See NTMakefile.SYS_NAME; will normally use defaults.
64 REM
65
66 IF [%HOMEDRIVE%]==[] SET HOMEDRIVE=C:
67
68 REM ########################################################################
69 REM Options necessary when using bison
70 REM
71
72 set BISON_SIMPLE=c:\bin\bison.simple
73 set BISON_HAIRY=c:\bin\bison.hairy
74
75 REM ########################################################################
76 REM Accept build type as an argument; default to checked.
77
78 if "%1"=="" goto checked
79 if "%1"=="checked" goto checked
80 if "%1"=="CHECKED" goto checked
81
82 if "%1"=="free" goto free
83 if "%1"=="FREE" goto free
84
85 if "%1"=="wspp" goto wspp
86 if "%1"=="WSPP" goto wspp
87
88 goto usage
89
90 :checked
91 set AFSBLD_TYPE=CHECKED
92 set AFSBLD_IS_WSPP=
93 set AFSDEV_CRTDEBUG=1
94 goto args_done
95
96 :free
97 set AFSBLD_TYPE=FREE
98 set AFSBLD_IS_WSPP=
99 set AFSDEV_CRTDEBUG=0
100 goto args_done
101
102 :wspp
103 set AFSBLD_TYPE=FREE
104 set AFSBLD_IS_WSPP=1
105 set AFSDEV_CRTDEBUG=0
106 goto args_done
107
108
109 :args_done
110
111 REM #######################################################################
112 REM Construct Variables Required for NTMakefile
113 REM     AFSDEV_BUILDTYPE = CHECKED / FREE 
114 REM     AFSDEV_INCLUDE = default include directories
115 REM     AFSDEV_LIB = default library directories
116 REM     AFSDEV_BIN = default build binary directories
117
118 set AFSDEV_BUILDTYPE=%AFSBLD_TYPE%
119
120 set AFSDEV_INCLUDE=%MSSDKDIR%\include;%MSVCDIR%\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%" == "1310" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
128 IF "%AFSVER_CL%" == "1300" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
129 IF "%AFSVER_CL%" == "1200" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\mfc\lib
130
131 set AFSDEV_BIN=%MSSDKDIR%\bin;%MSVCDIR%\bin
132
133 goto end
134
135 :usage
136 echo.
137 echo Usage: %0 [free^|^checked^|^wspp]
138 echo.
139
140 :end