home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pcmagazi / 1992 / 09 / compile.bat < prev    next >
DOS Batch File  |  1992-03-30  |  2KB  |  82 lines

  1. @echo off
  2.  
  3. echo . Compiling BackDown and its protocols
  4.  
  5. if .%1 == .M  goto masm
  6. if .%1 == .m  goto masm
  7. if .%1 == .T  goto tasm
  8. if .%1 == .t  goto tasm
  9.  
  10. echo .
  11. echo .      To compile BackDown -- use one of the following commands:
  12. echo .
  13. echo .               For Assembler         Use this command
  14. echo .           ----------------------    ----------------
  15. echo .           Microsoft MASM 5.1/6.0    COMPILE M
  16. echo .           Borland TASM              COMPILE T
  17. echo .
  18. goto end
  19.  
  20. :masm
  21.   set assembler=MASM
  22.   set linker=link
  23.   goto work
  24.  
  25. :tasm
  26.   set assembler=tasm -W2 -w-aln
  27.   set linker=tlink
  28.   goto work
  29.  
  30. :work
  31.   echo . Clean-up old executables
  32.     if exist bd.com del bd.com
  33.     if exist *.bdp  del *.bdp
  34.  
  35.   echo . Compiling BackDown
  36.     %assembler% bd;                 >log
  37.     if errorlevel 1 goto errors
  38.     %linker% bd;                   >>log
  39.     if errorlevel 1 goto errors
  40.     exe2bin bd.exe bd.com
  41.     del bd.exe
  42.  
  43.   echo . B+ protocol
  44.     %assembler% bbplus;            >>log
  45.     if errorlevel 1 goto errors
  46.     %linker% bbplus;               >>log
  47.     if errorlevel 1 goto errors
  48.     exe2bin bbplus.exe bbplus.com
  49.     ren bbplus.com bbplus.bdp
  50.     del bbplus.exe
  51.  
  52.   echo . XMODEM protocol
  53.     %assembler% bxmodm;            >>log
  54.     if errorlevel 1 goto errors
  55.     %linker% bxmodm;               >>log
  56.     if errorlevel 1 goto errors
  57.     exe2bin bxmodm.exe bxmodm.com
  58.     ren bxmodm.com bxmodm.bdp
  59.     del bxmodm.exe
  60.  
  61.   echo . ASCII protocol
  62.     %assembler% bascii;            >>log
  63.     if errorlevel 1 goto errors
  64.     %linker% bascii;               >>log
  65.     if errorlevel 1 goto errors
  66.     exe2bin bascii.exe bascii.com
  67.     ren bascii.com bascii.bdp
  68.     del bascii.exe
  69.  
  70.   echo . All Done
  71.     if exist *.obj del *.obj
  72.     if exist *.map del *.map
  73.     set assembler=
  74.     set linker=
  75.     goto end
  76.  
  77. :errors
  78.   echo . Problems compiling ..
  79.   echo . ..look in LOG file
  80.  
  81. :end
  82.