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 / peer.xp / makefile.16 < prev    next >
Makefile  |  1996-03-27  |  2KB  |  79 lines

  1. # Makefile to build the MAPI Sample Transport Provider
  2.  
  3. !IFDEF MAPISAMP
  4. HOME   = $(MAPISAMP)\peer.xp^\
  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     = SMPXP
  18.  
  19. # Main target dependencies
  20.  
  21. all: $(PROJ).dll
  22.  
  23. # Extra libraries needed, not defined in win32.mak
  24.  
  25. extralibs = mapi.lib
  26.  
  27. # Object files we need to build
  28.  
  29. OBJS1 =  XPBASE.OBJ XPDIALOG.OBJ XPGUID.OBJ XPLOGGER.OBJ XPOPTION.OBJ
  30. OBJS2 =  XPQUEUE.OBJ XPRCVMSG.OBJ XPSNDMSG.OBJ XPSOF.OBJ XPSTATUS.OBJ
  31. COMMON_OBJS = wep.obj
  32. !IFNDEF NODEBUG
  33. COMMON_OBJS = $(COMMON_OBJS) mapidbg.obj
  34. !ENDIF
  35.  
  36. # Build the object files
  37.  
  38. {$(HOME)}.c.obj:
  39.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsdll) $**
  40.  
  41. mapidbg.obj: $(COMMON)mapidbg.c
  42.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsdll) $**
  43.  
  44. wep.obj: $(COMMON)wep.c
  45.   $(cc) /I$(COMMON) $(cdebug) $(cflags) $(cvarsdll) $**
  46.  
  47. # Build the resources
  48.  
  49. $(PROJ).res: $(HOME)XPRESRC.RC $(HOME)XPRESRC.DLG
  50.   set INCLUDE=$(INCLUDE);$(HOME);$(COMMON)
  51.   $(rc) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)XPRESRC.RC
  52.  
  53. # Link it together to make the executable image
  54.  
  55. $(PROJ).dll: $(OBJS1) $(OBJS2) $(COMMON_OBJS) $(PROJ).res
  56.   echo $(OBJS1: = +) + > link.txt
  57.   echo $(OBJS2: = +) + >> link.txt
  58.   echo $(COMMON_OBJS: = +) >> link.txt
  59.   echo $(PROJ).dll >> link.txt
  60.   echo $(PROJ).map >> link.txt
  61.   echo $(extralibs) $(guilibsdll) >> link.txt
  62.   echo $(HOME)dll16.def >> link.txt
  63.   $(link) $(ldebug) $(dlllflags) @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 *.lib 
  75.   -del *.dll 
  76.   -del *.map 
  77.   -del link.txt
  78.  
  79.