build_it.bat 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. @echo off
  2. rem Generic batch file to build a version of the library. This batch file
  3. rem assumes that the correct batch files exist to setup the appropriate
  4. rem compilation environments, and that the DMAKE.EXE program is available
  5. rem somewhere on the path.
  6. rem
  7. rem Builds as release or debug depending on the value of the CHECKED
  8. rem environment variable.
  9. rem Unset all environment variables that change the compile process
  10. set DBG=
  11. set OPT=
  12. set OPT_SIZE=
  13. set BUILD_DLL=
  14. set IMPORT_DLL=
  15. set FPU=
  16. set CHECKS=
  17. set BETA=
  18. if %1==bc31-d16 goto bc31-d16
  19. if %1==bc45-d16 goto bc45-d16
  20. if %1==bc45-d32 goto bc45-d32
  21. if %1==bc45-tnt goto bc45-tnt
  22. if %1==bc45-w16 goto bc45-w16
  23. if %1==bc45-w32 goto bc45-w32
  24. if %1==bc45-c32 goto bc45-c32
  25. if %1==bc45-vxd goto bc45-vxd
  26. if %1==bc45-snp goto bc45-snp
  27. if %1==bc50-d16 goto bc50-d16
  28. if %1==bc50-d32 goto bc50-d32
  29. if %1==bc50-tnt goto bc50-tnt
  30. if %1==bc50-w16 goto bc50-w16
  31. if %1==bc50-w32 goto bc50-w32
  32. if %1==bc50-c32 goto bc50-c32
  33. if %1==bc50-vxd goto bc50-vxd
  34. if %1==bc50-snp goto bc50-snp
  35. if %1==gcc2-d32 goto gcc2-d32
  36. if %1==gcc2-w32 goto gcc2-w32
  37. if %1==gcc2-c32 goto gcc2-c32
  38. if %1==gcc2-linux goto gcc2-linux
  39. if %1==vc40-d16 goto vc40-d16
  40. if %1==vc40-tnt goto vc40-tnt
  41. if %1==vc40-w16 goto vc40-w16
  42. if %1==vc40-w32 goto vc40-w32
  43. if %1==vc40-c32 goto vc40-c32
  44. if %1==vc40-drv9x goto vc40-drv9x
  45. if %1==vc40-drvnt goto vc40-drvnt
  46. if %1==vc40-rtt goto vc40-rtt
  47. if %1==vc40-snp goto vc40-snp
  48. if %1==vc50-d16 goto vc50-d16
  49. if %1==vc50-tnt goto vc50-tnt
  50. if %1==vc50-w16 goto vc50-w16
  51. if %1==vc50-w32 goto vc50-w32
  52. if %1==vc50-c32 goto vc50-c32
  53. if %1==vc50-drv9x goto vc50-drv9x
  54. if %1==vc50-drvnt goto vc50-drvnt
  55. if %1==vc50-rtt goto vc50-rtt
  56. if %1==vc50-snp goto vc50-snp
  57. if %1==vc60-d16 goto vc60-d16
  58. if %1==vc60-tnt goto vc60-tnt
  59. if %1==vc60-w16 goto vc60-w16
  60. if %1==vc60-w32 goto vc60-w32
  61. if %1==vc60-c32 goto vc60-c32
  62. if %1==vc60-drv9x goto vc60-drv9x
  63. if %1==vc60-drvnt goto vc60-drvnt
  64. if %1==vc60-drvw2k goto vc60-drvw2k
  65. if %1==vc60-rtt goto vc60-rtt
  66. if %1==vc60-snp goto vc60-snp
  67. if %1==wc10ad16 goto wc10ad16
  68. if %1==wc10ad32 goto wc10ad32
  69. if %1==wc10atnt goto wc10atnt
  70. if %1==wc10aw16 goto wc10aw16
  71. if %1==wc10aw32 goto wc10aw32
  72. if %1==wc10ac32 goto wc10ac32
  73. if %1==wc10ao32 goto wc10ao32
  74. if %1==wc10ap32 goto wc10ap32
  75. if %1==wc10asnp goto wc10asnp
  76. if %1==wc10-d16 goto wc10-d16
  77. if %1==wc10-d32 goto wc10-d32
  78. if %1==wc10-tnt goto wc10-tnt
  79. if %1==wc10-w16 goto wc10-w16
  80. if %1==wc10-w32 goto wc10-w32
  81. if %1==wc10-c32 goto wc10-c32
  82. if %1==wc10-o32 goto wc10-o32
  83. if %1==wc10-p32 goto wc10-p32
  84. if %1==wc10-snp goto wc10-snp
  85. if %1==wc11-d16 goto wc11-d16
  86. if %1==wc11-d32 goto wc11-d32
  87. if %1==wc11-tnt goto wc11-tnt
  88. if %1==wc11-w16 goto wc11-w16
  89. if %1==wc11-w32 goto wc11-w32
  90. if %1==wc11-c32 goto wc11-c32
  91. if %1==wc11-o32 goto wc11-o32
  92. if %1==wc11-p32 goto wc11-p32
  93. if %1==wc11-snp goto wc11-snp
  94. echo Usage: BUILD 'compiler_name' [DMAKE commands]
  95. echo.
  96. echo Where 'compiler_name' is of the form comp-os, where
  97. echo 'comp' defines the compiler and 'os' defines the OS environment.
  98. echo For instance 'bc50-w32' is for Borland C++ 5.0 for Win32.
  99. echo The value of 'comp' can be any of the following:
  100. echo.
  101. echo bc45 - Borland C++ 4.5x
  102. echo bc50 - Borland C++ 5.x
  103. echo vc40 - Visual C++ 4.x
  104. echo vc50 - Visual C++ 5.x
  105. echo vc60 - Visual C++ 6.x
  106. echo wc10 - Watcom C++ 10.6
  107. echo wc11 - Watcom C++ 11.0
  108. echo gcc2 - GNU C/C++ 2.9x
  109. echo.
  110. echo The value of 'os' can be one of the following:
  111. echo.
  112. echo d16 - 16-bit DOS
  113. echo d32 - 32-bit DOS
  114. echo w16 - 16-bit Windows GUI mode
  115. echo c32 - 32-bit Windows console mode
  116. echo w32 - 32-bit Windows GUI mode
  117. echo o16 - 16-bit OS/2 console mode
  118. echo o32 - 32-bit OS/2 console mode
  119. echo p32 - 32-bit OS/2 Presentation Manager
  120. echo snp - 32-bit SciTech Snap application
  121. echo linux - 32-bit Linux application
  122. goto end
  123. rem -------------------------------------------------------------------------
  124. rem Setup for the specified compiler
  125. :bc31-d16
  126. call bc31-d16.bat
  127. goto compileit
  128. :bc45-d16
  129. call bc45-d16.bat
  130. goto compileit
  131. :bc45-d32
  132. call bc45-d32.bat
  133. goto compileit
  134. :bc45-tnt
  135. call bc45-tnt.bat
  136. goto compileit
  137. :bc45-w16
  138. call bc45-w16.bat
  139. goto compileit
  140. :bc45-w32
  141. call bc45-w32.bat
  142. goto compileit
  143. :bc45-c32
  144. call bc45-c32.bat
  145. goto compileit
  146. :bc45-vxd
  147. call bc45-vxd.bat
  148. goto compileit
  149. :bc50-d16
  150. call bc50-d16.bat
  151. goto compileit
  152. :bc50-d32
  153. call bc50-d32.bat
  154. goto compileit
  155. :bc50-tnt
  156. call bc50-tnt.bat
  157. goto compileit
  158. :bc50-w16
  159. call bc50-w16.bat
  160. goto compileit
  161. :bc50-w32
  162. call bc50-w32.bat
  163. goto compileit
  164. :bc50-c32
  165. call bc50-c32.bat
  166. goto compileit
  167. :bc50-vxd
  168. call bc50-vxd.bat
  169. goto compileit
  170. :gcc2-d32
  171. call gcc2-d32.bat
  172. goto compileit
  173. :gcc2-w32
  174. call gcc2-w32.bat
  175. goto compileit
  176. :gcc2-c32
  177. call gcc2-c32.bat
  178. goto compileit
  179. :gcc2-linux
  180. call gcc2-linux.bat
  181. goto compileit
  182. :sc70-d16
  183. call sc70-d16.bat
  184. goto compileit
  185. :sc70-w16
  186. call sc70-w16.bat
  187. goto compileit
  188. :sc70-tnt
  189. call sc70-tnt.bat
  190. goto compileit
  191. :sc70-w32
  192. call sc70-w32.bat
  193. goto compileit
  194. :sc70-c32
  195. call sc70-c32.bat
  196. goto compileit
  197. :vc40-d16
  198. call vc40-d16.bat
  199. goto compileit
  200. :vc40-tnt
  201. call vc40-tnt.bat
  202. goto compileit
  203. :vc40-w16
  204. call vc40-w16.bat
  205. goto compileit
  206. :vc40-w32
  207. call vc40-w32.bat
  208. goto compileit
  209. :vc40-c32
  210. call vc40-c32.bat
  211. goto compileit
  212. :vc40-drv9x
  213. call vc40-drv9x.bat
  214. goto compileit
  215. :vc40-drvnt
  216. call vc40-drvnt.bat
  217. goto compileit
  218. :vc40-rtt
  219. call vc40-rtt.bat
  220. goto compileit
  221. :vc50-d16
  222. call vc50-d16.bat
  223. goto compileit
  224. :vc50-tnt
  225. call vc50-tnt.bat
  226. goto compileit
  227. :vc50-w16
  228. call vc50-w16.bat
  229. goto compileit
  230. :vc50-w32
  231. call vc50-w32.bat
  232. goto compileit
  233. :vc50-c32
  234. call vc50-c32.bat
  235. goto compileit
  236. :vc50-drv9x
  237. call vc50-drv9x.bat
  238. goto compileit
  239. :vc50-drvnt
  240. call vc50-drvnt.bat
  241. goto compileit
  242. :vc50-rtt
  243. call vc50-rtt.bat
  244. goto compileit
  245. :vc60-d16
  246. call vc60-d16.bat
  247. goto compileit
  248. :vc60-tnt
  249. call vc60-tnt.bat
  250. goto compileit
  251. :vc60-w16
  252. call vc60-w16.bat
  253. goto compileit
  254. :vc60-w32
  255. call vc60-w32.bat
  256. goto compileit
  257. :vc60-c32
  258. call vc60-c32.bat
  259. goto compileit
  260. :vc60-drv9x
  261. call vc60-drv9x.bat
  262. goto compileit
  263. :vc60-drvnt
  264. call vc60-drvnt.bat
  265. goto compileit
  266. :vc60-drvw2k
  267. call vc60-drvw2k.bat
  268. goto compileit
  269. :vc60-rtt
  270. call vc60-rtt.bat
  271. goto compileit
  272. :wc10ad16
  273. call wc10ad16.bat
  274. goto compileit
  275. :wc10ad32
  276. call wc10ad32.bat
  277. goto compileit
  278. :wc10atnt
  279. call wc10atnt.bat
  280. goto compileit
  281. :wc10aw16
  282. call wc10aw16.bat
  283. goto compileit
  284. :wc10aw32
  285. call wc10aw32.bat
  286. goto compileit
  287. :wc10ac32
  288. call wc10ac32.bat
  289. goto compileit
  290. :wc10ao32
  291. call wc10ao32.bat
  292. goto compileit
  293. :wc10ap32
  294. call wc10ap32.bat
  295. goto compileit
  296. :wc10-d16
  297. call wc10-d16.bat
  298. goto compileit
  299. :wc10-d32
  300. call wc10-d32.bat
  301. goto compileit
  302. :wc10-tnt
  303. call wc10-tnt.bat
  304. goto compileit
  305. :wc10-w16
  306. call wc10-w16.bat
  307. goto compileit
  308. :wc10-w32
  309. call wc10-w32.bat
  310. goto compileit
  311. :wc10-c32
  312. call wc10-c32.bat
  313. goto compileit
  314. :wc10-o32
  315. call wc10-o32.bat
  316. goto compileit
  317. :wc10-p32
  318. call wc10-p32.bat
  319. goto compileit
  320. :wc11-d16
  321. call wc11-d16.bat
  322. goto compileit
  323. :wc11-d32
  324. call wc11-d32.bat
  325. goto compileit
  326. :wc11-tnt
  327. call wc11-tnt.bat
  328. goto compileit
  329. :wc11-w16
  330. call wc11-w16.bat
  331. goto compileit
  332. :wc11-w32
  333. call wc11-w32.bat
  334. goto compileit
  335. :wc11-c32
  336. call wc11-c32.bat
  337. goto compileit
  338. :wc11-o32
  339. call wc11-o32.bat
  340. goto compileit
  341. :wc11-p32
  342. call wc11-p32.bat
  343. goto compileit
  344. :compileit
  345. k_rm -f *.lib *.a
  346. dmake %2 %3 %4 %5 %6 %7 %8 %9
  347. if errorlevel 1 goto errorend
  348. goto end
  349. :errorend
  350. echo *************************************************
  351. echo * An error occurred while building the library. *
  352. echo *************************************************
  353. :end