Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.8 KiB

  1. @if "%_echo%" == "" echo off
  2. @rem
  3. @rem If no drive has been specified for the NT development tree, assume
  4. @rem C:. To override this, place a SET _NTDRIVE=X: in your CONFIG.SYS
  5. @rem
  6. if "%_NTDRIVE%" == "" set _NTDRIVE=C:
  7. @rem
  8. @rem If no directory has been specified for the NT development tree, assume
  9. @rem \nt. To override this, place a SET _NTROOT=\xt in your CONFIG.SYS
  10. @rem
  11. if "%_NTROOT%" == "" set _NTROOT=\NT
  12. set _NTBINDIR=%_NTDRIVE%%_NTROOT%
  13. @rem
  14. @rem This command file assumes that the developer has already defined
  15. @rem the USERNAME environment variable to match their email name (e.g.
  16. @rem stevewo).
  17. @rem
  18. @rem We want to remember some environment variables so we can restore later
  19. @rem if necessary (see NTUSER.CMD)
  20. @rem
  21. set _NTUSER=%USERNAME%
  22. @rem
  23. @rem No hidden semantics of where to get libraries and include files. All
  24. @rem information is included in the command lines that invoke the compilers
  25. @rem and linkers.
  26. @rem
  27. set LIB=
  28. set INCLUDE=
  29. @rem
  30. @rem Setup default build parameters.
  31. @rem
  32. @rem If the user doesn't specify the BUILD_DEFAULT_TARGETS, use either -386
  33. @rem (for X86 NT or Win9x hosted builds) or the same as the processor_architecture.
  34. @rem Also set the default architecture to 1 so naked nmake's work from the cmdline.
  35. @rem
  36. if NOT "%BUILD_DEFAULT_TARGETS%" == "" goto BuildDefaultTargetSet
  37. if NOT "%_BuildArch%" == "" goto _BuildArchSet
  38. if "%_BuildArch%" == "" set _BuildArch=%PROCESSOR_ARCHITECTURE%
  39. if "%PROCESSOR_ARCHITECTURE%" == "x86" set 386=1
  40. :_BuildArchSet
  41. set BUILD_DEFAULT_TARGETS=-%_BuildArch%
  42. :BuildDefaultTargetSet
  43. if "%_BuildArch%" == "x86" goto UseX86BuildDefault
  44. if "%_BuildArch%" == "arm" goto UsePocketPCBuildDefault
  45. set BUILD_DEFAULT=daytona ~win95 ~w95cpp ~w95c ~w5api ~chicago -e -E -w -g -nmake -i
  46. set NO_MAPSYM=1
  47. goto BuildDefaultSet
  48. :UsePocketPCBuildDefault
  49. set BUILD_DEFAULT=pocketpc ~daytona ~win9x ~win95 ~w95cpp ~w95c ~w5api ~chicago -e -E -w -g -nmake -i
  50. goto BuildDefaultSet
  51. :UseX86BuildDefault
  52. set BUILD_DEFAULT=daytona -e -E -w -g -nmake -i
  53. :BuildDefaultSet
  54. if "%BUILD_MAKE_PROGRAM%" == "" set BUILD_MAKE_PROGRAM=nmake.exe
  55. if "%BUILD_PRODUCT%" == "" set BUILD_PRODUCT=NT
  56. if "%BUILD_PRODUCT_VER%" == "" set BUILD_PRODUCT_VER=500
  57. if "%NUMBER_OF_PROCESSORS%" == "" goto SingleProc
  58. if "%NUMBER_OF_PROCESSORS%" == "1" goto SingleProc
  59. set BUILD_MULTIPROCESSOR=1
  60. :SingleProc
  61. @rem
  62. @rem Setup default nmake parameters.
  63. @rem
  64. if "%NTMAKEENV%" == "" set NTMAKEENV=%_NTBINDIR%\Tools
  65. if "%COPYCMD%" == "" set COPYCMD=/Y
  66. @rem
  67. @rem By default, net uses are NOT persistent. Do this here in case
  68. @rem user wants to override in their setenv.cmd
  69. @rem
  70. net use /PER:NO >nul
  71. @rem
  72. @rem Setup the user specific environment information
  73. @rem
  74. call %_NTBINDIR%\TOOLS\ntuser.cmd
  75. @rem
  76. @rem Optional parameters to this script are command line to execute
  77. @rem
  78. %1 %2 %3 %4 %5 %6 %7 %8 %9