cmd: Tidy up -help output
[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: 
27 REM   0x500 for Windows 2000 and above
28 REM   0x502 for Windows XP 64 and above
29 SET APPVER=0x500
30 SET _WIN32_IE=0x500
31
32 REM ########################################################################
33 REM Location of base folder where source lies, build directory
34 REM e.g. AFSROOT\SRC is source directory of the build tree (8.3 short name)
35 set AFSROOT=C:\SRC\OpenAFS
36
37 REM ########################################################################
38 REM NTMakefile required definitions:
39 REM     AFSVER_CL  = version of the Microsoft compiler:
40 REM                  "1200" for VC6
41 REM                  "1300" for VC7 (.NET)
42 REM                  "1310" for .NET 2003
43 REM                  "1400" for VC8 (VS2005)
44 set AFSVER_CL=1400
45
46 REM ########################################################################
47 REM NTMakefile optional definitions:
48 REM
49 REM See NTMakefile.SYS_NAME; will normally use defaults.
50 REM
51
52 IF [%HOMEDRIVE%]==[] SET HOMEDRIVE=C:
53
54 REM ########################################################################
55 REM Options necessary when using bison
56 REM
57
58 set BISON_SIMPLE=c:\bin\bison.simple
59 set BISON_HAIRY=c:\bin\bison.hairy
60
61 REM ########################################################################
62 REM Code Signing Definitions for signtool.exe
63
64 REM SET CODESIGN_DESC=OpenAFS for Windows
65 REM SET CODESIGN_TIMESTAMP=<URL for Time Stamp Service>
66 REM SET CODESIGN_URL=<Support URL displayed in Add/Remove Programs>
67
68 REM ########################################################################
69 REM Accept build type as an argument; default to checked.
70
71 if "%1"=="" goto checked
72 if "%1"=="checked" goto checked
73 if "%1"=="CHECKED" goto checked
74
75 if "%1"=="free" goto free
76 if "%1"=="FREE" goto free
77
78 goto usage
79
80 :checked
81 set AFSBLD_TYPE=CHECKED
82 set AFSDEV_CRTDEBUG=1
83 goto args_done
84
85 :free
86 set AFSBLD_TYPE=FREE
87 set AFSDEV_CRTDEBUG=0
88 goto args_done
89
90 :args_done
91
92 REM #######################################################################
93 REM Construct Variables Required for NTMakefile
94 REM     AFSDEV_BUILDTYPE = CHECKED / FREE 
95 REM     AFSDEV_INCLUDE = default include directories
96 REM     AFSDEV_LIB = default library directories
97 REM     AFSDEV_BIN = default build binary directories
98
99 set AFSDEV_BUILDTYPE=%AFSBLD_TYPE%
100
101 REM Location of Microsoft Visual C++ development folder (8.3 short name)
102 set MSVCDIR=c:\progra~1\MID05A~1\vc
103
104 REM Location of Microsoft Platform SDK (8.3 short name)
105 set MSSDKDIR=c:\progra~1\MIC977~1
106
107 REM Location of npapi.h (from DDK or Platform SDK samples - 8.3 short name)
108 set NTDDKDIR=C:\WINDDK\6000
109
110 REM Location of Microsoft IDN Normalization SDK
111 set MSIDNNLS=C:\progra~1\MI5913~1
112
113 set AFSDEV_INCLUDE=%MSSDKDIR%\include;%MSVCDIR%\include;%MSIDNNLS%\include
114 IF "%AFSVER_CL%" == "1400" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atlmfc\include
115 IF "%AFSVER_CL%" == "1310" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atlmfc\include
116 IF "%AFSVER_CL%" == "1300" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atlmfc\include
117 IF "%AFSVER_CL%" == "1200" set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%MSVCDIR%\atl\include;%MSVCDIR%\mfc\include
118 set AFSDEV_INCLUDE=%AFSDEV_INCLUDE%;%NTDDKDIR%\INC\DDK;%NTDDKDIR%\INC\API;
119
120 set AFSDEV_LIB=%MSSDKDIR%\lib;%MSVCDIR%\lib
121 IF "%AFSVER_CL%" == "1400" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
122 IF "%AFSVER_CL%" == "1310" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
123 IF "%AFSVER_CL%" == "1300" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\atlmfc\lib
124 IF "%AFSVER_CL%" == "1200" set AFSDEV_LIB=%AFSDEV_LIB%;%MSVCDIR%\mfc\lib
125
126 set AFSDEV_BIN=%MSSDKDIR%\bin;%MSVCDIR%\bin
127 goto end
128
129 :usage
130 echo.
131 echo Usage: %0 [free^|^checked^|^wspp]
132 echo.
133
134 :end