--- mstools/samples/rpc/mandel/makefile 2018/08/09 18:20:01 1.1 +++ mstools/samples/rpc/mandel/makefile 2018/08/09 18:20:55 1.1.1.2 @@ -10,18 +10,18 @@ # sample application. The flag RPC determines which version # is built. To build a standalone version, use the commands: # >nmake cleanall -# >set RPC= +# >set NOTRPC=1 # >nmake # To build the RPC version, use the commands: # >nmake cleanall -# >set RPC=1 +# >set NOTRPC= # >nmake !include -!ifdef RPC -RPCFLAG = -DRPC -!else +!ifdef NOTRPC RPCFLAG = +!else +RPCFLAG = -DRPC !endif # Establish the inference rules. @@ -29,24 +29,20 @@ RPCFLAG = # remove -std switch from compiler switches # Use different command line input for object conversion. -!if "$(CPU)" == "i386" -CONVERTOBJECTCMD = $(cvtobj) $@ -!endif - +cvtomf = !if "$(CPU)" == "MIPS" -cflags = -c -G0 -O -EL -DMIPS=1 -I\nt\mstools\h -CONVERTOBJECTCMD = $(cvtobj) +cvtomf = mip2coff $@ !endif .c.obj: $(cc) $(cflags) $(cvars) $(RPCFLAG) $< - $(CONVERTOBJECTCMD) + $(cvtomf) # Targets # The RPC version produces client and server executables. # The standalone version produces a single exe file, "mandel". -!ifdef RPC +!ifndef NOTRPC all: client.exe server.exe !else all: mandel.exe @@ -60,12 +56,12 @@ client.exe: mandel.obj remote.obj mandel mdlrpc_c.obj mdlrpc_x.obj $(link) $(guiflags) -out:client.exe -map:client.map \ mandel.obj remote.obj mdlrpc_c.obj mdlrpc_x.obj \ - mandel.res $(guilibs) $(LIB)\winrpc.lib $(LIB)\ndrlib.lib + mandel.res $(LIB)\rpcrt4.lib $(LIB)\rpcndr.lib $(guilibs) server.exe: server.obj calc.obj mdlrpc_s.obj mdlrpc_y.obj $(link) $(conflags) -out:server.exe -map:server.map \ server.obj calc.obj mdlrpc_s.obj mdlrpc_y.obj \ - $(conlibs) $(LIB)\winrpc.lib $(LIB)\ndrlib.lib + $(LIB)\rpcrt4.lib $(LIB)\rpcndr.lib $(conlibs) # Update the resource if necessary mandel.res: mandel.rc mandel.h @@ -79,14 +75,14 @@ mandel.res: mandel.rc mandel.h server.obj: server.c mandel.h mdlrpc.h # Compile differently for RPC, standalone versions -!ifdef RPC +!ifndef NOTRPC mandel.obj: mandel.c mandel.h mdlrpc.h remote.obj: remote.c mandel.h mdlrpc.h calc.obj : calc.c mandel.h mdlrpc.h !else mandel.obj: mandel.c mandel.h remote.obj: remote.c mandel.h -calc.obj: calc.c mandel.h +calc.obj: calc.c mandel.h !endif # client stub @@ -94,7 +90,6 @@ mdlrpc_c.obj : mdlrpc_c.c mdlrpc.h # use lower warning levels for the stub source code; add -W1 !if "$(CPU)"=="i386" $(cc) $(cflags) $(cvars) -W1 mdlrpc_c.c - $(CONVERTOBJECTCMD) !endif # client auxiliary file @@ -102,7 +97,6 @@ mdlrpc_x.obj : mdlrpc_x.c mdlrpc.h # use lower warning levels for the stub source code; add -W1 !if "$(CPU)"=="i386" $(cc) $(cflags) $(cvars) -W1 mdlrpc_x.c - $(CONVERTOBJECTCMD) !endif # server stub file @@ -110,7 +104,6 @@ mdlrpc_s.obj : mdlrpc_s.c mdlrpc.h # use lower warning levels for the stub source code; add -W1 !if "$(CPU)"=="i386" $(cc) $(cflags) -W1 $(cvars) mdlrpc_s.c - $(CONVERTOBJECTCMD) !endif # server auxiliary file @@ -118,7 +111,6 @@ mdlrpc_y.obj : mdlrpc_y.c mdlrpc.h # use lower warning levels for the stub source code; add -W1 !if "$(CPU)"=="i386" $(cc) $(cflags) $(cvars) -W1 mdlrpc_y.c - $(CONVERTOBJECTCMD) !endif # Stubs, auxiliary and header file from the IDL file