Windows NT 4.0 source code leak
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.

196 lines
4.0 KiB

4 years ago
  1. @echo off
  2. setlocal
  3. REM *********************************************************************
  4. REM
  5. REM (c) Copyright Microsoft Corp. 1992-1993 All Rights Reserved
  6. REM
  7. REM File:
  8. REM
  9. REM make.bat
  10. REM
  11. REM Purpose:
  12. REM
  13. REM oleprog project sample master make batch file.
  14. REM
  15. REM Description:
  16. REM
  17. REM Usage: run make with no arguments for usage.
  18. REM This batch file will set up all required variables and fire up
  19. REM makefile in each sample directories
  20. REM
  21. REM
  22. REM The structure of the SAMPLE direcoty is
  23. REM
  24. REM %OLEPROG%\SAMPLE The root of the directory
  25. REM |___DISPCALC makefile and .c** .h** files
  26. REM |___WIN32 Win32 .obj, .exe files
  27. REM |___WIN16 ..
  28. REM |___MAC ..
  29. REM |___MACPPC ..
  30. REM |___DISPDEMO Same as DISPCALC directory structure
  31. REM |___DSPCALC2 Same as DISPCALC directory structure
  32. REM |___HELLO Same as DISPCALC directory structure
  33. REM |___NLSSORT Same as DISPCALC directory structure
  34. REM |___SPOLY Same as DISPCALC directory structure
  35. REM |___SPOLY2 Same as DISPCALC directory structure
  36. REM |___TIBROWSE Same as DISPCALC directory structure
  37. REM ...
  38. REM
  39. REM
  40. REM Environment:
  41. REM
  42. REM oleprog, HOST must be set
  43. REM
  44. REM Revision History:
  45. REM
  46. REM [00] 02-Aug-94 t-issacl: Created
  47. REM
  48. REM *********************************************************************
  49. if '%oleprog%' == '' goto ERROR_BadEnv
  50. REM set VERS=2
  51. for %%a in ( win16 win32 mac macppc) do if "%1"=="%%a" goto %1
  52. :usage
  53. echo USAGE: make VERSION [SAMPLE] options
  54. echo where VERSION is:
  55. echo win16 Win16 build
  56. echo win32 Win32 build
  57. echo mac Mac build
  58. echo macppc PPC build
  59. echo.
  60. echo where SAMPLE is: (default to build all samples)
  61. echo one of (dispcalc, dispdemo, dspcalc2, hello, spoly,
  62. echo spoly2, tibrowse)
  63. echo.
  64. echo options will be passed to makefile by nmake
  65. echo "clean" option will clean up the target directory.
  66. echo.
  67. goto end
  68. :win16
  69. set BUILDBATCHFILE=..\mk16
  70. set MKTYPLIBSRC=%OLEPROG%\dwin32
  71. goto build
  72. :win32
  73. set BUILDBATCHFILE=..\mk32
  74. set MKTYPLIBSRC=%OLEPROG%\dwin32
  75. goto build
  76. :mac
  77. set BUILDBATCHFILE=..\mkmac
  78. set MKTYPLIBSRC=%OLEPROG%\dwin32
  79. goto build
  80. :macppc
  81. set BUILDBATCHFILE=..\mkppc
  82. set MKTYPLIBSRC=%OLEPROG%\dwin32
  83. goto build
  84. REM *********************************************************************
  85. REM here we call nmake to make it
  86. REM *********************************************************************
  87. :build
  88. set TESTBUILDALL=FALSE
  89. for %%a in (dispcalc dispdemo dspcalc2 hello nlssort spoly spoly2 tibrowse) do if "%2"=="%%a" goto NeedShift
  90. set TESTBUILDALL=TRUE
  91. goto dispcalc
  92. :NeedShift
  93. set TEMPFLAG=%2
  94. shift
  95. goto %TEMPFLAG%
  96. :dispcalc
  97. REM Build dispcalc
  98. cd dispcalc
  99. REM call %BUILDBATCHFILE% clean
  100. call %BUILDBATCHFILE% %2 %3 %4
  101. cd ..
  102. if "%TESTBUILDALL%"=="FALSE" goto end
  103. :dispdemo
  104. REM Build dispdemo
  105. cd dispdemo
  106. REM call %BUILDBATCHFILE% clean
  107. call %BUILDBATCHFILE% %2 %3 %4
  108. cd ..
  109. if "%TESTBUILDALL%"=="FALSE" goto end
  110. :dspcalc2
  111. REM Build dspcalc2
  112. cd dspcalc2
  113. REM call %BUILDBATCHFILE% clean
  114. copy %MKTYPLIBSRC%\oleaut32.dll
  115. copy %MKTYPLIBSRC%\mktyplib.exe
  116. copy %MKTYPLIBSRC%\stdole32.tlb
  117. call %BUILDBATCHFILE% %2 %3 %4
  118. cd ..
  119. if "%TESTBUILDALL%"=="FALSE" goto end
  120. :hello
  121. REM Build hello
  122. cd hello
  123. REM call %BUILDBATCHFILE% clean
  124. copy %MKTYPLIBSRC%\oleaut32.dll
  125. copy %MKTYPLIBSRC%\mktyplib.exe
  126. copy %MKTYPLIBSRC%\stdole32.tlb
  127. call %BUILDBATCHFILE% %2 %3 %4
  128. cd ..
  129. if "%TESTBUILDALL%"=="FALSE" goto end
  130. :nlssort
  131. REM Build nlssort
  132. cd nlssort
  133. REM call %BUILDBATCHFILE% clean
  134. call %BUILDBATCHFILE% %2 %3 %4
  135. cd ..
  136. if "%TESTBUILDALL%"=="FALSE" goto end
  137. :spoly
  138. REM Build spoly
  139. cd spoly
  140. REM call %BUILDBATCHFILE% clean
  141. call %BUILDBATCHFILE% %2 %3 %4
  142. cd ..
  143. if "%TESTBUILDALL%"=="FALSE" goto end
  144. :spoly2
  145. REM Build spoly2
  146. cd spoly2
  147. REM call %BUILDBATCHFILE% clean
  148. call %BUILDBATCHFILE% %2 %3 %4
  149. cd ..
  150. if "%TESTBUILDALL%"=="FALSE" goto end
  151. :tibrowse
  152. REM Build tibrowse
  153. cd tibrowse
  154. REM call %BUILDBATCHFILE% clean
  155. call %BUILDBATCHFILE% %2 %3 %4
  156. cd ..
  157. if "%TESTBUILDALL%"=="FALSE" goto end
  158. goto end
  159. :ERROR_BadEnv
  160. echo.
  161. echo Must set oleprog variable
  162. :end
  163. endlocal
  164. @echo on