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

  1. # Makefile to build the Sample Routing 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)\route.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 = ROUTE
  27.  
  28. # Main target dependencies
  29.  
  30. all: $(PROJ).exe
  31.  
  32. # Extra libraries needed, not defined in win32.mak
  33.  
  34. extralibs = mapi.lib compobj.lib
  35.  
  36. # Object files we need to build
  37.  
  38. OBJS = client.obj route.obj bitmap.obj
  39. COMMON_OBJS = wrap3d.obj cindex.obj
  40. !IFNDEF NODEBUG
  41. COMMON_OBJS = $(COMMON_OBJS) mapidbg.obj
  42. !ENDIF
  43.  
  44. # Build the object files
  45.  
  46. {$(HOME)}.c.obj:
  47.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  48.   $(cc) $**
  49.  
  50. pvalloc.obj: $(COMMON)pvalloc.c
  51.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  52.   $(cc) $**
  53.  
  54. wrap3d.obj: $(COMMON)wrap3d.c
  55.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  56.   $(cc) $**
  57.  
  58. mapidbg.obj: $(COMMON)mapidbg.c
  59.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  60.   $(cc) $**
  61.  
  62. cindex.obj: $(COMMON)cindex.c
  63.   set cl=-I$(COMMON) $(cdebug) $(cflags) $(cvars)
  64.   $(cc) $**
  65.  
  66. # Build the resources
  67.  
  68. $(PROJ).res: $(HOME)client.rc $(HOME)client.ico $(HOME)client2.ico $(HOME)envelope.bmp
  69.   set INCLUDE=$(INCLUDE);$(HOME);$(COMMON)
  70.   $(rc) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)client.RC
  71.  
  72. # Link it together to make the executable image
  73.  
  74. $(PROJ).exe: $(OBJS) $(COMMON_OBJS) $(PROJ).res
  75.   echo $(OBJS) $(COMMON_OBJS) > link.txt
  76.   echo $(PROJ).exe >> link.txt
  77.   echo $(PROJ).map >> link.txt
  78.   echo $(extralibs) $(guilibs) >> link.txt
  79.   echo $(HOME)route16.def >> link.txt
  80.   $(link) $(ldebug) $(lflags) @link.txt
  81.   $(rc) -t $(PROJ).res $@
  82.  
  83. # Clean up the intermediate files
  84. !IFDEF MAPISAMP
  85.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  86. !ENDIF
  87.  
  88. clean:
  89.   -del *.obj
  90.   -del *.res
  91.   -del *.exe
  92.   -del *.map
  93.   -del link.txt
  94.  
  95.