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 / manager.sh / makefile < prev    next >
Encoding:
Makefile  |  1996-03-27  |  2.3 KB  |  91 lines

  1. # Makefile to build the MAPI Sample Hook 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)\manager.sh^\
  20. COMMON = $(MAPISAMP)\common^\
  21. rcvars = $(rcvars) /I$(HOME)
  22. !ELSE
  23. HOME   = 
  24. COMMON = ..\common^\
  25. !ENDIF
  26.  
  27. PROJ     = SMH32
  28. BASEFILE = $(COMMON)mapibase.txt
  29.  
  30. # Main target dependencies
  31.  
  32. all: $(PROJ).dll
  33.  
  34. # Extra libraries needed, not defined in win32.mak
  35.  
  36. extralibs = mapi32.lib ole32.lib winmm.lib uuid.lib comctl32.lib
  37.  
  38. # Object files we need to build
  39.  
  40. OBJS = smh.obj smharc.obj smhatp.obj smhcfg.obj smhguid.obj smhinpxp.obj \
  41.        smhmdb.obj smhole.obj smhoof.obj smhps.obj smhrk.obj smhtb.obj \
  42.        smhwb.obj smhwiz.obj
  43.  
  44. COMMON_OBJS = wrap3d.obj cindex.obj
  45. !IFNDEF NODEBUG
  46. COMMON_OBJS = $(COMMON_OBJS) mapidbg.obj
  47. !ENDIF
  48.  
  49. # Bitmap files we use
  50.  
  51. BITMAPS = $(HOME)down.bmp $(HOME)downdis.bmp $(HOME)downinv.bmp \
  52.           $(HOME)updis.bmp $(HOME)upinv.bmp $(HOME)up.bmp
  53.  
  54. # Build the object files
  55.  
  56. {$(HOME)}.c.obj:
  57.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  58.  
  59. mapidbg.obj: $(COMMON)mapidbg.c
  60.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  61.  
  62. wrap3d.obj: $(COMMON)wrap3d.c
  63.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  64.  
  65. cindex.obj: $(COMMON)cindex.c
  66.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  67.  
  68. # Build the resources
  69.  
  70. $(PROJ).res: $(HOME)SMH.RC $(HOME)SMHRC.H $(HOME)SMH.DLG $(HOME)SMH.ICO $(BITMAPS)
  71.   $(rc) /I$(COMMON) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)SMH.RC
  72.  
  73. # Link it together to make the executable image
  74.  
  75. $(PROJ).dll: $(OBJS) $(COMMON_OBJS) $(PROJ).res
  76.   $(link) $(linkdebug) $(lflags) -dll -subsystem:windows,$(APPVER) $(OBJS) \
  77.   $(COMMON_OBJS) $(PROJ).res $(extralibs) $(guilibsmt) \
  78.   -def:$(HOME)smh32.def -out:$(PROJ).dll -base:@$(BASEFILE),$(PROJ)
  79. !IFDEF MAPISAMP
  80.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  81. !ENDIF
  82.  
  83. # Clean up the intermediate files
  84.  
  85. clean:
  86.   -del *.obj
  87.   -del *.res
  88.   -del *.dll
  89.   -del *.exp
  90.   -del *.lib
  91.