home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / audio / wavefile / makefile < prev    next >
Makefile  |  1996-01-14  |  2KB  |  57 lines

  1. # Nmake macros for building Windows 32-Bit apps
  2.  
  3. !include <win32.mak>
  4.  
  5. TARGETNAME =    wavef32
  6.  
  7. !if "$(CPU)" == "i386" # .syms are useful for Win95
  8. SYM = $(TARGETNAME).sym
  9. !endif
  10.  
  11. all: $(TARGETNAME).dll $(SYM)
  12.  
  13. OBJS=        wavefile.obj factory1.obj extra.obj
  14.  
  15. OTHERCLOPTS=-DWIN32_LEAN_AND_MEAN -nologo -I. -I..\include
  16. OTHERRCOPTS=-DWIN32_LEAN_AND_MEAN -I. -I..\include
  17.  
  18.  
  19. # Update the resource if necessary
  20.  
  21. wavefile.res: wavefile.rc wavefile.rcv
  22.     $(rc) -r -DWIN32 $(OTHERRCOPTS) wavefile.rc
  23.  
  24.  
  25. # Update the object files if necessary
  26.  
  27. factory1.obj: factory1.c wavefile.h
  28.     $(cc) $(cdebug) $(cflags) $(cvarsdll) $(OTHERCLOPTS) factory1.c
  29.  
  30. extra.obj: extra.c extra.h
  31.     $(cc) $(cdebug) $(cflags) $(cvarsdll) $(OTHERCLOPTS) extra.c
  32.  
  33. wavefile.obj: wavefile.c wavefile.h muldiv32.h
  34.     $(cc) $(cdebug) $(cflags) $(cvarsdll) $(OTHERCLOPTS) wavefile.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) wavefile.res
  40.     $(implib) -out:$(@B).lib -def:$(TARGETNAME).def $(OBJS)
  41.     $(link) $(linkdebug) $(dlllflags) -out:$*.dll  \
  42.            $(@B).exp $(OBJS) wavefile.res $(olelibsdll) vfw32.lib winmm.lib \
  43.                -map:$*.map
  44.     
  45. $(TARGETNAME).sym:    $*.map
  46.     mapsym $*.map
  47.  
  48. clean:
  49.     @if exist $(TARGETNAME).dll del $(TARGETNAME).dll
  50.     @if exist *.obj del *.obj
  51.     @if exist *.map del *.map
  52.     @if exist *.sym del *.sym
  53.     @if exist *.res del *.res
  54.     @if exist *.pdb del *.pdb
  55.     @if exist *.exp del *.exp
  56.     @if exist *.lib del *.lib
  57.