home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / START16.PAK / BUILDC0.BAT next >
DOS Batch File  |  1995-08-29  |  2KB  |  72 lines

  1. @echo off
  2. if not "%TASM%"=="" goto skip
  3. set tasm=tasm
  4. :skip
  5.  
  6. if not %3.==. goto noobjdir
  7. set objdir=.
  8. goto objdirset
  9. :noobjdir
  10. set objdir=%3
  11. :objdirset
  12.  
  13. if not %2.==. goto noc0dir
  14. set c0dir=.
  15. goto c0dirset
  16. :noc0dir
  17. set c0dir=%2
  18. :c0dirset
  19.  
  20. if %1.==clib. goto clib
  21. if %1.==winlib. goto winlib
  22. if %1.==dpmi16. goto dpmi16
  23. goto error
  24. :clib
  25. echo Building DOS startups
  26. cd %c0dir%
  27. %TASM% /M /MX /Q /T /D__TINY__    c0, %objdir%\c0t
  28. %TASM% /M /MX /Q /T /D__SMALL__   c0, %objdir%\c0s
  29. %TASM% /M /MX /Q /T /D__COMPACT__ c0, %objdir%\c0c
  30. %TASM% /M /MX /Q /T /D__MEDIUM__  c0, %objdir%\c0m
  31. %TASM% /M /MX /Q /T /D__LARGE__   c0, %objdir%\c0l
  32. %TASM% /M /MX /Q /T /D__HUGE__    c0, %objdir%\c0h
  33.  
  34. %TASM% /M /MX /Q /T /D__TINY__    /D_DSSTACK_ c0, %objdir%\c0ft
  35. %TASM% /M /MX /Q /T /D__SMALL__   /D_DSSTACK_ c0, %objdir%\c0fs
  36. %TASM% /M /MX /Q /T /D__COMPACT__ /D_DSSTACK_ c0, %objdir%\c0fc
  37. %TASM% /M /MX /Q /T /D__MEDIUM__  /D_DSSTACK_ c0, %objdir%\c0fm
  38. %TASM% /M /MX /Q /T /D__LARGE__   /D_DSSTACK_ c0, %objdir%\c0fl
  39. %TASM% /M /MX /Q /T /D__HUGE__                c0, %objdir%\c0fh
  40. if not %c0dir%==. cd ..
  41. goto exit
  42. :winlib
  43. echo Building Windows startups
  44. cd %c0dir%
  45. %TASM% /M /MX /Q /T /D__SMALL__   /D__WINDOWS__ c0w, %objdir%\c0ws
  46. %TASM% /M /MX /Q /T /D__COMPACT__ /D__WINDOWS__ c0w, %objdir%\c0wc
  47. %TASM% /M /MX /Q /T /D__MEDIUM__  /D__WINDOWS__ c0w, %objdir%\c0wm
  48. %TASM% /M /MX /Q /T /D__LARGE__   /D__WINDOWS__ c0w, %objdir%\c0wl
  49.  
  50. %TASM% /M /MX /Q /T /D__SMALL__   /D__WINDOWS__ c0d, %objdir%\c0ds
  51. %TASM% /M /MX /Q /T /D__COMPACT__ /D__WINDOWS__ c0d, %objdir%\c0dc
  52. %TASM% /M /MX /Q /T /D__MEDIUM__  /D__WINDOWS__ c0d, %objdir%\c0dm
  53. %TASM% /M /MX /Q /T /D__LARGE__   /D__WINDOWS__ c0d, %objdir%\c0dl
  54. if not %c0dir%==. cd ..
  55. goto exit
  56. :dpmi16
  57. echo Building DPMI16 startup
  58. cd %c0dir%
  59. %TASM% /M /MX /Q /T /D__LARGE__ /D__WINDOWS__ /D__DPMI16__ c0w, %objdir%\c0x
  60. if not %c0dir%==. cd ..
  61. goto exit
  62. :error
  63. echo BUILD-C0.BAT
  64. echo Usage: build-c0 libtype [srcdir [objdir]]
  65. echo  libtype   clib (DOS) or winlib (Windows) or dpmi16 (DPMI16)
  66. echo  srcdir    source subdirectory (default is ".")
  67. echo  objdir    object subdirectory relative to srcdir (default is ".")
  68. echo Example: build-c0 clib startup ..\lib
  69. echo This batch file builds the C startup module (or modules) for
  70. echo DOS or Windows.  All memory models are built.
  71. :exit
  72.