home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / porttool / makefile next >
Makefile  |  1997-10-15  |  2KB  |  73 lines

  1. # Nmake macros for building Windows 32-Bit apps
  2.  
  3. !include <win32.mak>
  4.  
  5. !if "$(CPU)" == "i386"
  6. cflags = $(cflags) -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl
  7. !else
  8. cflags = $(cflags) -D_CRTAPI1= -D_CRTAPI2=
  9. !endif
  10.  
  11. all: porttool.exe port.dll
  12.  
  13. # Update the object files if necessary
  14.  
  15. porttool.obj : porttool.c porttool.h
  16.     $(cc) $(cflags) $(cvars) $(cdebug) porttool.c
  17.  
  18. ptbkport.obj : ptbkport.c porttool.h
  19.     $(cc) $(cflags) $(cvars) $(cdebug) ptbkport.c
  20.  
  21. ptdlgs.obj : ptdlgs.c porttool.h
  22.     $(cc) $(cflags) $(cvars) $(cdebug) ptdlgs.c
  23.  
  24. ptfile.obj : ptfile.c porttool.h
  25.     $(cc) $(cflags) $(cvars) $(cdebug) ptfile.c
  26.  
  27. ptprint.obj : ptprint.c porttool.h
  28.     $(cc) $(cflags) $(cvars) $(cdebug) ptprint.c
  29.  
  30. ptfind.obj : ptfind.c porttool.h
  31.     $(cc) $(cflags) $(cvars) $(cdebug) ptfind.c
  32.  
  33. port.obj: port.c port.h
  34.     $(cc) $(cflags) $(cvars) $(cdebug) port.c
  35.  
  36. # Update the resources if necessary
  37.  
  38. porttool.res: porttool.rc porttool.h porttool.dlg porttool.ico portstat.ico
  39.     $(rc) $(rcflags) $(rcvars) porttool.rc
  40.  
  41. port.res: port.rc port.h portpriv.h portstat.ico
  42.     $(rc) $(rcflags) $(rcvars) port.rc
  43.  
  44. # Update the import library
  45.  
  46. port.lib: port.obj port.def port.res
  47.     $(implib) -machine:$(CPU)     \
  48.     -def:port.def        \
  49.     port.obj    \
  50.     -out:port.lib
  51.  
  52. porttool.exp: porttool.obj porttool.def 
  53.     $(implib) -machine:$(CPU)     \
  54.     -def:porttool.def        \
  55.     porttool.obj ptdlgs.obj ptprint.obj ptfind.obj ptbkport.obj  \
  56.     -out:porttool.lib
  57.  
  58.  
  59. # Update the dynamic link library
  60.  
  61. port.dll: port.obj port.def port.lib
  62.     $(link) $(linkdebug) $(dlllflags)     \
  63.     -base:0x1C000000  \
  64.     -out:port.dll   \
  65.     port.exp port.obj port.res $(guilibs)
  66.  
  67.  
  68. # Update the executable file if necessary.
  69. # If so, add the resource back in.
  70.  
  71. porttool.exe: porttool.obj port.dll port.lib porttool.res porttool.def ptbkport.obj ptdlgs.obj ptfile.obj ptfind.obj ptprint.obj porttool.exp
  72.     $(link) $(linkdebug) $(guiflags) -out:porttool.exe porttool.obj port.lib porttool.res ptbkport.obj ptdlgs.obj ptfile.obj ptfind.obj ptprint.obj porttool.exp $(guilibs)
  73.