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 / route.cli / makefile < prev    next >
Encoding:
Makefile  |  1996-03-27  |  2.1 KB  |  90 lines

  1. # Makefile to build the Sample Routing Client
  2. # Copyright 1986-1996, Microsoft Corporation. All Rights Reserved.
  3.  
  4. # Key to CPU specific conditions, CPU == i386 || ALPHA || MIPS || PPC
  5. !IF "$(CPU)" == ""
  6. !IF "$(PROCESSOR_ARCHITECTURE)" == "MIPS" || "$(PROCESSOR_ARCHITECTURE)" == "ALPHA" || "$(PROCESSOR_ARCHITECTURE)" == "PPC"
  7. CPU = $(PROCESSOR_ARCHITECTURE)
  8. !ELSE
  9. CPU = i386
  10. !ENDIF
  11. !ENDIF
  12.  
  13. !include <win32.mak>
  14.  
  15. !IFNDEF NODEBUG
  16. cflags = $(cflags) -DDEBUG
  17. !ENDIF
  18.  
  19. !IFDEF PROFILE
  20. lflags = $(lflags) /PROFILE
  21. !ENDIF
  22.  
  23. !IFDEF MAPISAMP
  24. HOME   = $(MAPISAMP)\route.cli^\
  25. COMMON = $(MAPISAMP)\common^\
  26. rcvars = $(rcvars) /I$(HOME)
  27. !ELSE
  28. HOME   = 
  29. COMMON = ..\common^\
  30. !ENDIF
  31.  
  32. PROJ = ROUTE32
  33.  
  34. # Main target dependencies
  35.  
  36. all: $(PROJ).exe
  37.  
  38. # Extra libraries needed, not defined in win32.mak
  39.  
  40. extralibs = mapi32.lib ole32.lib uuid.lib
  41.  
  42. # Object files we need to build
  43.  
  44.  
  45. OBJS = $(OBJS) client.obj route.obj bitmap.obj
  46. COMMON_OBJS = wrap3d.obj cindex.obj
  47. !IFNDEF NODEBUG
  48. COMMON_OBJS = $(COMMON_OBJS) mapidbg.obj
  49. !ENDIF
  50.  
  51. # Build the object files
  52.  
  53. {$(HOME)}.c.obj:
  54.   $(cc) -I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  55.  
  56. pvalloc.obj: $(COMMON)pvalloc.c
  57.   $(cc) -I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  58.  
  59. wrap3d.obj: $(COMMON)wrap3d.c
  60.   $(cc) -I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  61.  
  62. mapidbg.obj: $(COMMON)mapidbg.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)client.rc $(HOME)client.ico $(HOME)client2.ico $(HOME)envelope.bmp
  71.   $(rc) /I$(COMMON) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)client.RC
  72.  
  73. # Link it together to make the executable image
  74.  
  75. $(PROJ).exe: $(OBJS) $(COMMON_OBJS) $(PROJ).res
  76.   $(link) $(linkdebug) $(lflags) -subsystem:windows,$(APPVER) $(OBJS) \
  77.   $(COMMON_OBJS) $(PROJ).res $(guilibsmt) $(extralibs) -out:$(PROJ).exe
  78. !IFDEF MAPISAMP
  79.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  80. !ENDIF
  81.  
  82. # Clean up the intermediate files
  83.  
  84. clean:
  85.   -del *.obj 
  86.   -del *.res
  87.   -del *.exe
  88.   -del *.map
  89.  
  90.