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 / dict / makefile < prev    next >
Encoding:
Makefile  |  1997-10-15  |  2.7 KB  |  92 lines

  1.  
  2. #*************************************************************#
  3. #**                                                         **#
  4. #**                 Microsoft RPC Examples                  **#
  5. #**                 Dictionary Application                  **#
  6. #**            Copyright(c) Microsoft Corp. 1991-1995       **#
  7. #**                                                         **#
  8. #*************************************************************#
  9.  
  10. !include <ntwin32.mak>
  11.  
  12. !if "$(CPU)" == "i386"
  13. cflags = $(cflags:G3=Gz)
  14. cflags = $(cflags) -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl
  15. !else
  16. cflags = $(cflags) -D_CRTAPI1= -D_CRTAPI2=
  17. !endif
  18.  
  19. all : client.exe server.exe play.exe
  20.  
  21. # Make the client
  22. client : client.exe
  23. client.exe : client.obj util0.obj replay_c.obj
  24.     $(link) $(linkdebug) $(conflags) -out:client.exe -map:client.map \
  25.       client.obj util0.obj replay_c.obj \
  26.       rpcrt4.lib $(conlibsdll)
  27.  
  28. # dict client main program
  29. client.obj : client.c util0.h replay.h
  30.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  31.  
  32. # dict client stub
  33. replay_c.obj : replay_c.c replay.h
  34.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  35.  
  36.  
  37. # Make the server executable
  38. server : server.exe
  39. server.exe : server.obj util0.obj replay_s.obj replay.obj dict0.obj
  40.     $(link) $(linkdebug) $(conflags) -out:server.exe -map:server.map \
  41.       server.obj util0.obj replay_s.obj replay.obj dict0.obj \
  42.       rpcrt4.lib $(conlibsdll)
  43.  
  44. # dict server main program
  45. server.obj : server.c util0.h replay.h
  46.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  47.  
  48. # dict remote procedures
  49. replay.obj : replay.c util0.h replay.h
  50.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  51.  
  52. # dict server auxiliary file
  53. replay_s.obj : replay_s.c replay.h
  54.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  55.  
  56. # make the local executable
  57. play : play.exe
  58. play.exe : play.obj lutil0.obj dict0.obj
  59.     $(link) $(linkdebug) $(conflags) -out:play.exe -map:play.map \
  60.       play.obj lutil0.obj dict0.obj \
  61.       $(conlibsdll)
  62.  
  63. # dict local main program
  64. play.obj : play.c util0.h dict0.h
  65.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  66.  
  67. dict0.obj : dict0.c dict0.h
  68.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  69.  
  70. util0.obj : util0.c util0.h
  71.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  72.  
  73. lutil0.obj : util0.c util0.h
  74.    copy util0.c lutil0.c
  75.    $(cc) $(cdebug) $(cflags) $(cvarsdll) -D_LOCAL lutil0.c
  76.    del lutil0.c
  77.  
  78. # Stubs and header file from the IDL file
  79. replay.h replay_s.c replay_c.c : replay.idl replay.acf
  80.     midl -ms_ext -oldnames -no_cpp replay.idl
  81.  
  82. # Clean up everything
  83. cleanall : clean
  84.     -del *.exe
  85.  
  86. # Clean up everything but the .EXEs
  87. clean :
  88.     -del *.obj
  89.     -del *.map
  90.     -del replay_?.c
  91.     -del replay.h
  92.