home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / video / palmap / makefile < prev    next >
Encoding:
Makefile  |  1995-11-17  |  1.4 KB  |  57 lines

  1. # Nmake macros for building Windows 32-Bit apps
  2.  
  3. !include <win32.mak>
  4.  
  5. guiflags=-DLL
  6. TARGETNAME =    palmap32
  7. OBJS=        palmap.obj dibmap.obj
  8. LIBS=           $(guilibs) vfw32.lib ole32.lib
  9.  
  10.  
  11. !if "$(CPU)" == "i386" # .syms are useful for Win95
  12. SYM = $(TARGETNAME).sym
  13. !endif
  14.  
  15. all: $(TARGETNAME).dll $(SYM)
  16.  
  17.  
  18. OTHERCLOPTS=-DWIN32_LEAN_AND_MEAN -nologo -I..\include
  19. OTHERRCOPTS=-DWIN32_LEAN_AND_MEAN -I..\include
  20.  
  21.  
  22. # Update the resource if necessary
  23.  
  24. $(TARGETNAME).res: palmap.rc palmap.rcv
  25.     $(rc) -r -DWIN32 -fo $@ $(OTHERRCOPTS) palmap.rc
  26.  
  27.  
  28. # Update the object file if necessary
  29.  
  30. palmap.obj: palmap.c palmap.h dibmap.h palmap.rc
  31.     $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) palmap.c
  32.  
  33. dibmap.obj: dibmap.c dibmap.h
  34.     $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) dibmap.c
  35.  
  36.  
  37. # Update the executable file if necessary, and if so, add the resource back in.
  38.  
  39. $(TARGETNAME).dll $(TARGETNAME).map:  $(OBJS) $(@B).res $(@B).def
  40.     $(implib) -out:$(@B).lib -def:$(@B).def $(OBJS)
  41.     $(link) $(linkdebug) $(dlllflags) -out:$(@B).dll $(@B).exp $(OBJS) \
  42.     $(@B).res $(LIBS) -map:$*.map
  43.     
  44. $(TARGETNAME).sym:    $*.map
  45.     mapsym $*.map
  46.  
  47. clean:
  48.     @if exist $(TARGETNAME).dll del $(TARGETNAME).dll
  49.     @if exist *.obj del *.obj
  50.     @if exist *.map del *.map
  51.     @if exist *.sym del *.sym
  52.     @if exist *.res del *.res
  53.     @if exist *.pdb del *.pdb
  54.     @if exist *.exp del *.exp
  55.     @if exist *.lib del *.lib
  56.  
  57.