home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / netds / rpc / ns / nhello / makefile < prev    next >
Encoding:
Makefile  |  1997-10-15  |  2.5 KB  |  85 lines

  1. #*************************************************************#
  2. #**                                                         **#
  3. #**                 Microsoft RPC Examples                  **#
  4. #**                   nhello Application                    **#
  5. #**            Copyright(c) Microsoft Corp. 1992-1996       **#
  6. #**                                                         **#
  7. #*************************************************************#
  8.  
  9. !include <ntwin32.mak>
  10.  
  11. !if "$(CPU)" == "i386"
  12. cflags = $(cflags) -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl
  13. !else
  14. cflags = $(cflags) -D_CRTAPI1= -D_CRTAPI2=
  15. !endif
  16.  
  17. all : nhelloc nhellos nsserv
  18.  
  19. # Make the nhelloc
  20. nhelloc : nhelloc.exe
  21. nhelloc.exe : nhelloc.obj nhello_c.obj
  22.     $(link) $(linkdebug) $(conflags) -out:nhelloc.exe \
  23.       nhelloc.obj nhello_c.obj \
  24.       rpcrt4.lib rpcns4.lib $(conlibsdll)
  25.  
  26. # nhelloc main program
  27. nhelloc.obj : nhelloc.c nhello.h
  28.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  29.  
  30. # nhelloc stub
  31. nhello_c.obj : nhello_c.c nhello.h
  32.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  33.  
  34.  
  35. # Make the nhellos
  36. nhellos : nhellos.exe
  37. nhellos.exe : nhellos.obj nhellop.obj nhello_s.obj
  38.     $(link) $(linkdebug) $(conflags) -out:nhellos.exe \
  39.       nhellos.obj nhello_s.obj nhellop.obj \
  40.       rpcrt4.lib rpcns4.lib $(conlibsdll)
  41.  
  42. # nhellos main loop
  43. nhellos.obj : nhellos.c nhello.h
  44.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  45.  
  46. # remote procedures
  47. nhellop.obj  : nhellop.c nhello.h
  48.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  49.  
  50. # nhellos stub file
  51. nhello_s.obj : nhello_s.c nhello.h
  52.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  53.  
  54. # Make the nhellos
  55. nsserv : nsserv.exe
  56. nsserv.exe : nsserv.obj nhellop.obj nhello_s.obj service.obj
  57.     $(link) $(linkdebug) $(conflags) -out:nsserv.exe \
  58.       nsserv.obj nhello_s.obj nhellop.obj service.obj \
  59.       rpcrt4.lib rpcns4.lib $(conlibsdll) advapi32.lib shell32.lib
  60.  
  61. # nhellos main loop
  62. nsserv.obj : nsserv.c nhello.h service.h
  63.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  64.  
  65. # nsserv serivce manager interface
  66. service.obj : service.c service.h
  67.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  68.  
  69.  
  70. # Stubs and header file from the IDL file
  71. nhello.h nhello_c.c nhello_s.c : nhello.idl
  72.     midl -ms_ext -cpp_cmd $(cc) -cpp_opt "-E" nhello.idl
  73.  
  74. # Clean up everything
  75. cleanall : clean
  76.     -del *.exe
  77.  
  78. # Clean up everything but the .EXEs
  79. clean :
  80.     -del *.obj
  81.     -del *.map
  82.     -del nhello_c.c
  83.     -del nhello_s.c
  84.     -del nhello.h
  85.