home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 20.ddi / SAMPLES / GDOSMEM / MAKEFILE._ / MAKEFILE.
Encoding:
Text File  |  1993-02-08  |  1.5 KB  |  91 lines

  1. ##### Module Macro #####
  2. NAME    = gdosmem
  3. SRCS    = $(NAME).c
  4. OBJS    =
  5.  
  6. TSR    = gtsr
  7.  
  8. ##### C7 #####
  9. C7    = 1
  10.  
  11. ##### Library Macro #####
  12. LIBS    = libw slibcew
  13. MOD    = -AS
  14.  
  15. ##### Include Macro #####
  16. INCLS    = $(NAME).h
  17.  
  18. ##### Resource Macro #####
  19. RCFILES = $(NAME).rc
  20.  
  21. ##### DEBUG Defined #####
  22. DEBUG    = 1
  23.  
  24. ##### Build Option Macros #####
  25. !if $(DEBUG)
  26. DDEF    = -DDEBUG
  27. CLOPT    = -Zid -Od
  28. MOPT    = -Zi
  29. LOPT    = /CO /LI /MAP
  30. !else
  31. DDEF    =
  32. CLOPT    = -Os
  33. LOPT    =
  34. !endif
  35.  
  36. ##### General Macros #####
  37. DEF    =
  38.  
  39. ##### Tool Macros #####
  40. ASM    = masm -Mx $(MOPT) $(DDEF) $(DEF)
  41. CC    = cl -nologo -c $(MOD) -YX -G2sA -Zp -W3 $(CLOPT) $(DDEF) $(DEF)
  42. LINK    = link /NOD /NOE /STACK:5120 $(LOPT)
  43. RC    = rc $(DDEF) $(DEF)
  44. HC    = hc
  45.  
  46. ##### Inference Rules #####
  47. .c.obj:
  48.     $(CC) $*.c
  49.  
  50. .asm.obj:
  51.     $(ASM) $*.asm;
  52.  
  53. .rc.res:
  54.     $(RC) -r $*.rc
  55.  
  56. ##### Main (default) Target #####
  57. goal: $(NAME).exe  $(TSR).exe
  58.  
  59. ##### Dependents For Goal and Command Line #####
  60. $(NAME).exe: $(SRCS:.c=.obj) $(NAME).def $(NAME).res
  61.     $(LINK) @<<
  62.     $(SRCS:.c=.obj) $(OBJS),
  63.     $(NAME).exe,
  64.     $(NAME).map,
  65.     $(LIBS),
  66.     $(NAME).def
  67. <<
  68.     $(RC) -T $(NAME).res
  69. !if $(DEBUG)
  70. !if !$(C7)
  71.     cvpack -p $(NAME).exe
  72. !endif
  73.     mapsym $(NAME).map
  74. !endif
  75.  
  76. ##### Build DOS TSR #####
  77. $(TSR).exe:
  78.     link $(TSR);
  79.  
  80. ##### Dependents #####
  81. $(SRCS:.c=.obj): $(INCLS)
  82. $(NAME).res: $(RCFILES) $(INCLS)
  83.  
  84. ##### Clean Directory #####
  85. clean:
  86.     -del gdosmem.obj
  87.     -del *.res
  88.     -del *.exe
  89.     -del *.map
  90.     -del *.sym
  91.