home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 7.ddi / IOSTRSRC.ZIP / IOSTREAM.MAK < prev    next >
Encoding:
Text File  |  1992-06-10  |  2.4 KB  |  111 lines

  1. # IOSTREAM.MAK
  2. #
  3. # To compile all changed modules and replace (or add) both old and new objects
  4. # in an existing (or new) library, type
  5. #
  6. #       MAKE all
  7. #
  8. # To clean up (i.e., delete) all object files and temporary files, type
  9. #
  10. #       MAKE -DTARGET clean
  11. #
  12. # The memory model must be specified in one of two ways.  You can
  13. # set the environment variable MODEL before running MAKE:
  14. #
  15. #       SET MODEL=x
  16. #
  17. # or you can use the -D command line switch:
  18. #
  19. #       MAKE -DMODEL=x
  20. #
  21. # where x is the letter s, c, m, l, or h.  Using -D overrides the
  22. # environment variable.
  23. #
  24. # To make a library for Windows, use -DWINDOWS on the command line.
  25. # To make a DLL for Windows, use -DWINDLL on the command line.
  26.  
  27. !if $d(WINDLL)
  28. MODEL = l
  29. !endif
  30.  
  31. !if !$d(MODEL)
  32. !error MODEL not defined. Use -DMODEL=x on command line, or SET MODEL=x.
  33. !endif
  34.  
  35. !if '$(MODEL)'=='h' && $d(WINDOWS)
  36.  
  37. all :
  38.         echo Can't make a huge model WINDOWS library
  39.  
  40. clean :
  41.         echo Can't clean up a huge model WINDOWS library
  42.  
  43. !else
  44.  
  45. # ALL - compiled changes sources and add all objects (old and new) to library
  46.  
  47. all :    compile archive
  48.  
  49. !if $d(WINDOWS)
  50.  
  51. LIBNAME = cw$(MODEL)
  52. OBJDIR  = w$(MODEL)
  53. TC      = $(TC) +..\winlib\turboc.cfg
  54. TASM    = $(TASM) -D_Windows -D_WINDOWS -o
  55.  
  56. !elif $d(WINDLL)
  57.  
  58. LIBNAME = crtldll.lib
  59. OBJDIR  = d
  60. TC      = $(TC) +tcdll.cfg
  61. TASM    = $(TASM) -D_Windows -D_WINDOWS -o
  62.  
  63. !else
  64.  
  65. LIBNAME = c$(MODEL)
  66. TC      = $(TC) +..\clib\turboc.cfg
  67.  
  68. !endif
  69.  
  70. OBJECTS = lib1 lib2 lib3
  71.  
  72. !include "..\rules.mak"
  73.  
  74. !include "iostobj.mak"
  75.  
  76. lib1 :  $(OBJS1)
  77. lib2 :  $(OBJS2)
  78. lib3 :  $(OBJS3)
  79.  
  80. # ARCHIVE - add all objects to a new library.
  81.  
  82. !if $d(WINDLL)
  83.  
  84. archive :
  85.         makersp "..\\\\..\\\\iostream\\\\d\\\\%s\n" &&|
  86.         $(OBJS2)
  87.         $(OBJS3)
  88. |       >> ..\winlib\dllmak.rsp
  89.         makersp "+$(OBJDIR)\\\\%s &\n" &&|
  90.         $(OBJS1)
  91. |       > iostrmak.rsp
  92.         $(TLIB) $(LIBDIR)\$(LIBNAME) /C @iostrmak.rsp,nul
  93.         if exist $(LIBDIR)\*.bak del $(LIBDIR)\*.bak
  94.         del *.rsp
  95.  
  96. !else
  97.  
  98. archive :
  99.         makersp "+$(OBJDIR)\\\\%s &\n" &&|
  100.         $(OBJS1)
  101.         $(OBJS2)
  102.         $(OBJS3)
  103. |       > iostrmak.rsp
  104.         $(TLIB) $(LIBDIR)\$(LIBNAME) /C @iostrmak.rsp,nul
  105.         if exist $(LIBDIR)\*.bak del $(LIBDIR)\*.bak
  106.         del *.rsp
  107.  
  108. !endif          # if $d(WINDLL)
  109.  
  110. !endif          # if huge model WINDOWS
  111.