Source code of Windows XP (NT5)
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.

106 lines
2.6 KiB

  1. @echo off
  2. setlocal
  3. set _targetcpu=
  4. set _mbflg=MB
  5. if "%1" == "MB" (set _mbflg=MB) && shift
  6. if "%1" == "Mb" (set _mbflg=MB) && shift
  7. if "%1" == "mb" (set _mbflg=MB) && shift
  8. if "%1" == "Kanji" (set _mbflg=KANJI) && shift
  9. if "%1" == "Kanji" (set _mbflg=KANJI) && shift
  10. if "%1" == "Kanji" (set _mbflg=KANJI) && shift
  11. if "%1" == "-alpha" set _targetcpu=alpha
  12. if "%1" == "alpha" set _targetcpu=alpha
  13. if "%1" == "ALPHA" set _targetcpu=alpha
  14. if "%1" == "-mips" set _targetcpu=mips
  15. if "%1" == "mips" set _targetcpu=mips
  16. if "%1" == "MIPS" set _targetcpu=mips
  17. if "%1" == "-i386" set _targetcpu=386
  18. if "%1" == "-386" set _targetcpu=386
  19. if "%1" == "386" set _targetcpu=386
  20. if "%1" == "i386" set _targetcpu=386
  21. if "%_targetcpu%" == "" goto bogus
  22. set _buildopts=-%_targetcpu% %2 %3 %4 %5 %6 %7 %8 %9
  23. set crttree=..\crt32nt
  24. set fptree=..\fp32nt
  25. set libdir=..\libnt
  26. cd %fptree%.nt
  27. echo Building NT Subset of Single Thread C Floating Point Runtimes
  28. call buildcrt nt %_buildopts%
  29. cd %crttree%.nt
  30. echo Building NT Subset of Single Thread C Runtimes (excluding FP)
  31. call buildcrt %_mbflg% nt %_buildopts%
  32. cd %fptree%.st
  33. echo Building Single Thread C Floating Point Runtimes
  34. call buildcrt st %_buildopts%
  35. cd %crttree%.st
  36. echo Building Single Thread C Runtimes (excluding FP)
  37. call buildcrt %_mbflg% st %_buildopts%
  38. cd %fptree%
  39. echo Building Multi-Thread C Floating Point Runtimes
  40. call buildcrt mt %_buildopts%
  41. cd %crttree%
  42. echo Building Multi-Thread C Runtimes (excluding FP)
  43. call buildcrt %_mbflg% mt %_buildopts%
  44. cd %fptree%.dll
  45. echo Building DLL C Floating Point Runtimes
  46. call buildcrt dll %_buildopts%
  47. cd %crttree%.dll
  48. echo Building DLL C Runtimes (excluding FP)
  49. call buildcrt %_mbflg% dll %_buildopts%
  50. cd %crttree%.psx
  51. echo Building POSIX C Runtimes (excluding FP)
  52. call buildcrt posix %_buildopts%
  53. :buildlibs
  54. if "%_targetcpu%" == "mips" goto linkmips
  55. if "%_targetcpu%" == "alpha" goto linkalpha
  56. cd %libdir%
  57. echo Building libcnt.lib libc.lib libcmt.lib libcpsx.lib crtdll.lib crtdll.dll for i386
  58. if "%_mbflg%" == "KANJI" goto mb386
  59. nmake 386=1
  60. goto done
  61. :mb386
  62. nmake 386=1 KANJIBLD=1
  63. goto done
  64. :linkmips
  65. cd %libdir%
  66. echo Building libcnt.lib libc.lib libcmt.lib libcpsx.lib crtdll.lib crtdll.dll for MIPS
  67. if "%_mbflg%" == "KANJI" goto mbmips
  68. nmake MIPS=1
  69. goto done
  70. :mbmips
  71. nmake MIPS=1 KANJIBLD=1
  72. goto done
  73. :linkalpha
  74. cd %libdir%
  75. echo Building libcnt.lib libc.lib libcmt.lib libcpsx.lib crtdll.lib crtdll.dll for ALPHA
  76. if "%_mbflg%" == "KANJI" goto mbalpha
  77. nmake ALPHA=1
  78. goto done
  79. :mbalpha
  80. nmake ALPHA=1 KANJIBLD=1
  81. goto done
  82. :bogus
  83. echo Usage: BUILDALL [MB or KANJI] (386 or MIPS or ALPHA) [BuildOptions]
  84. :done
  85. endlocal