sunx86-59-sysname-id-20040324
[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 goto usage
86
87 :checked
88 set AFSBLD_TYPE=CHECKED
89 set AFSDEV_CRTDEBUG=1
90 goto args_done
91
92 :free
93 set AFSBLD_TYPE=FREE
94 set AFSDEV_CRTDEBUG=0
95 goto args_done
96
97 :args_done
98
99 REM #######################################################################
100 REM Construct Variables Required for NTMakefile
101 REM     AFSDEV_BUILDTYPE = CHECKED / FREE 
102 REM     AFSDEV_INCLUDE = default include directories
103 REM     AFSDEV_LIB = default library directories
104 REM     AFSDEV_BIN = default build binary directories
105
106 set AFSDEV_BUILDTYPE=%AFSBLD_TYPE%
107
108 set AFSDEV_INCLUDE=%MSSDKDIR%\include;%MSVCDIR%\include
109 IF "%AFSVER_CL%" == "1310" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atlmfc\include
110 IF "%AFSVER_CL%" == "1300" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atlmfc\include
111 IF "%AFSVER_CL%" == "1200" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atl\include;%MSVCDIR%\mfc\include
112 set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%NTDDKDIR%\include;%W9XDDKDIR%\include
113
114 set AFSDEV_LIB=%MSSDKDIR%\lib;%MSVCDIR%\lib
115 IF "%AFSVER_CL%" == "1310" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
116 IF "%AFSVER_CL%" == "1300" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
117 IF "%AFSVER_CL%" == "1200" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\mfc\lib
118
119 set AFSDEV_BIN=%MSSDKDIR%\bin;%MSVCDIR%\bin
120
121 goto end
122
123 :usage
124 echo.
125 echo Usage: %0 [free^|^checked^|^wspp]
126 echo.
127
128 :end