home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / dbmsg / mapi / docfile.ms / makefile.16 < prev    next >
Encoding:
Makefile  |  1996-03-27  |  2.1 KB  |  91 lines

  1. # Makefile to build the MAPI Sample Message Store Provider
  2.  
  3. !IFDEF MAPISAMP
  4. HOME   = $(MAPISAMP)\docfile.ms^\
  5. COMMON = $(MAPISAMP)\common^\
  6. !ELSE
  7. HOME   = 
  8. COMMON = ..\common^\
  9. !ENDIF
  10.  
  11. !include <$(COMMON)win16.mak>
  12.  
  13. !IFNDEF NODEBUG
  14. cflags = $(cflags) -DDEBUG
  15. !ENDIF
  16.  
  17. PROJ     = SMPMS
  18.  
  19. # Main target dependencies
  20.  
  21. all: $(PROJ).dll
  22.  
  23. # Extra libraries needed, not defined in win32.mak
  24.  
  25. extralibs = mapi.lib compobj.lib storage.lib
  26.  
  27. # Object files we need to build
  28.  
  29. OBJS1 = msp.obj mspatch.obj mspfld.obj mspgle.obj mspguid.obj mspinit.obj
  30. OBJS2 = msplogon.obj mspmisc.obj mspms.obj mspmsg.obj mspntfy.obj mspobj.obj
  31. OBJS3 = msprfs.obj msptbl.obj
  32.  
  33. COMMON_OBJS = imem.obj wrap3d.obj wep.obj
  34. !IFNDEF NODEBUG
  35. COMMON_OBJS = $(COMMON_OBJS) mapidbg.obj
  36. !ENDIF
  37.  
  38. # Build the general object files
  39.  
  40. {$(HOME)}.c.obj:
  41.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsdll) $**
  42.  
  43. # Build the specific common object files
  44.  
  45. imem.obj: $(COMMON)imem.c
  46.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsdll) $**
  47.  
  48. wep.obj: $(COMMON)wep.c
  49.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsdll) $**
  50.  
  51. wrap3d.obj: $(COMMON)wrap3d.c
  52.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsdll) $**
  53.  
  54. mapidbg.obj: $(COMMON)mapidbg.c
  55.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsdll) $**
  56.  
  57. # Build the resources
  58.  
  59. $(PROJ).res: $(HOME)MSP.RC $(HOME)MSP.DLG
  60.   set INCLUDE=$(INCLUDE);$(HOME);$(COMMON)
  61.   $(rc) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)MSP.RC
  62.  
  63. # Link it together to make the executable image
  64.  
  65. $(PROJ).dll: $(OBJS1) $(OBJS2) $(OBJS3) $(COMMON_OBJS) $(PROJ).res
  66.   echo $(OBJS1: = +) + > link.txt
  67.   echo $(OBJS2: = +) + >> link.txt
  68.   echo $(OBJS3: = +) + >> link.txt
  69.   echo $(COMMON_OBJS: = +) >> link.txt
  70.   echo $(PROJ).dll >> link.txt
  71.   echo $(PROJ).map >> link.txt
  72.   echo $(extralibs) $(guilibsdll) >> link.txt
  73.   echo $(HOME)dll16.def >> link.txt
  74.   $(link) $(ldebug) $(dlllflags) @link.txt
  75.   $(rc) -t $(PROJ).res $@
  76. !IFDEF MAPISAMP
  77.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  78. !ENDIF
  79.  
  80. # Clean up the intermediate files
  81.  
  82. clean:
  83.   -del *.obj 
  84.   -del *.res 
  85.   -del *.dll 
  86.   -del *.exp 
  87.   -del *.lib 
  88.   -del *.map 
  89.   -del link.txt
  90.  
  91.