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 / pipes / makefile < prev    next >
Encoding:
Makefile  |  1997-10-15  |  2.5 KB  |  83 lines

  1. #*************************************************************#
  2. #**                                                         **#
  3. #**                 Microsoft RPC Samples                   **#
  4. #**                   pipes Application                     **#
  5. #**         Copyright(c) Microsoft Corp. 1992-1996          **#
  6. #**                                                         **#
  7. #** This is the makefile used to make the client and the    **#
  8. #** server for the pipe sample program where the client     **#
  9. #** sends a file to the server for "encoding", using pipes, **#
  10. #** and then the file is sent back to the client.           **#
  11. #** This file will compile for ANSI characters, to compile  **#
  12. #** for UNICODE, type nmake /f makefile.uni at the command  **#
  13. #** line                                                    **#
  14. #*************************************************************#
  15. # FILE : MAKEFILE
  16.  
  17. !include <ntwin32.mak>
  18.  
  19. !if "$(CPU)" == "i386"
  20. cflags = $(cflags) -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl
  21. !else
  22. cflags = $(cflags) -D_CRTAPI1= -D_CRTAPI2=
  23. !endif
  24.  
  25. # Let the compiler know what version we are running
  26. cflags=$(cflags) -D_WIN32_WINNT=0x400
  27.  
  28. # Need to use the __stdcall convention when using pipes
  29. cvarsdll = $(cvarsdll) -Gz
  30.  
  31. all : client server
  32.  
  33. # Make the client side application 
  34. client : client.exe
  35. client.exe : pipec.obj pipe_c.obj
  36.     $(link) $(linkdebug) $(conflags) -out:client.exe \
  37.       pipec.obj pipe_c.obj \
  38.       rpcrt4.lib rpcns4.lib $(conlibsdll)
  39.  
  40. # client main program
  41. pipec.obj : pipec.c pipe.h
  42.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  43.  
  44. # client stub
  45. pipe_c.obj : pipe_c.c pipe.h
  46.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  47.  
  48. # Make the server side application
  49. server : server.exe
  50. server.exe : pipes.obj pipeproc.obj pipe_s.obj
  51.     $(link) $(linkdebug) $(conflags) -out:server.exe \
  52.       pipes.obj pipe_s.obj pipeproc.obj \
  53.       rpcrt4.lib rpcns4.lib $(conlibsdll)
  54.  
  55. # server main program
  56. pipes.obj : pipes.c pipe.h
  57.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  58.  
  59. # remote procedures
  60. pipeproc.obj : pipeproc.c pipe.h
  61.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  62.  
  63. # server stub file
  64. pipe_s.obj : pipe_s.c pipe.h
  65.    $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c
  66.  
  67.  
  68. # Stubs and header file from the IDL file
  69. pipe.h pipe_c.c pipe_s.c : pipe.idl
  70.     midl $(midlflags) -cpp_cmd $(cc) pipe.idl
  71.     
  72. # Clean up everything
  73. cleanall : clean
  74.     -del *.exe
  75.  
  76. # Clean up everything but the .EXEs
  77. clean :
  78.     -del *.obj
  79.     -del pipe_c.c
  80.     -del pipe_s.c
  81.     -del pipe.h
  82.     -del tempfile.oak
  83.