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.

147 lines
3.2 KiB

  1. @echo off
  2. if Test%BUILD_ALT_DIR%==Test goto usage
  3. ::# /M 2 for multiple cores
  4. set BUILD_CMD=build -bcwgZ -M2
  5. set PWD=%~dp0
  6. ::# Set target platform type
  7. set ARCH_DIR=%_BUILDARCH%
  8. if /I Test%_BUILDARCH%==Testx86 set ARCH_DIR=i386
  9. ::# MS-SYS Library
  10. cd src\ms-sys
  11. if EXIST Makefile ren Makefile Makefile.hide
  12. copy .msvc\ms-sys_sources sources >NUL 2>&1
  13. @echo on
  14. %BUILD_CMD%
  15. @echo off
  16. if errorlevel 1 goto builderror
  17. copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\ms-sys.lib . >NUL 2>&1
  18. if EXIST Makefile.hide ren Makefile.hide Makefile
  19. if EXIST sources del sources >NUL 2>&1
  20. ::# SysLinux libfat Library
  21. cd ..\syslinux\libfat
  22. if EXIST Makefile ren Makefile Makefile.hide
  23. copy .msvc\libfat_sources sources >NUL 2>&1
  24. @echo on
  25. %BUILD_CMD%
  26. @echo off
  27. if errorlevel 1 goto builderror
  28. copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\libfat.lib . >NUL 2>&1
  29. if EXIST Makefile.hide ren Makefile.hide Makefile
  30. if EXIST sources del sources >NUL 2>&1
  31. ::# SysLinux libinstaller Library
  32. cd ..\libinstaller
  33. if EXIST Makefile ren Makefile Makefile.hide
  34. copy .msvc\libinstaller_sources sources >NUL 2>&1
  35. @echo on
  36. %BUILD_CMD%
  37. @echo off
  38. if errorlevel 1 goto builderror
  39. copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\libinstaller.lib . >NUL 2>&1
  40. if EXIST Makefile.hide ren Makefile.hide Makefile
  41. if EXIST sources del sources >NUL 2>&1
  42. ::# libcdio iso9660 Library
  43. cd ..\..\libcdio\iso9660
  44. if EXIST Makefile ren Makefile Makefile.hide
  45. copy .msvc\iso9660_sources sources >NUL 2>&1
  46. @echo on
  47. %BUILD_CMD%
  48. @echo off
  49. if errorlevel 1 goto builderror
  50. copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\iso9660.lib . >NUL 2>&1
  51. if EXIST Makefile.hide ren Makefile.hide Makefile
  52. if EXIST sources del sources >NUL 2>&1
  53. ::# libcdio udf Library
  54. cd ..\udf
  55. if EXIST Makefile ren Makefile Makefile.hide
  56. copy .msvc\udf_sources sources >NUL 2>&1
  57. @echo on
  58. %BUILD_CMD%
  59. @echo off
  60. if errorlevel 1 goto builderror
  61. copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\udf.lib . >NUL 2>&1
  62. if EXIST Makefile.hide ren Makefile.hide Makefile
  63. if EXIST sources del sources >NUL 2>&1
  64. ::# libcdio driver Library
  65. cd ..\driver
  66. if EXIST Makefile ren Makefile Makefile.hide
  67. copy .msvc\driver_sources sources >NUL 2>&1
  68. @echo on
  69. %BUILD_CMD%
  70. @echo off
  71. if errorlevel 1 goto builderror
  72. copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\driver.lib . >NUL 2>&1
  73. if EXIST Makefile.hide ren Makefile.hide Makefile
  74. if EXIST sources del sources >NUL 2>&1
  75. ::# getopt Library
  76. cd ..\..\getopt
  77. if EXIST Makefile ren Makefile Makefile.hide
  78. copy .msvc\getopt_sources sources >NUL 2>&1
  79. @echo on
  80. %BUILD_CMD%
  81. @echo off
  82. if errorlevel 1 goto builderror
  83. copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\getopt.lib . >NUL 2>&1
  84. if EXIST Makefile.hide ren Makefile.hide Makefile
  85. if EXIST sources del sources >NUL 2>&1
  86. ::# Rufus Application
  87. cd ..
  88. if EXIST Makefile ren Makefile Makefile.hide
  89. copy .msvc\rufus_sources sources >NUL 2>&1
  90. @echo on
  91. %BUILD_CMD%
  92. @echo off
  93. if errorlevel 1 goto builderror
  94. copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\rufus.exe .. >NUL 2>&1
  95. if EXIST Makefile.hide ren Makefile.hide Makefile
  96. if EXIST sources del sources >NUL 2>&1
  97. goto done
  98. :builderror
  99. if EXIST Makefile.hide ren Makefile.hide Makefile
  100. if EXIST sources del sources >NUL 2>&1
  101. echo Build failed
  102. goto done
  103. :usage
  104. echo This command must be run in a Windows Driver Kit build environment.
  105. echo See: http://msdn.microsoft.com/en-us/windows/hardware/gg487463
  106. echo:
  107. pause
  108. :done
  109. cd %PWD%