home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 328_01 / twmake.bat < prev    next >
DOS Batch File  |  1991-04-17  |  1KB  |  58 lines

  1. ECHO OFF
  2. CLS
  3. REM This .BAT file compiles the windows routines and places them in
  4. REM a library. You can specify model, and text-only vs text/graphics
  5. REM
  6. REM default is all files matching w*,
  7. REM but parameter %3-9 may name files
  8.  
  9.    set wn=w*.c
  10.    if NOT (%3) == () set wn=%3 %4 %5 %6 %7 %8 %9 
  11.  
  12. REM see if we're building TEXT or graphics libraries
  13.     set d = error
  14.     if (%1)  == (t) set d=-DTEXTONLY
  15.     if (%1)  == (g) set d=
  16.     if (%d%) == (error) goto :HELPEM
  17.  
  18. REM validate choice of model
  19.     for %%a in ( t s m c l h ) do goto :OK
  20.  
  21. :HELPEM
  22. ECHO This batch file 'makes' the windows libraries.
  23. ECHO the first parameter should be
  24. ECHO            T= TEXTONLY  --or-- G= graphics
  25. ECHO the second parameter should be the memory model
  26. ECHO            T, S, M, C, L, H
  27. ECHO ...
  28. ECHO the third thru ninth parameter(s) is the name(s) of the file to make.
  29. ECHO ...
  30. ECHO May use wildcards.
  31. ECHO ...
  32. ECHO library not made.
  33. goto :QUIT
  34.  
  35.  
  36. :OK
  37. ECHO making windows libraries.
  38. ECHO on
  39.       if exist w*.obj erase w*.obj
  40.        echo COMPILING window routines      >>errors.lst
  41.     tcc -m%2 -c  %d% %wn%                 >>errors.lst
  42.        dir w*.obj | dir2bat -+@ &          > objlst.lst 
  43.     echo , lib                            >>objlst.lst
  44.     echo PLACING MODULES IN LIBRARY     >>errors.lst
  45.     tlib  w%1%2.lib @objlst.lst            >>errors.lst    
  46.        echo off
  47.    
  48.        if exist w*.obj erase w*.obj
  49.     
  50. ECHO library updated. compiler messages in errors.lst
  51.  
  52. :QUIT
  53.  
  54. set p=
  55. set wn=
  56. set mdl=
  57.  
  58.