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 < prev    next >
Encoding:
Makefile  |  1996-03-27  |  1.9 KB  |  80 lines

  1. # Makefile to build the MAPI Sample Address Book Provider
  2.  
  3. # Key to CPU specific conditions, CPU == i386 || ALPHA || MIPS || PPC
  4. !IF "$(CPU)" == ""
  5. !IF "$(PROCESSOR_ARCHITECTURE)" == "MIPS" || "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" || "$(PROCESSOR_ARCHITECTURE)" == "PPC"
  6. CPU = $(PROCESSOR_ARCHITECTURE)
  7. !ELSE
  8. CPU = i386
  9. !ENDIF
  10. !ENDIF
  11.  
  12. !include <win32.mak>
  13.  
  14. !IFNDEF NODEBUG
  15. cflags = $(cflags) -DDEBUG
  16. !ENDIF
  17.  
  18. !IFDEF MAPISAMP
  19. HOME   = $(MAPISAMP)\flatfile.ab^\
  20. COMMON = $(MAPISAMP)\common^\
  21. rcvars = $(rcvars) /I$(HOME)
  22. !ELSE
  23. HOME   = 
  24. COMMON = ..\common^\
  25. !ENDIF
  26.  
  27. PROJ     = SMPAB32
  28. BASEFILE = $(COMMON)mapibase.txt
  29.  
  30. # Main target dependencies
  31.  
  32. all: $(PROJ).dll
  33.  
  34. # Extra libraries need, not defined in win32.mak
  35.  
  36. extralibs = mapi32.lib
  37.  
  38. # Object files we need to build
  39.  
  40. OBJS = abcont.obj abctbl1.obj abctbl2.obj abctbl3.obj abguid.obj ablogon.obj \
  41.        abp.obj absearch.obj abuser.obj ootid.obj oouser.obj root.obj \
  42.        status.obj tid.obj wrap.obj
  43. COMMON_OBJS =
  44. !IFNDEF NODEBUG
  45. COMMON_OBJS = $(COMMON_OBJS) mapidbg.obj
  46. !ENDIF
  47.  
  48. # Build the object files
  49.  
  50. {$(HOME)}.c.obj:
  51.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  52.  
  53. mapidbg.obj: $(COMMON)\mapidbg.c
  54.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  55.  
  56. # Build the resources
  57.  
  58. $(PROJ).res: $(HOME)SAMPABP.RC $(HOME)SAMPABP.DLG
  59.   $(rc) /I$(COMMON) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)SAMPABP.RC
  60.  
  61. # Link it together to make the executable image
  62.  
  63. $(PROJ).dll: $(OBJS) $(PROJ).res $(COMMON_OBJS)
  64.   $(link) $(linkdebug) $(lflags) -dll -subsystem:windows,$(APPVER) $(OBJS) \
  65.   $(COMMON_OBJS) $(PROJ).res $(guilibsmt) $(extralibs) \
  66.   -def:$(HOME)$(PROJ).def -out:$(PROJ).dll -base:@$(BASEFILE),$(PROJ)
  67. !IFDEF MAPISAMP
  68.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  69. !ENDIF
  70.  
  71. # Clean up the intermediate files
  72.  
  73. clean:
  74.   -del *.obj
  75.   -del *.res 
  76.   -del *.dll 
  77.   -del *.lib 
  78.   -del *.exp
  79.  
  80.