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 / cmc.cli / makefile.16 < prev    next >
Makefile  |  1996-03-27  |  2KB  |  81 lines

  1. # Makefile to build the Sample CMC 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. !IFDEF MAPISAMP
  13. HOME   = $(MAPISAMP)\cmc.cli^\
  14. COMMON = $(MAPISAMP)\common^\
  15. !ELSE
  16. HOME   = 
  17. COMMON = ..\common^\
  18. !ENDIF
  19.  
  20. !include <$(COMMON)win16.mak>
  21.  
  22. !IFNDEF NODEBUG
  23. cflags = $(cflags) -DDEBUG
  24. !ENDIF
  25.  
  26. PROJ = CMCCLI
  27.  
  28. # Main target dependencies
  29.  
  30. all: $(PROJ).exe
  31.  
  32. # Extra libraries needed, not defined in win32.mak
  33.  
  34. extralibs = lzexpand.lib
  35.  
  36. # Object files we need tp build
  37.  
  38. OBJS = cmccli.obj 
  39. COMMON_OBJS = pvalloc.obj
  40.  
  41. # Build the object files
  42.  
  43. {$(HOME)}.c.obj:
  44.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  45.   $(cc) $**
  46.  
  47. pvalloc.obj: $(COMMON)pvalloc.c
  48.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  49.   $(cc) $**
  50.  
  51. # Build the resources
  52.  
  53. $(PROJ).res: $(HOME)cmccli.rc $(HOME)cmccli.ico $(HOME)cmccli2.ico \
  54.              $(HOME)read.bmp $(HOME)unread.bmp $(HOME)reada.bmp \
  55.              $(HOME)unreada.bmp
  56.   set INCLUDE=$(INCLUDE);$(HOME);$(COMMON)
  57.   $(rc) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)CMCCLI.RC
  58.  
  59. # Link it together to make the executable image
  60.  
  61. $(PROJ).exe: $(OBJS) $(COMMON_OBJS) $(PROJ).res
  62.   echo $(OBJS) $(COMMON_OBJS) > link.txt
  63.   echo $(PROJ).exe >> link.txt
  64.   echo $(PROJ).map >> link.txt
  65.   echo $(extralibs) $(guilibs) >> link.txt
  66.   echo $(HOME)cmccli16.def >> link.txt
  67.   $(link) $(ldebug) $(lflags) @link.txt
  68.   $(rc) -t $(PROJ).res $@
  69. !IFDEF MAPISAMP
  70.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  71. !ENDIF
  72.  
  73. # Clean up the intermediate files
  74.  
  75. clean:
  76.   -del *.obj
  77.   -del *.res
  78.   -del *.exe
  79.   -del *.map
  80.   -del link.txt
  81.