home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / winnt / netwatch / makefile < prev    next >
Makefile  |  1996-01-07  |  1KB  |  53 lines

  1. OBJS = netwatch.obj net.obj utils.obj
  2.  
  3. # Nmake macros for building Windows 32-Bit apps
  4.  
  5. TARGETOS=WINNT
  6. !include <win32.mak>
  7.  
  8. cflags = $(cflags) -D DOSHAREMANAGE
  9. rcflags = $(rcflags) -d DOSHAREMANAGE
  10.  
  11. !IFNDEF NODEBUG
  12. cflags = $(cflags) -D DEBUG
  13. rcflags = $(rcflags) -d DEBUG
  14. !ENDIF
  15.  
  16. all: netwatch.exe
  17.  
  18. # Update the resource if necessary
  19.  
  20. netwatch.res: netwatch.rc netwatch.h
  21.     rc $(rcflags) $(rcvars) -fo netwatch.res netwatch.rc
  22.  
  23. # Update the object file if necessary
  24.  
  25. netwatch.obj: netwatch.c netwatch.h
  26.     $(cc) $(cflags) $(cvars) $(cdebug) netwatch.c
  27.  
  28. utils.obj: utils.c netwatch.h
  29.     $(cc) $(cflags) $(cvars) $(cdebug) utils.c
  30.  
  31. net.obj: net.c netwatch.h
  32.     $(cc) $(cflags) $(cvars) $(cdebug) net.c
  33.  
  34. # Update the executable file if necessary, and if so, add the resource back in.
  35.  
  36. NetWatch.exe: $(OBJS) netwatch.res
  37.     $(link) $(linkdebug) $(guilflags) /OUT:$*.exe $(OBJS) \
  38.         netwatch.res netapi32.lib advapi32.lib shell32.lib \
  39.         mpr.lib comctl32.lib $(guilibs)
  40. !IF ("$(TARGETLANG)" == "LANG_JAPANESE") && ("$(OS)" == "Windows_NT")
  41.     rlman -p 932 -n 17 1 -a $*.exe $*.tok $*.exe
  42. !ENDIF
  43.  
  44. clean:
  45.     if exist *.obj del *.obj > nul
  46.     if exist *.res del *.res > nul
  47.     if exist *.exe del *.exe > nul
  48.     if exist *.map del *.map > nul
  49.     if exist *.sym del *.sym > nul
  50.     if exist *.res del *.res > nul
  51.     if exist *.sbr del *.sbr > nul
  52.     if exist *.bsc del *.bsc > nul
  53.