|
|
1.1 root 1: #*************************************************************#
2: #** **#
3: #** Microsoft RPC Examples **#
4: #** Mandelbrot RPC Application **#
5: #** Copyright(c) Microsoft Corp. 1991 **#
6: #** **#
7: #*************************************************************#
8: # The same source code is used to build either a standalone
9: # or an RPC version of the Microsoft Windows (R) Mandelbrot
10: # sample application. The flag RPC determines which version
11: # is built. To build a standalone version, use the commands:
12: # >nmake cleanall
1.1.1.2 root 13: # >set NOTRPC=1
1.1 root 14: # >nmake
15: # To build the RPC version, use the commands:
16: # >nmake cleanall
1.1.1.2 root 17: # >set NOTRPC=
1.1 root 18: # >nmake
19: !include <ntwin32.mak>
20:
1.1.1.2 root 21: !ifdef NOTRPC
1.1 root 22: RPCFLAG =
1.1.1.2 root 23: !else
24: RPCFLAG = -DRPC
1.1 root 25: !endif
26:
27: # Establish the inference rules.
28: # Use lower warning levels for the RPC version on MIPS;
29: # remove -std switch from compiler switches
30: # Use different command line input for object conversion.
31:
1.1.1.2 root 32: cvtomf =
1.1 root 33: !if "$(CPU)" == "MIPS"
1.1.1.2 root 34: cvtomf = mip2coff $@
1.1 root 35: !endif
36:
1.1.1.3 ! root 37: !if "$(CPU)" == "i386"
! 38: # workaround for Windows NT 10/92 beta
! 39: cflags = $(cflags:G3=Gz)
! 40: !endif
! 41:
1.1 root 42: .c.obj:
43: $(cc) $(cflags) $(cvars) $(RPCFLAG) $<
1.1.1.2 root 44: $(cvtomf)
1.1 root 45:
46: # Targets
47: # The RPC version produces client and server executables.
48: # The standalone version produces a single exe file, "mandel".
49:
1.1.1.2 root 50: !ifndef NOTRPC
1.1 root 51: all: client.exe server.exe
52: !else
53: all: mandel.exe
54: !endif
55:
1.1.1.3 ! root 56: mandel.exe: mandel.obj remote.obj mandel.def mandel.rbj calc.obj
1.1 root 57: $(link) $(guiflags) -out:mandel.exe -map:mandel.map \
1.1.1.3 ! root 58: mandel.obj remote.obj calc.obj mandel.rbj $(guilibs)
1.1 root 59:
1.1.1.3 ! root 60: client.exe: mandel.obj remote.obj mandel.def mandel.rbj \
1.1 root 61: mdlrpc_c.obj mdlrpc_x.obj
62: $(link) $(guiflags) -out:client.exe -map:client.map \
63: mandel.obj remote.obj mdlrpc_c.obj mdlrpc_x.obj \
1.1.1.3 ! root 64: mandel.rbj rpcrt4.lib rpcndr.lib $(guilibs)
1.1 root 65:
66: server.exe: server.obj calc.obj mdlrpc_s.obj mdlrpc_y.obj
67: $(link) $(conflags) -out:server.exe -map:server.map \
68: server.obj calc.obj mdlrpc_s.obj mdlrpc_y.obj \
1.1.1.3 ! root 69: rpcrt4.lib rpcndr.lib $(conlibs)
1.1 root 70:
71: # Update the resource if necessary
1.1.1.3 ! root 72: mandel.rbj: mandel.rc mandel.h
! 73: rc -r mandel.rc
! 74: cvtres -$(CPU) mandel.res -o mandel.rbj
1.1 root 75:
76: # Object file dependencies
77:
78: # server only built for RPC version; always needs mdlrpc.h
79: server.obj: server.c mandel.h mdlrpc.h
80:
81: # Compile differently for RPC, standalone versions
1.1.1.2 root 82: !ifndef NOTRPC
1.1 root 83: mandel.obj: mandel.c mandel.h mdlrpc.h
84: remote.obj: remote.c mandel.h mdlrpc.h
85: calc.obj : calc.c mandel.h mdlrpc.h
86: !else
87: mandel.obj: mandel.c mandel.h
88: remote.obj: remote.c mandel.h
1.1.1.2 root 89: calc.obj: calc.c mandel.h
1.1 root 90: !endif
91:
92: # client stub
93: mdlrpc_c.obj : mdlrpc_c.c mdlrpc.h
94: # use lower warning levels for the stub source code; add -W1
95: !if "$(CPU)"=="i386"
96: $(cc) $(cflags) $(cvars) -W1 mdlrpc_c.c
97: !endif
98:
99: # client auxiliary file
100: mdlrpc_x.obj : mdlrpc_x.c mdlrpc.h
101: # use lower warning levels for the stub source code; add -W1
102: !if "$(CPU)"=="i386"
103: $(cc) $(cflags) $(cvars) -W1 mdlrpc_x.c
104: !endif
105:
106: # server stub file
107: mdlrpc_s.obj : mdlrpc_s.c mdlrpc.h
108: # use lower warning levels for the stub source code; add -W1
109: !if "$(CPU)"=="i386"
110: $(cc) $(cflags) -W1 $(cvars) mdlrpc_s.c
111: !endif
112:
113: # server auxiliary file
114: mdlrpc_y.obj : mdlrpc_y.c mdlrpc.h
115: # use lower warning levels for the stub source code; add -W1
116: !if "$(CPU)"=="i386"
117: $(cc) $(cflags) $(cvars) -W1 mdlrpc_y.c
118: !endif
119:
120: # Stubs, auxiliary and header file from the IDL file
121: mdlrpc.h mdlrpc_c.c mdlrpc_x.c mdlrpc_s.c mdlrpc_y.c: mdlrpc.idl mdlrpc.acf
1.1.1.3 ! root 122: midl mdlrpc.idl
1.1 root 123:
124: clean:
125: -del client.exe
126: -del server.exe
127: -del mandel.exe
128:
129: cleanall: clean
130: -del *.o
131: -del *.oo
132: -del *.res
1.1.1.3 ! root 133: -del *.rbj
1.1 root 134: -del *.map
135: -del *.obj
136: -del mdlrpc.h
137: -del mdlrpc_*.obj
138: -del mdlrpc_*.c
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.