home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 1.ddi / WINLBSRC.ZIP / WINLIB.MAK < prev    next >
Encoding:
Text File  |  1992-06-10  |  2.1 KB  |  98 lines

  1. # WINLIB.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 DLL for Windows, use -DWINDLL on the command line.
  25.  
  26. !if $d(WINDLL)
  27. MODEL = l
  28. !endif
  29.  
  30. !if !$d(MODEL)
  31. !error MODEL not defined. Use -DMODEL=x on command line, or SET MODEL=x.
  32. !endif
  33.  
  34. !if '$(MODEL)'=='h'
  35.  
  36. all :
  37.         echo Can't make a huge model WINDOWS library
  38.  
  39. clean :
  40.         echo Can't clean up a huge model WINDOWS library
  41.  
  42. !else
  43.  
  44. # ALL - compiled changes sources and add all objects (old and new) to library
  45.  
  46. all :    compile archive
  47.  
  48. !include "winobj.mak"
  49.  
  50. !if $d(WINDLL)
  51.  
  52. LIBNAME = crtldll.lib
  53. OBJDIR  = d
  54. TC      = $(TC) +tcdll.cfg
  55. TASM    = $(TASM) -D_Windows -D_WINDOWS -o
  56. OBJECTS = $(OBJS1) $(OBJS2) $(OBJS3)
  57.  
  58. !else
  59.  
  60. LIBNAME = cw$(MODEL)
  61. OBJECTS = $(OBJS1) $(OBJS2)
  62.  
  63. !endif
  64.  
  65. WINDOWS = 1     # prevent rules.mak from using tiny model
  66.  
  67. !include "..\rules.mak"
  68.  
  69. # ARCHIVE - add all objects to a new library.
  70.  
  71. !if $d(WINDLL)
  72.  
  73. archive :
  74.         makersp "..\\\\..\\\\winlib\\\\d\\\\%s\n" &&|
  75.         $(OBJS2)
  76.         $(OBJS3)
  77. |       >> dllmak.rsp
  78.         makersp "+$(OBJDIR)\\\\%s &\n" &&|
  79.         $(OBJS1)
  80. |       > winmak.rsp
  81.         $(TLIB) $(LIBDIR)\$(LIBNAME) /C @winmak.rsp,nul
  82.         if exist $(LIBDIR)\*.bak del $(LIBDIR)\*.bak
  83.  
  84. !else
  85.  
  86. archive :
  87.         makersp "+$(OBJDIR)\\\\%s &\n" &&|
  88.         $(OBJS1)
  89.         $(OBJS2)
  90. |       > winmak.rsp
  91.         $(TLIB) $(LIBDIR)\$(LIBNAME) /C @winmak.rsp,nul
  92.         if exist $(LIBDIR)\*.bak del $(LIBDIR)\*.bak
  93.         del *.rsp
  94.  
  95. !endif          # if $d(WINDLL)
  96.  
  97. !endif          # if huge model
  98.