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 / simple.cli / makefile < prev    next >
Encoding:
Makefile  |  1996-03-27  |  1.8 KB  |  82 lines

  1. # Makefile to build the Simple MAPI Client
  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)\simple.cli^\
  20. COMMON = $(MAPISAMP)\common^\
  21. rcvars = $(rcvars) /I$(HOME)
  22. !ELSE
  23. HOME   = 
  24. COMMON = ..\common^\
  25. !ENDIF
  26.  
  27. PROJ = SMPCLI32
  28.  
  29. # Main target dependencies
  30.  
  31. all: $(PROJ).exe
  32.  
  33. # Extra libraries needed, not defined in win32.mak
  34.  
  35. !IFDEF NODEBUG
  36. extralibs =
  37. !ELSE
  38. extralibs = mapi32.lib
  39. !ENDIF
  40.  
  41. # Object files we need to build
  42.  
  43. OBJS = client.obj bitmap.obj
  44. COMMON_OBJS = pvalloc.obj
  45. !IFNDEF NODEBUG
  46. COMMON_OBJS = $(COMMON_OBJS) mapidbg.obj
  47. !ENDIF
  48.  
  49. # Build the object files
  50.  
  51. {$(HOME)}.c.obj:
  52.   $(cc) -I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  53.  
  54. pvalloc.obj: $(COMMON)pvalloc.c
  55.   $(cc) -I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  56.  
  57. mapidbg.obj: $(COMMON)mapidbg.c
  58.   $(cc) -I$(COMMON) $(cdebug) $(cflags) $(cvarsmt) $**
  59.  
  60. # Build the resources
  61.  
  62. $(PROJ).res: $(HOME)client.rc $(HOME)client.ico $(HOME)client2.ico $(HOME)envelope.bmp
  63.   $(rc) /I$(COMMON) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)client.RC
  64.  
  65. # Link it together to make the executable image
  66.  
  67. $(PROJ).exe: $(OBJS) $(PROJ).res $(COMMON_OBJS)
  68.   $(link) $(linkdebug) $(lflags) -subsystem:windows,$(APPVER) $(OBJS) \
  69.   $(COMMON_OBJS) $(PROJ).res $(guilibsmt) $(extralibs) -out:$(PROJ).exe
  70. !IFDEF MAPISAMP
  71.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  72. !ENDIF
  73.  
  74. # Clean up the intermediate files
  75.  
  76. clean:
  77.   -del *.obj
  78.   -del *.res
  79.   -del *.exe
  80.   -del *.map
  81.  
  82.