Annotation of mstools/samples/rpc/dict/makefile, revision 1.1.1.3

1.1       root        1: #*************************************************************#
                      2: #**                                                         **#
                      3: #**                 Microsoft RPC Examples                  **#
                      4: #**                 Dictionary Application                  **#
                      5: #**            Copyright(c) Microsoft Corp. 1991            **#
                      6: #**                                                         **#
                      7: #*************************************************************#
                      8: 
1.1.1.2   root        9: ####################################################################
                     10: # ----- The following is an example of a makefile
                     11: # ----- which would work the same both for cross compiling
                     12: # ----- Other OS => NT or NT => NT.  To build on in the PDK
                     13: # ----- environment, just type "nmake all"; in the standard
                     14: # ----- deve. environment type "nmake NT_I386= all".
                     15: ####################################################################
1.1       root       16: 
1.1.1.2   root       17: !if "$(CPU)" == "MIPS"
                     18: NT_MIPS=1
                     19: !else if "$(CPU)" == "I386"
                     20: NT_I386=1
1.1       root       21: !endif
                     22: 
1.1.1.2   root       23: !if ( ! ( defined(NT_I386) || defined(NT_MIPS) || defined(DOS) ) )
                     24: !error You forgot to define NT_I386 or NT_MIPS or DOS !!!
1.1       root       25: !endif
1.1.1.2   root       26: #if ( ! ( defined(NT_I386) || defined(NT_MIPS) || defined(DOS) ) )
1.1       root       27: 
1.1.1.2   root       28: # ----- NT_I386 ENVIRONMENT DEFINITIONS -----
                     29: 
                     30: !ifdef NT_I386
                     31: 
1.1.1.3 ! root       32: NTLIB=
1.1.1.2   root       33: 
                     34: CC = cl386
                     35: EXPAND = -E
                     36: MIDL = midl
                     37: CVTOMF_COMMAND = $(CVTOMF) $*.obj
                     38: CVTOMF = cvtomf
                     39: COFF = coff
                     40: CPU=i386
                     41: OBJ = obj
                     42: 
                     43: NTCCFLAGS = -nologo -I .
                     44: NTCCFLAGS0 = -Di386=1 -DCONDITION_HANDLING=1 -DNT_UP=1
1.1.1.3 ! root       45: NTCCFLAGS1 = -DNT_INST=0 -DDBG=0 -DDEVL=1 -DNT_HOST /c /Zel /W2 /Gz /Ox /Oy1
1.1.1.2   root       46: 
                     47: !endif
                     48: # NT_I386
                     49: 
                     50: # ----- NT_MIPS ENVIRONMENT DEFINITIONS -----
                     51: 
                     52: !ifdef NT_MIPS
1.1       root       53: 
1.1.1.3 ! root       54: NTLIB = 
1.1.1.2   root       55: 
                     56: CC = cc
                     57: MIDL = midl
                     58: CVTOMF_COMMAND = $(CVTOMF)
                     59: CVTOMF = mip2coff $@
                     60: COFF = coff
                     61: CPU=mips
                     62: OBJ = o
                     63: 
                     64: NTCCFLAGS = -c -std -excpt -G04 -g0 -O -EL -Wab,-mips2 -Wab,-diag -Wb,-dwalign -checkstack 4096
                     65: NTCCFLAGS0 = -G0 -checkstack 4096 -I.
                     66: NTCCFLAGS1 = -DMIPS=1 -DNO_EXT_KEYS -DMIPSEL -DCONDITION_HANDLING=1 -DJAZZ -DR4000 -DDBG=0  -DNTENV -DDBG=0
                     67: 
                     68: !endif
                     69: # NT_MIPS
                     70: 
                     71: # ----- DOS ENVIRONMENT DEFINITIONS -----
                     72: 
                     73: !ifdef DOS
                     74: 
                     75: _NTDRIVE = C:
                     76: 
                     77: NT = $(_NTDRIVE)\nt\public\sdk
                     78: NTLIB =
                     79: 
                     80: CC = cl
                     81: EXPAND = -E
                     82: MIDL = midl
                     83: CPU=i386
                     84: OBJ = obj
                     85: DEF =
                     86: 
                     87: #
                     88: # DEF = /Zp4
                     89: # Requires surrounding all public RPC defs in rpc.h & rpcndr.h
                     90: # by a #pragma pack(2) ... #pragma pack() pair!
1.1       root       91: #
1.1.1.2   root       92: 
                     93: NTCCFLAGS  = -I . -I c:\c700\include -I c:\c700\include\dos
                     94: 
                     95: NTCCFLAGS0 = /AL
                     96: 
                     97: !ifdef DBG
                     98: NTCCFLAGS1 = /c /Zel /W2 /Od /Zi
                     99: !else
                    100: NTCCFLAGS1 = /c /Zel /W2 /Otnlgei
                    101: 
                    102: # NTCCFLAGS1 = /c /Zel /W2 /Osqfv
                    103: 
                    104: #
                    105: # Warning:  For client.exe: do not use /Ox or /Oz with /Zp4!
                    106: #           For play.exe: do not use /Oa or /Ow with /Ol, /Og, or /Oe!
                    107: #           This program must be compiled large model (/AL) on DOS
                    108: #
                    109: 
1.1       root      110: !endif
1.1.1.2   root      111: # DBG
1.1       root      112: 
1.1.1.2   root      113: !endif
                    114: # DOS
                    115: 
                    116: # ----- END INDIVIDUAL ENVIRONMENT DEFINITIONS -----
                    117: 
                    118: ####################################################################
                    119: 
                    120: # ----- COMPILER & LINKER ENVIRONMENT DEPENDENT DEFINITIONS -----
                    121: 
                    122: !if ( defined(NT_I386) || defined(NT_MIPS) )
                    123: 
                    124: # ----- Now NT, CVTOMF, COFF, CC, and MIDL are all defined for
                    125: # ----- both NT (I386 and MIPS) working environments ...
                    126: 
                    127: ####################################################################
                    128: 
                    129: # ----- now that all flags to the C compiler $(CC) are defined,
                    130: # ----- we will call $(CC) $(NTCCFLAGS) $(NTINC) and $(NTDEF)
                    131: # ----- Use the following fancy rule:
                    132: 
                    133: .c.$(OBJ):
                    134:    $(CC) $(NTCCFLAGS) $(NTCCFLAGS0) $(NTCCFLAGS1) $(NTINC) $(DEF) $<
                    135:    $(CVTOMF_COMMAND)
                    136: 
                    137: 
                    138: # ----- The first inference rule above calls the C compiler (with
                    139: # ----- the appropriate flags) on each .c file to produce a .$(OBJ)
                    140: # ----- file, for every dependency of .$(OBJ) on .c (+.h) files.
                    141: # ----- The second rule calls CVTOMF on every target produced by the
                    142: # ----- first rule.
                    143: 
                    144: ####################################################################
                    145: 
                    146: 
                    147: # ----- Finally, use the next clever rule to produce .exe files
                    148: # ----- by calling the linker (COFF with the appropriate
                    149: # ----- switches), substituting the target .exe for the
                    150: # ----- predefined macro $* for each target exe (minus the
                    151: # ----- .exe extension), and substituting the right hand
                    152: # ----- side of the rule for the predefined $** macro
                    153: 
                    154: NTLINK = $(COFF) -link -pe -out:$*.exe \
                    155: -debug:partial \
                    156: -machine:$(CPU) \
                    157: -subsystem:console \
                    158: # -base:@$(NT)\LIB\coffbase.txt,usermode \
                    159: -entry:mainCRTStartup \
                    160: $** \
1.1.1.3 ! root      161: $(NTLIB)ntdll.lib \
        !           162: $(NTLIB)kernel32.lib \
        !           163: $(NTLIB)libc.lib \
        !           164: $(NTLIB)rpcrt4.lib \
        !           165: $(NTLIB)rpcndr.lib
1.1.1.2   root      166: 
                    167: PLAYLINK = $(NTLINK)
                    168: 
                    169: !endif
                    170: # ( defined(NT_I386) || defined(NT_MIPS) )
                    171: 
                    172: !ifdef DOS
                    173: 
                    174: .c.$(OBJ):
                    175:    $(CC) $(NTCCFLAGS) $(NTCCFLAGS0) $(NTCCFLAGS1) $(NTINC) $(DEF) $<
                    176: 
                    177: !ifdef DBG
                    178: NTLINK = link @dictdbg.lnk
                    179: !else
                    180: NTLINK = link @dict.lnk
                    181: !endif
                    182: # DBG
                    183: 
                    184: PLAYLINK = link @play.lnk
                    185: 
                    186: CVTOMF = $(NTLINK)
1.1       root      187: 
                    188: !endif
1.1.1.2   root      189: # DOS
                    190: 
                    191: ####################################################################
                    192: # ----- Now, that all the hard work was done, we are finally ready
                    193: # ----- for some simple dependency rules:
                    194: ####################################################################
                    195: 
                    196: !if ( defined(NT_I386) || defined(NT_MIPS) )
                    197: 
                    198: all : client.exe server.exe play.exe
                    199: 
                    200: !else
                    201: # ifdef DOS
1.1       root      202: 
1.1.1.2   root      203: all : client.exe play.exe
                    204: 
                    205: !endif
                    206: #if ( defined(NT_I386) || defined(NT_MIPS) )
                    207: 
                    208: client.exe : client.$(OBJ) util0.$(OBJ) \
                    209:    replay_c.$(OBJ) replay_x.$(OBJ)
                    210:    $(NTLINK)
                    211: 
                    212: !ifdef AUTOHANDLE
                    213: 
                    214: server.exe : server.$(OBJ) util0.$(OBJ)  \
                    215:     replay_s.$(OBJ) replay_y.$(OBJ) \
                    216: #   ..\obj\i386\nsisvr.obj ..\obj\i386\sbindapi.obj \
                    217: #   ..\obj\i386\locsvr_c.obj ..\obj\i386\locsvr_x.obj \
                    218:     replay.$(OBJ) dict0.$(OBJ)
                    219:     $(NTLINK)
                    220: 
                    221: !else
                    222: 
                    223: server.exe : server.$(OBJ) util0.$(OBJ)  \
                    224:     replay_s.$(OBJ) replay_y.$(OBJ) \
                    225:     replay.$(OBJ) dict0.$(OBJ)
                    226:     $(NTLINK)
                    227: 
                    228: !endif
1.1       root      229: 
                    230: 
1.1.1.2   root      231: play.exe : play.$(OBJ) lutil0.$(OBJ) dict0.$(OBJ)
                    232:     $(PLAYLINK)
1.1       root      233: 
1.1.1.2   root      234: client.$(OBJ) : client.c util0.h replay.h
1.1       root      235: 
1.1.1.2   root      236: server.$(OBJ) : server.c util0.h replay.h
                    237: 
                    238: replay.$(OBJ) : util0.h replay.h replay.c
                    239: 
                    240: util0.$(OBJ) : util0.h util0.c
                    241: 
                    242: 
                    243: !ifdef DOS
                    244: 
                    245: lutil0.$(OBJ) : util0.h util0.c
                    246:     copy util0.c lutil0.c
                    247:     $(CC) $(NTCCFLAGS) $(NTCCFLAGS0) $(NTCCFLAGS1) $(NTINC) $(NTDEF) -D_LOCAL lutil0.c
                    248:     del lutil0.c
                    249: 
                    250: !endif
                    251: # DOS
                    252: !ifdef NT_MIPS
                    253: 
                    254: lutil0.$(OBJ) : util0.h util0.c
                    255:     copy util0.c lutil0.c
                    256:     $(CC) $(NTCCFLAGS) $(NTCCFLAGS0) $(NTCCFLAGS1) $(NTINC) $(NTDEF) -D_LOCAL lutil0.c
                    257:     $(CVTOMF) lutil0.$(OBJ)
                    258:     del lutil0.c
                    259: 
                    260: !endif
                    261: # NT_MIPS
                    262: 
                    263: !ifdef NT_I386
                    264: 
                    265: lutil0.$(OBJ) : util0.h util0.c
                    266:     $(CC) $(NTCCFLAGS) $(NTCCFLAGS0) $(NTCCFLAGS1) $(NTINC) $(NTDEF) -D_LOCAL -Folutil0.$(OBJ) util0.c
                    267:     $(CVTOMF) lutil0.$(OBJ)
                    268: 
                    269: !endif
                    270: # NT_I386
                    271: 
                    272: dict0.$(OBJ) : dict0.h dict0.c
                    273: 
                    274: play.$(OBJ) : play.c util0.h dict0.h
1.1       root      275: 
                    276: replay.h replay_s.c replay_c.c replay_y.c replay_x.c : replay.idl replay.acf
1.1.1.2   root      277:     $(MIDL) $(DEF) replay.idl
1.1       root      278: 
                    279: play : play.exe
                    280: 
                    281: clean :
1.1.1.2   root      282:     -del *.$(OBJ)
                    283:     -del replay.h
                    284:     -del replay_?.*
1.1       root      285: 
1.1.1.2   root      286: cleanall :
                    287:     -del *.$(OBJ)
1.1       root      288:     -del replay.h
                    289:     -del replay_?.*
1.1.1.2   root      290:     -del *.exe

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.