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 / flatfile.ab / makefile.16 < prev    next >
Encoding:
Makefile  |  1996-03-27  |  1.9 KB  |  82 lines

  1. # Makefile to build the MAPI Sample Address Book Provider
  2.  
  3. !IFDEF MAPISAMP
  4. HOME   = $(MAPISAMP)\flatfile.ab^\
  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     = SMPAB
  18.  
  19. # Main target dependencies
  20.  
  21. all: $(PROJ).dll
  22.  
  23. # Extra libraries need, not defined in win32.mak
  24.  
  25. extralibs = mapi.lib # compobj.lib ..\common\ctl3dv2.lib
  26.  
  27. # Object files we need to build
  28.  
  29. OBJS1 = abcont.obj abctbl1.obj abctbl2.obj abctbl3.obj abguid.obj ablogon.obj abp.obj
  30. OBJS2 = absearch.obj abuser.obj ootid.obj oouser.obj root.obj status.obj tid.obj wrap.obj
  31. COMMON_OBJS = wep.obj
  32. !IFNDEF NODEBUG
  33. COMMON_OBJS = $(COMMON_OBJS) mapidbg.obj
  34. !ENDIF
  35.  
  36. # Build the object files
  37.  
  38. {$(HOME)}.c.obj:
  39.   set cl=/I$(COMMON) $(cdebug) $(cflags) $(cvarsdll)
  40.   $(cc) $**
  41.  
  42. mapidbg.obj: $(COMMON)mapidbg.c
  43.   set cl=/I$(COMMON) $(cdebug) $(cflags) $(cvarsdll)
  44.   $(cc) $**
  45.  
  46. wep.obj: $(COMMON)wep.c
  47.   set cl=/I$(COMMON) $(cdebug) $(cflags) $(cvarsdll)
  48.   $(cc) $**
  49.  
  50. # Build the resources
  51.  
  52. $(PROJ).res: $(HOME)SAMPABP.RC $(HOME)SAMPABP.DLG
  53.   set INCLUDE=$(INCLUDE);$(HOME);$(COMMON)
  54.   $(rc) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)SAMPABP.RC
  55.  
  56. # Link it together to make the executable image
  57.  
  58. $(PROJ).dll: $(OBJS1) $(OBJS2) $(PROJ).res $(COMMON_OBJS)
  59.   echo $(OBJS1: = +) + > link.txt
  60.   echo $(OBJS2: = +) + >> link.txt
  61.   echo $(COMMON_OBJS: = +) >> link.txt
  62.   echo $(PROJ).dll >> link.txt
  63.   echo $(PROJ).map >> link.txt
  64.   echo $(extralibs) $(guilibsdll) >> link.txt
  65.   echo $(HOME)dll16.def >> link.txt
  66.   $(link) $(ldebug) $(dlllflags) @link.txt
  67.   $(rc) -t $(PROJ).res $@
  68. !IFDEF MAPISAMP
  69.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  70. !ENDIF
  71.  
  72. # Clean up the intermediate files
  73.  
  74. clean:
  75.   -del *.obj 
  76.   -del *.res 
  77.   -del *.dll 
  78.   -del *.lib 
  79.   -del *.map 
  80.   -del link.txt
  81.  
  82.