home *** CD-ROM | disk | FTP | other *** search
/ BBS 1 / BBS#1.iso / for-dos / cpu116b2.ha / MAKEC.BAT < prev    next >
Encoding:
DOS Batch File  |  1995-05-10  |  2.7 KB  |  106 lines

  1. @echo off
  2. echo makeC - CPU Identifier/C Builder  Version 1.05 (c) 1994,95 by B-coolWare.
  3. if "%1" == "S" goto Small
  4. if "%1" == "m" goto Med
  5. if "%1" == "M" goto Med
  6. if "%1" == "c" goto Comp
  7. if "%1" == "C" goto Comp
  8. if "%1" == "l" goto Large
  9. if "%1" == "L" goto Large
  10. if "%1" == "h" goto Huge
  11. if "%1" == "H" goto Huge
  12. goto Help
  13. :Small
  14. set model=__SMALL__
  15. goto okModel
  16. :Med
  17. set model=__MEDIUM__
  18. goto okModel
  19. :Comp
  20. set model=__COMPACT__
  21. goto okModel
  22. :Large
  23. set model=__LARGE__
  24. goto okModel
  25. :Huge
  26. set model=__HUGE__
  27. :okModel
  28. echo:
  29. rem    --- setting INCLUDE and LIB environment variables. Some compilers
  30. rem    --- require these variables to exist, so we will not override them
  31. rem    --- if they are already defined.
  32. if .%include%. == .. goto setInc
  33. :checkLib
  34. if .%lib%. == .. goto setLib
  35. goto okPaths
  36. :setInc
  37. set include=Y:\BORLANDC\INCLUDE
  38. set incdef=1
  39. goto checkLib
  40. :setLib
  41. set lib=Y:\BORLANDC\LIB
  42. set libdef=1
  43. :okPaths
  44. yesno Do you want to compile CPU Identifier
  45. if errorlevel 1 goto compile
  46. yesno Do you want to make TMi0SDGL library
  47. if errorlevel 1 goto mklib
  48. goto P5Info
  49. :mklib
  50. call mlib cputype %1
  51. goto P5Info
  52. :compile
  53. echo Building CPU Identifier/C...
  54. set makeC=ON
  55. call mlib cputype %1
  56. bcc -m%1 -c -I%include% cpu.c
  57. REM tcc -m%1 -c -I%include% cpu
  58. rem                          ^-- unREM this if you're TC user
  59. REM cl /A%1 /c /Ox /FPi /I%include% cpu
  60. rem                          ^-- unREM this if you're MSC user
  61.  
  62. tlink /x /L%lib% c0%1 cpu, cpuc,,c%1.lib math%1.lib emu.lib cputype%1.lib
  63. REM tlink /x /L%lib% c0%1 cpu, cpuc,,c%1.lib math%1.lib emu.lib cputype%1.lib
  64. rem                          ^-- unREM this if you're TC user
  65. REM tlink /x /L%lib% cpu, cpuc,,%1libce.lib cputype%1.lib
  66. rem                          ^-- unREM this if you're MSC user
  67. :P5Info
  68. echo:
  69. yesno Do you want to compile P5Info program
  70. if errorlevel 1 goto mkP5
  71. goto Done
  72. :mkP5
  73. if "%1" == "t" goto Tiny
  74. echo Building P5Info/C...
  75. tasm /t/m/d%model% p5info, p5c
  76. bcc -m%1 -c -I%include% p5info.c
  77. REM tcc -m%1 -c -I%include% p5info
  78. rem                          ^-- unREM this if you're TC user
  79. REM cl /A%1 /c /Ox /FPi /I%include% p5info
  80. rem                          ^-- unREM this if you're MSC user
  81. tlink /x/L%lib% c0%1 p5info p5c,p5info,,c%1.lib
  82. REM tlink /x/L%lib% c0%1 p5info p5c,p5info,,c%1.lib
  83. rem                          ^-- unREM this if you're TC user
  84. REM tlink /x/L%lib% p5info p5c,p5info,,%1libce.lib
  85. rem                          ^-- unREM this if you're MSC user
  86. :Done
  87. if exist *.obj del *.obj >nul
  88. echo makeC done.
  89. set makeC=
  90. goto Quit
  91. :help
  92. echo:
  93. echo usage: makeC Model
  94. echo:
  95. echo   where Model can be one of these: s, c, m, l, h
  96. :Quit
  97. set model=
  98. if .%incdef%.==.. goto noInc
  99. set incdef=
  100. set include=
  101. :noInc
  102. if .%libdef%.==.. goto noLib
  103. set libdef=
  104. set lib=
  105. :noLib
  106.