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 / checkers.frm / makefile.16 < prev    next >
Encoding:
Makefile  |  1996-03-27  |  1.6 KB  |  72 lines

  1. # Makefile to build the Checkers Sample Form
  2.  
  3. !IFDEF MAPISAMP
  4. HOME   = $(MAPISAMP)\checkers.frm^\
  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 = WCHECK
  18.  
  19. # Main target dependencies
  20.  
  21. all: $(PROJ).exe
  22.  
  23. # Extra libraries needed, not defined in win32.mak
  24.  
  25. extralibs = ver.lib compobj.lib
  26.  
  27. # Object files we need to build
  28.  
  29. OBJS = wcheck.obj engine.obj form.obj
  30.  
  31. # Build the object files
  32.  
  33. {$(HOME)}.cpp.obj:
  34.   set cl= /I$(COMMON) $(cdebug) $(cflags) $(cvars)
  35.   $(cc) $**
  36.  
  37. engine.obj: $(HOME)engine\lut.cpp $(HOME)engine\debugio.cpp \
  38.             $(HOME)engine\quality.cpp $(HOME)engine\prune.cpp \
  39.             $(HOME)engine\check.cpp $(HOME)engine.cpp $(HOME)check.h
  40.   set cl=/I$(COMMON) $(cdebug) $(cflags) $(cvars)
  41.   $(cc) $(HOME)engine.cpp
  42.  
  43. # Build the resources
  44.  
  45. $(PROJ).res: $(HOME)$(PROJ).RC $(HOME)$(PROJ).DLG
  46.   set INCLUDE=$(INCLUDE);$(HOME);$(COMMON)
  47.   $(rc) $(rcflags) $(rcvars) /fo $(PROJ).res $(HOME)$(PROJ).RC
  48.  
  49. # Link it together to make the executable image
  50.  
  51. $(PROJ).exe: $(OBJS) $(COMMON_OBJS) $(PROJ).res
  52.   echo $(OBJS) $(COMMON_OBJS) > link.txt
  53.   echo $(PROJ).exe >> link.txt
  54.   echo $(PROJ).map >> link.txt
  55.   echo $(extralibs) $(guilibs) >> link.txt
  56.   echo $(HOME)wcheck16.def >> link.txt
  57.   $(link) $(ldebug) $(lflags) @link.txt
  58.   $(rc) -t $(PROJ).res $@
  59. !IFDEF MAPISAMP
  60.   -copy $@ $(MAPISAMP)\bin\$(PLATFORM)
  61. !ENDIF
  62.  
  63. # Clean up the intermediate files
  64.  
  65. clean:
  66.   -del *.obj
  67.   -del *.res
  68.   -del *.exe
  69.   -del *.map
  70.   -del link.txt
  71.  
  72.