home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / WIPER.ZIP / COMPILE.CMD next >
OS/2 REXX Batch file  |  1991-10-11  |  950b  |  37 lines

  1. /* This file re-compiles WIPER.C into WIPER.EXE using MSC 6.
  2.    It also uses TAG.EXE, a public domain utility to make WIPER.EXE
  3.    runnable in an OS/2 window.
  4. */
  5.  
  6. type = 'huh?'
  7. Do while type \='DOS' & type\='OS2' & type \='OS/2'
  8.   Say 'Enter the target either DOS or OS/2 :'
  9.   Pull type
  10. End
  11. Say 'Compiling for' type'.. Please be patient'
  12.  
  13. Select
  14.   When type == 'DOS' Then Do
  15.      'CL /AL /FPi /G2rs /Ozax /Lr wiper.c /link /stack:30000 /exepack /packcode /non'
  16.      If rc\=0 Then Call failed rc
  17.   End
  18.   When type == 'OS2' | type == 'OS/2' Then Do
  19.      'CL /AL /FPi /G2rs /Zp /Ozax /Lp /DOS2 wiper.c /link /stack:30000'
  20.      If rc\=0 Then Call failed rc
  21.      'TAG /WIN wiper.exe'
  22.      If rc\=0 Then Call failed rc
  23.   End
  24.   Otherwise Do
  25.      Say 'Unknown type:' type
  26.      Call Failed 1
  27.   End
  28. End
  29. Say 'End of compilation'
  30. Exit(0)
  31.  
  32. Failed:
  33. Parse arg ReturnCode
  34.   Say 'Operation failed - return code was' rc
  35.   Exit rc
  36.  
  37.