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 / remote.xp / makefile < prev    next >
Encoding:
Makefile  |  1997-10-10  |  3.0 KB  |  106 lines

  1. # Makefile for sample remote transport
  2.  
  3. # Nmake macros for building Windows 32-Bit apps
  4. APPVER=4.0
  5.  
  6. #REM Key to CPU specific conditions, CPU == i386 || ALPHA || MIPS || PPC     1) cvtres
  7. #     cvtres -$(CPU) ...
  8. !IF "$(CPU)" == ""
  9. !IF "$(PROCESSOR_ARCHITECTURE)" == "MIPS" || "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" || "$(PROCESSOR_ARCHITECTURE)" == "PPC"
  10. CPU = $(PROCESSOR_ARCHITECTURE)
  11. !ELSE
  12. CPU = i386
  13. !ENDIF
  14. !ENDIF
  15.  
  16. !include <win32.mak>
  17.  
  18. !IFDEF MAPISAMP
  19. HOME   = $(MAPISAMP)\remote.xp^\
  20. COMMON = $(MAPISAMP)\common^\
  21. rcvars = $(rcvars) /I$(HOME)
  22. !ELSE
  23. HOME   = 
  24. COMMON = ..\common^\
  25. !ENDIF
  26.  
  27. PROJ=xpwdsr
  28.  
  29. all: $(PROJ)32.dll
  30.  
  31. # Define project specific macros
  32. !IFDEF NODEBUG
  33. TRACES_FILE = 
  34. TRACES_DEP =
  35. !ELSE
  36. TRACES_FILE = traces.obj
  37. TRACES_DEP = $(COMMON)traces.h
  38. cflags = $(cflags) -DDEBUG -D_DEBUG
  39. !ENDIF
  40.  
  41. DLL_OBJS   = winds_c.obj $(TRACES_FILE) xpsrvce.obj xpprov.obj \
  42.              xplogon.obj xpstatus.obj xpfolder.obj xplist.obj comwinds.obj \
  43.              xpstream.obj
  44. DLL_DEP    = $(HOME)xpwdsr.h $(HOME)xplist.h $(HOME)resource.h $(TRACES_DEP) \
  45.              $(HOME)comwinds.h $(HOME)windsgbl.h $(HOME)uisrvcs.h
  46. EXTRA_LIBS = mapi32.lib uuid.lib rpcrt4.lib
  47. RC_DEP     = $(HOME)resource.h $(HOME)uisrvcs.h $(HOME)uisrvcs.dlg
  48.  
  49. # Dependencies
  50. #traces.obj:     $(COMMON)traces.cpp  $(COMMON)traces.h
  51. #winds_c.obj:    $(HOME)winds_c.c           $(HOME)winds.h
  52. #comwinds.obj:   $(HOME)comwinds.cpp        $(HOME)comwinds.h $(HOME)windsgbl.h $(HOME)winds.h
  53. #xpsrvce.obj:    $(HOME)xpsrvce.cpp         $(DLL_DEP)
  54. #xpprov.obj:     $(HOME)xpprov.cpp          $(DLL_DEP)
  55. #xplogon.obj:    $(HOME)xplogon.cpp         $(DLL_DEP)
  56. #xpstatus.obj:   $(HOME)xpstatus.cpp        $(DLL_DEP)
  57. #xpfolder.obj:   $(HOME)xpfolder.cpp        $(DLL_DEP)
  58. #xplist.obj:     $(HOME)xplist.cpp          $(DLL_DEP)
  59. #xpwizard.obj:   $(HOME)xpwizard.cpp        $(DLL_DEP)
  60. #xpstream.obj:   $(HOME)xpstream.cpp        $(DLL_DEP)
  61.  
  62. #winds.h winds_c.c winds_s.c : $(HOME)winds.idl $(HOME)winds.acf
  63. #    midl /ms_ext $(HOME)winds.idl
  64.  
  65. # Inference rule for updating the object files
  66. {$(HOME)}.cpp.obj:
  67.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) -GX -Utry $**
  68.  
  69. {$(HOME)}.c.obj:
  70.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) -GX -Utry $**
  71.  
  72. traces.obj: $(COMMON)traces.cpp $(COMMON)traces.h
  73.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) -GX -Utry $(COMMON)traces.cpp
  74.  
  75. # Build rule for the DLL
  76. $(PROJ)32.dll: $(DLL_OBJS) $(PROJ).res
  77.     $(link)               \
  78.     $(linkdebug) $(dlllflags)       \
  79.     -machine:$(CPU)           \
  80.     -out:$(PROJ)32.dll       \
  81.     -def:$(HOME)$(PROJ)32.DEF  \
  82.     $(PROJ).res            \
  83.     $(DLL_OBJS) $(EXTRA_LIBS) $(guilibsmt)
  84. !IFDEF MAPISAMP
  85.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  86. !ENDIF
  87.  
  88.  
  89. # Build rule for resource file
  90. $(PROJ).res: $(HOME)$(PROJ).rc $(RC_DEP)
  91.     $(rc) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)$(PROJ).rc
  92.  
  93.  
  94.  
  95. # Rules for cleaning out those old files
  96. clean:
  97.     -del *.bak
  98.     -del *.pdb
  99.     -del *.obj
  100.     -del *.res
  101.     -del *.exp
  102.     -del *.map
  103.     -del *.sbr
  104.     -del *.bsc
  105. #    del winds.h winds_c.c winds_s.c
  106.