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.16 < prev    next >
Encoding:
Makefile  |  1996-03-27  |  1.6 KB  |  78 lines

  1. # Makefile to build the Simple MAPI Client
  2.  
  3. !IFDEF MAPISAMP
  4. HOME   = $(MAPISAMP)\simple.cli^\
  5. COMMON = $(MAPISAMP)\common^\
  6. !ELSE
  7. HOME   = 
  8. COMMON = ..\common^\
  9. !ENDIF
  10.  
  11. !include <$(COMMON)win16.mak>
  12.  
  13. !IFNDEF NODEBUG
  14. cflags = $(cflags) -DDEBUG
  15. !ENDIF
  16.  
  17. PROJ = smpcli
  18.  
  19. # Main target dependencies
  20.  
  21. all: $(PROJ).exe
  22.  
  23. # Extra libraries needed, not defined in win16.mak
  24.  
  25. extralibs = mapi.lib
  26.  
  27. # Object files we need to build
  28.  
  29. OBJS = client.obj bitmap.obj 
  30. COMMON_OBJS = pvalloc.obj
  31. !IFNDEF NODEBUG
  32. COMMON_OBJS = $(COMMON_OBJS) mapidbg.obj
  33. !ENDIF
  34.  
  35. # Build the object files
  36.  
  37. {$(HOME)}.c.obj:
  38.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  39.   $(cc) $**
  40.  
  41. pvalloc.obj: $(COMMON)pvalloc.c
  42.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  43.   $(cc) $(COMMON)pvalloc.c
  44.  
  45. mapidbg.obj: $(COMMON)mapidbg.c
  46.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  47.   $(cc) $(COMMON)mapidbg.c
  48.  
  49. # Build the resources
  50.  
  51. $(PROJ).res: $(HOME)client.rc $(HOME)client.ico $(HOME)client2.ico $(HOME)envelope.bmp
  52.   set INCLUDE=$(INCLUDE);$(HOME);$(COMMON)
  53.   $(rc) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)client.RC
  54.  
  55. # Link it together to make the executable image
  56.  
  57. $(PROJ).exe: $(OBJS) $(COMMON_OBJS) $(PROJ).res
  58.   echo $(OBJS) $(COMMON_OBJS) > link.txt
  59.   echo $(PROJ).exe >> link.txt
  60.   echo $(PROJ).map >> link.txt
  61.   echo $(extralibs) $(guilibs) >> link.txt
  62.   echo $(HOME)smpcli16.def >> link.txt
  63.   $(link) $(ldebug) $(lflags) @link.txt
  64.   $(rc) -t $(PROJ).res $@
  65. !IFDEF MAPISAMP
  66.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  67. !ENDIF
  68.  
  69. # Clean up the intermediate files
  70.  
  71. clean:
  72.   -del *.obj
  73.   -del *.res
  74.   -del *.exe
  75.   -del *.map
  76.   -del link.txt
  77.  
  78.