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.

117 lines
4.2 KiB

  1. @echo off
  2. title EFI - NT Emulation Environment
  3. REM #########################################################################
  4. REM #
  5. REM # Copyright (c) 1998 Intel Corporation
  6. REM #
  7. REM # Module Name:
  8. REM #
  9. REM # build.cmd
  10. REM #
  11. REM # Abstract:
  12. REM #
  13. REM # Initialize environment for EFI
  14. REM #
  15. REM # Revision History
  16. REM #
  17. REM #########################################################################
  18. REM #
  19. REM # The following five environment variables must be set correctly for
  20. REM # EFI to build correctly.
  21. REM #
  22. REM # EFI_SOURCE - The path to the root of the EFI source tree
  23. REM #
  24. REM # EFI_MSVCTOOLPATH - The path to the Microsft VC++ tools
  25. REM #
  26. REM # EFI_MASMPATH - The path to the MASM 6.11 tools
  27. REM #
  28. REM # EFI_DEBUG - YES for debug version, NO for free version
  29. REM #
  30. REM # EFI_BOOTSHELL - YES for booting directly to the EFI Shell
  31. REM #
  32. REM # EFI_SPLIT_CONSOLES - YES for including the ConSpliter Protocol
  33. REM #
  34. REM # EFI_FIRMWARE_REVISION - Integer build number of the firmware
  35. REM #
  36. REM #########################################################################
  37. set EFI_SOURCE=%cd%
  38. REM #########################################################################
  39. REM # VC++ 5.0 : set EFI_MSVCTOOLPATH=c:\Program Files\DevStudio\VC
  40. REM # VC++ 6.0 : set EFI_MSVCTOOLPATH=c:\Program Files\Microsoft Visual Studio\VC98
  41. REM #########################################################################
  42. if NOT %PROCESSOR_ARCHITECTURE% == %_BuildArch% goto fixup
  43. set EFI_MSVCTOOLPATH=%NTMAKEENV%\%PROCESSOR_ARCHITECTURE%
  44. set EFI_MASMPATH=%NTMAKEENV%\%PROCESSOR_ARCHITECTURE%
  45. :fixup
  46. if "%_BuildArch%" == "ia64" goto fixup2
  47. goto fixed
  48. :fixup2
  49. set EFI_MSVCTOOLPATH=%NTMAKEENV%\Win64\%PROCESSOR_ARCHITECTURE%
  50. set EFI_MASMPATH=%NTMAKEENV%\Win64\%PROCESSOR_ARCHITECTURE%
  51. :fixed
  52. set EFI_DEBUG=YES
  53. set EFI_BOOTSHELL=NO
  54. set EFI_SPLIT_CONSOLES=NO
  55. set EFI_FIRMWARE_REVISION=9
  56. REM #########################################################################
  57. REM # Echo settings to the screen
  58. REM #########################################################################
  59. cls
  60. echo ************************************************************************
  61. echo * E F I *
  62. echo * *
  63. echo * Extensible Firmware Interface *
  64. echo * Reference Implementation *
  65. echo * *
  66. echo * NT Emulation Environment *
  67. echo ************************************************************************
  68. echo * Supported Build Commands *
  69. echo ************************************************************************
  70. echo * nmake - Incremental compile and link *
  71. echo * nmake clean - Remove all OBJ, LIB, EFI, and EXE files *
  72. echo * nmake run - Execute EFI *
  73. echo ************************************************************************
  74. echo EFI_SOURCE=%EFI_SOURCE%
  75. echo EFI_MSVCTOOLPATH=%EFI_MSVCTOOLPATH%
  76. echo EFI_MASMPATH=%EFI_MASMPATH%
  77. echo EFI_DEBUG=%EFI_DEBUG%
  78. echo EFI_BOOTSHELL=%EFI_BOOTSHELL%
  79. echo EFI_SPLIT_CONSOLES=%EFI_SPLIT_CONSOLES%
  80. echo EFI_FIRMWARE_REVISION=%EFI_FIRMWARE_REVISION%
  81. REM #########################################################################
  82. REM # Generate additional settings
  83. REM #########################################################################
  84. set INCLUDE=%_NTDRIVE%%_NTROOT%\public\sdk\inc;%_NTDRIVE%%_NTROOT%\public\sdk\inc\crt
  85. path %EFI_MSVCTOOLPATH%\bin;%EFI_MASMPATH%\bin;%path%
  86. if "%PROCESSOR_ARCHITECTURE%" == "x86" goto x86lib
  87. set EFI_LIBPATH=%_NTDRIVE%%_NTROOT%\public\sdk\lib\%PROCESSOR_ARCHITECTURE%
  88. goto end
  89. :x86lib
  90. if "%_BuildArch%" == "ia64" goto fixlib
  91. set EFI_LIBPATH=%_NTDRIVE%%_NTROOT%\public\sdk\lib\i386
  92. goto end
  93. :fixlib
  94. set EFI_LIBPATH=%_NTDRIVE%%_NTROOT%\public\sdk\lib\ia64
  95. :end