|
|
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:
37: .c.obj:
38: $(cc) $(cflags) $(cvars) $(RPCFLAG) $<
1.1.1.2 ! root 39: $(cvtomf)
1.1 root 40:
41: # Targets
42: # The RPC version produces client and server executables.
43: # The standalone version produces a single exe file, "mandel".
44:
1.1.1.2 ! root 45: !ifndef NOTRPC
1.1 root 46: all: client.exe server.exe
47: !else
48: all: mandel.exe
49: !endif
50:
51: mandel.exe: mandel.obj remote.obj mandel.def mandel.res calc.obj
52: $(link) $(guiflags) -out:mandel.exe -map:mandel.map \
53: mandel.obj remote.obj calc.obj mandel.res $(guilibs)
54:
55: client.exe: mandel.obj remote.obj mandel.def mandel.res \
56: mdlrpc_c.obj mdlrpc_x.obj
57: $(link) $(guiflags) -out:client.exe -map:client.map \
58: mandel.obj remote.obj mdlrpc_c.obj mdlrpc_x.obj \
1.1.1.2 ! root 59: mandel.res $(LIB)\rpcrt4.lib $(LIB)\rpcndr.lib $(guilibs)
1.1 root 60:
61: server.exe: server.obj calc.obj mdlrpc_s.obj mdlrpc_y.obj
62: $(link) $(conflags) -out:server.exe -map:server.map \
63: server.obj calc.obj mdlrpc_s.obj mdlrpc_y.obj \
1.1.1.2 ! root 64: $(LIB)\rpcrt4.lib $(LIB)\rpcndr.lib $(conlibs)
1.1 root 65:
66: # Update the resource if necessary
67: mandel.res: mandel.rc mandel.h
68: rc -r -fo res.tmp mandel.rc
69: cvtres -$(CPU) res.tmp -o mandel.res
70: del res.tmp
71:
72: # Object file dependencies
73:
74: # server only built for RPC version; always needs mdlrpc.h
75: server.obj: server.c mandel.h mdlrpc.h
76:
77: # Compile differently for RPC, standalone versions
1.1.1.2 ! root 78: !ifndef NOTRPC
1.1 root 79: mandel.obj: mandel.c mandel.h mdlrpc.h
80: remote.obj: remote.c mandel.h mdlrpc.h
81: calc.obj : calc.c mandel.h mdlrpc.h
82: !else
83: mandel.obj: mandel.c mandel.h
84: remote.obj: remote.c mandel.h
1.1.1.2 ! root 85: calc.obj: calc.c mandel.h
1.1 root 86: !endif
87:
88: # client stub
89: mdlrpc_c.obj : mdlrpc_c.c mdlrpc.h
90: # use lower warning levels for the stub source code; add -W1
91: !if "$(CPU)"=="i386"
92: $(cc) $(cflags) $(cvars) -W1 mdlrpc_c.c
93: !endif
94:
95: # client auxiliary file
96: mdlrpc_x.obj : mdlrpc_x.c mdlrpc.h
97: # use lower warning levels for the stub source code; add -W1
98: !if "$(CPU)"=="i386"
99: $(cc) $(cflags) $(cvars) -W1 mdlrpc_x.c
100: !endif
101:
102: # server stub file
103: mdlrpc_s.obj : mdlrpc_s.c mdlrpc.h
104: # use lower warning levels for the stub source code; add -W1
105: !if "$(CPU)"=="i386"
106: $(cc) $(cflags) -W1 $(cvars) mdlrpc_s.c
107: !endif
108:
109: # server auxiliary file
110: mdlrpc_y.obj : mdlrpc_y.c mdlrpc.h
111: # use lower warning levels for the stub source code; add -W1
112: !if "$(CPU)"=="i386"
113: $(cc) $(cflags) $(cvars) -W1 mdlrpc_y.c
114: !endif
115:
116: # Stubs, auxiliary and header file from the IDL file
117: mdlrpc.h mdlrpc_c.c mdlrpc_x.c mdlrpc_s.c mdlrpc_y.c: mdlrpc.idl mdlrpc.acf
118: midl -cpp_cmd $(cc) -cpp_opt "-E" mdlrpc.idl
119:
120: clean:
121: -del client.exe
122: -del server.exe
123: -del mandel.exe
124:
125: cleanall: clean
126: -del *.o
127: -del *.oo
128: -del *.res
129: -del *.map
130: -del *.obj
131: -del mdlrpc.h
132: -del mdlrpc_*.obj
133: -del mdlrpc_*.c
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.