Annotation of mstools/ole20/samples/outline/mips/makefile, revision 1.1.1.1

1.1       root        1: #
                      2: # (c) Copyright Microsoft Corp. 1992 All Rights Reserved
                      3: #
                      4: # Makefile : Builds the OLE 2.0 Outline series sample apps
                      5: #        The Outline series includes:
                      6: #           Outline.exe -- base version of app (w/o OLE functionality)
                      7: #           SvrOutl.exe -- OLE 2.0 Server sample app
                      8: #           CntrOutl.exe -- OLE 2.0 Containter (Container) sample app
                      9: #        NOTE: apps are built in a subdir of same name as app.
                     10: #
                     11: # Usage:     NMAKE              (build outline.exe--non-OLE version)
                     12: #    or:     NMAKE APP=svroutl  (build svroutl.exe--server-only version)
                     13: #    or:     NMAKE APP=cntroutl (build cntroutl.exe--container-only version)
                     14: #    or:     NMAKE APP=isvrotl  (build isvrotl.exe--InPlace server version)
                     15: #    or:     NMAKE APP=icntrotl (build icntrotl.exe--InPlace container ver.)
                     16: #    or:     NMAKE clean        (erase all compiled files in $(APP) dir)
                     17: #
                     18: # eg.:  nmake APP=cntroutl clean    (deletes compiled files in .\cntroutl\ )
                     19: #       nmake                       (builds outline\outline.exe)
                     20: #
                     21: # Environment variables:
                     22: #       DEVROOT_DIR=<path>  (root dir for sample code development)
                     23: 
                     24: !if "$(app)" == "svroutl"
                     25: APP = svroutl
                     26: !endif
                     27: 
                     28: !if "$(app)" == "cntroutl"
                     29: APP = cntroutl
                     30: !endif
                     31: 
                     32: !if "$(app)" == "icntrotl"
                     33: APP = icntrotl
                     34: !endif
                     35: 
                     36: !if "$(app)" == "isvrotl"
                     37: APP = isvrotl
                     38: !endif
                     39: 
                     40: !if "$(app)" == "outline" || "$(app)" == ""
                     41: APP = outline
                     42: !endif
                     43: 
                     44: !ifndef DEVROOT_DIR
                     45: !error You must define DEVROOT_DIR (ole20 sub-tree)
                     46: !endif
                     47: !ifndef INCLUDE
                     48: !error You must define INCLUDE (non ole20 include files)
                     49: !endif
                     50: !ifndef LIB
                     51: !error You must deinfe LIB (non ole20 libraries)
                     52: !endif
                     53: !ifndef OLEBUILD
                     54: OLEBUILD=NT
                     55: !endif
                     56: 
                     57: OLE2_H=$(DEVROOT_DIR)\h
                     58: OLE2_LIB=$(DEVROOT_DIR)\lib
                     59: 
                     60: !ifndef SAMPLE_DIR
                     61: SAMPLE_DIR = $(DEVROOT_DIR)\samples
                     62: !endif
                     63: SRC_DIR   = $(SAMPLE_DIR)\outline
                     64: 
                     65: SRC_DIR   = ..
                     66: 
                     67: !if "$(OLEBUILD)" == "NT"
                     68: 
                     69: !ifndef MACHINE
                     70: MACHINE=MIPS
                     71: !endif
                     72: 
                     73: CPP       = mcl
                     74: CPPFLAGS  = /D_MIPS_ /Fc /DOLE2FINAL /D_DEBUG /DWIN32 /DOLE2SHIP /D$(MACHINE)=1 /D_NTWIN /D_WINDOWS /DWINVER=0x030A /W3 /nologo /Z7 /Od $(CL)
                     75: LINKFLAGS = -subsystem:windows -machine:$(MACHINE) -debug:mapped,full -debugtype:both
                     76: OLELIBS   = ole2w32.lib outlui.lib storag32.lib gizmobar.lib bttncur.lib
                     77: W32LIBS          = kernel32.lib comdlg32.lib user32.lib gdi32.lib  
                     78: LIBS      = $(OLELIBS) $(W32LIBS) crtdll.lib 
                     79: 
                     80: !else
                     81: 
                     82: CPP       =cl
                     83: CPPFLAGS  = /f /AM /GA /GEs /W3 /Zp /G2 /nologo /D_DEBUG $(CL) /Od /Zi
                     84: LINKFLAGS = /NOD /NOE /batch /ONERROR:NOEXE /COD:N
                     85: LIBS      = libw shell ole2 storage compobj outlui commdlg mlibcew \
                     86:             gizmobar bttncur $(SRC_DIR)\ctl3d
                     87: 
                     88: !endif
                     89: 
                     90: BUILD_DIR = $(APP)
                     91: PCHFLAGS  = -Yuoutline.h -Fpprecomp.pch
                     92: 
                     93: COMMONINCL =    $(SRC_DIR)/outline.h $(OLE2_H)/ole2.h \
                     94:     $(SRC_DIR)/frametls.h $(OLE2_H)/compobj.h  \
                     95:     $(OLE2_H)/scode.h $(OLE2_H)/dvobj.h \
                     96:     $(OLE2_H)/storage.h $(OLE2_H)/moniker.h \
                     97:     $(SRC_DIR)/outlrc.h $(SRC_DIR)/status.h $(SRC_DIR)/cntroutl.h  \
                     98:     $(SRC_DIR)/cntrrc.h $(OLE2_H)/ole2ui.h $(SRC_DIR)/svroutl.h \
                     99:     $(SRC_DIR)/oleoutl.h
                    100: 
                    101: !if "$(USE_MSGFILTER)"=="1"
                    102: CPPFLAGS  = $(CPPFLAGS) /DUSE_MSGFILTER
                    103: !endif
                    104: 
                    105: 
                    106: ##########################################################################
                    107: #
                    108: # main obj lists; add new obj files here
                    109: #
                    110: 
                    111: !if "$(APP)" == "cntroutl" 
                    112: CPPFLAGS = $(CPPFLAGS) /DOLE_CNTR
                    113: APP_OBJS = precomp.obj main.obj memmgr.obj status.obj frametls.obj \
                    114:        dialogs.obj debug.obj \
                    115:        outlapp.obj outldoc.obj heading.obj \
                    116:        outllist.obj outlline.obj outltxtl.obj \
                    117:        outlntbl.obj outlname.obj \
                    118:        oleapp.obj oledoc.obj classfac.obj debug2.obj \
                    119:        dragdrop.obj clipbrd.obj linking.obj \
                    120:        cntrbase.obj cntrline.obj
                    121: !else
                    122: 
                    123: !if "$(APP)" == "svroutl" 
                    124: CPPFLAGS = $(CPPFLAGS) /DOLE_SERVER
                    125: APP_OBJS = precomp.obj main.obj memmgr.obj status.obj frametls.obj \
                    126:        dialogs.obj debug.obj \
                    127:        outlapp.obj outldoc.obj heading.obj \
                    128:        outllist.obj outlline.obj outltxtl.obj \
                    129:        outlntbl.obj outlname.obj \
                    130:        oleapp.obj oledoc.obj classfac.obj debug2.obj \
                    131:        dragdrop.obj clipbrd.obj linking.obj \
                    132:        svrbase.obj svrpsobj.obj 
                    133: !else
                    134: 
                    135: !if "$(APP)" == "icntrotl" 
                    136: CPPFLAGS = $(CPPFLAGS) /DOLE_CNTR /DINPLACE_CNTR
                    137: APP_OBJS = precomp.obj main.obj memmgr.obj status.obj frametls.obj \
                    138:        dialogs.obj debug.obj \
                    139:        outlapp.obj outldoc.obj heading.obj \
                    140:        outllist.obj outlline.obj outltxtl.obj \
                    141:        outlntbl.obj outlname.obj \
                    142:        oleapp.obj oledoc.obj classfac.obj debug2.obj \
                    143:        dragdrop.obj clipbrd.obj linking.obj \
                    144:        cntrbase.obj cntrline.obj cntrinpl.obj
                    145: !else
                    146: 
                    147: !if "$(APP)" == "isvrotl" 
                    148: CPPFLAGS = $(CPPFLAGS) /DOLE_SERVER /DINPLACE_SVR
                    149: APP_OBJS = precomp.obj main.obj memmgr.obj status.obj frametls.obj \
                    150:        dialogs.obj debug.obj \
                    151:        outlapp.obj outldoc.obj heading.obj \
                    152:        outllist.obj outlline.obj outltxtl.obj \
                    153:        outlntbl.obj outlname.obj \
                    154:        oleapp.obj oledoc.obj classfac.obj debug2.obj \
                    155:        dragdrop.obj clipbrd.obj linking.obj \
                    156:        svrbase.obj svrpsobj.obj svrinpl.obj
                    157: !else
                    158: APP_OBJS = precomp.obj main.obj memmgr.obj status.obj frametls.obj \
                    159:        dialogs.obj debug.obj \
                    160:        outlapp.obj outldoc.obj heading.obj \
                    161:        outllist.obj outlline.obj outltxtl.obj debug2.obj \
                    162:        outlntbl.obj outlname.obj 
                    163:        
                    164: !endif
                    165: !endif
                    166: !endif
                    167: !endif
                    168: 
                    169: 
                    170: ##########################################################################
                    171: #
                    172: # overall goal; cd to build dir; build application; return to src dir
                    173: #
                    174: goal: cd_build $(APP).exe
                    175: 
                    176: cd_build:
                    177:     cd $(BUILD_DIR)
                    178:     set INCLUDE=$(OLE2_H);$(INCLUDE)
                    179:     set LIB=$(OLE2_LIB);$(LIB)
                    180:     set cl=$(CPPFLAGS)
                    181: 
                    182: 
                    183: ##########################################################################
                    184: #
                    185: # create precomiled header
                    186: #
                    187: precomp.pch precomp.obj : $(SRC_DIR)/precomp.c $(COMMONINCL)
                    188:     @echo Precompiling outline.h ...
                    189:     $(CPP) -c -Ycoutline.h -Fpprecomp.pch -Foprecomp $(SRC_DIR)\precomp.c
                    190: 
                    191: ##########################################################################
                    192: #
                    193: # link/res commands
                    194: 
                    195: $(APP).exe: $(APP_OBJS) $(SRC_DIR)\$(APP).def $(APP).res precomp.pch
                    196:     @echo Linking $@...
                    197: !if "$(OLEBUILD)" == "NT"
                    198:       cvtres -$(MACHINE) $(APP).res -o $(APP).rs
                    199:       link32 $(LINKFLAGS) -entry:WinMainCRTStartup $(APP_OBJS) $(APP).rs -out:$@ -map:$*.map $(LIBS) 
                    200: !else
                    201:     link $(LINKFLAGS) @<<$(APP).lnk
                    202: $(APP_OBJS: = +^
                    203: )
                    204: $@,
                    205: $(APP).map /MAP:FULL /LINE,
                    206: $(LIBS),
                    207: $(DEVROOT_DIR)\outline\$(APP).def
                    208: <<KEEP
                    209:     mapsym $(APP).map
                    210:     @echo Adding resources to $@...
                    211:     rc -k -t -i$(SRC_DIR) $(RCFLAGS) $*.res $@
                    212:     @echo Packing symbols for $@...
                    213: !if "$(DONTUSE_CVPACK)"==""
                    214:     cvpack $@
                    215: !endif
                    216: !endif
                    217: 
                    218: $(APP).res: $(SRC_DIR)\$(APP).rc $(SRC_DIR)/outlrc.h $(SRC_DIR)/cntrrc.h \
                    219:     $(SRC_DIR)\dialogs.dlg $(SRC_DIR)/debug.rc
                    220:     @echo Compiling resources...
                    221: !if "$(OLEBUILD)" == "NT"
                    222:     rc -r -DWIN32 -i$(SRC_DIR) $(RCFLAGS) -fo$@ $(SRC_DIR)\$(APP).rc
                    223: !else
                    224:     rc -r -i$(SRC_DIR) $(RCFLAGS) -fo$@ $?
                    225: !endif
                    226: 
                    227: 
                    228: ##########################################################################
                    229: #
                    230: # build rules for src directory
                    231: #
                    232: 
                    233: {$(SRC_DIR)}.c{}.obj:
                    234:     @echo Compiling $<...
                    235:     $(CPP) $(CPPFLAGS) $(PCHFLAGS) /c $<
                    236: 
                    237: 
                    238: ##########################################################################
                    239: #
                    240: # clean (erase) generated files
                    241: 
                    242: clean: 
                    243:     -del $(BUILD_DIR)\*.obj
                    244:     -del $(BUILD_DIR)\$(APP).res
                    245:     -del $(BUILD_DIR)\$(APP).exe
                    246:     -del $(BUILD_DIR)\$(APP).sym
                    247:     -del $(BUILD_DIR)\$(APP).map
                    248:     -del $(BUILD_DIR)\$(APP).lnk
                    249: 
                    250: 
                    251: 
                    252: #########################################################
                    253: # Dependencies
                    254: #########################################################
                    255: 
                    256: main.obj : $(COMMONINCL) 
                    257:     $(CPP) $(CPPFLAGS) /c $(SRC_DIR)/main.c
                    258: 
                    259: outlapp.obj : $(COMMONINCL)
                    260: 
                    261: outldoc.obj : $(COMMONINCL)
                    262: 
                    263: outllist.obj : $(COMMONINCL)
                    264: 
                    265: outlline.obj : $(COMMONINCL)
                    266: 
                    267: outltxtl.obj : $(COMMONINCL)
                    268: 
                    269: outlntbl.obj : $(COMMONINCL)
                    270: 
                    271: outlname.obj : $(COMMONINCL)
                    272: 
                    273: classfac.obj : $(COMMONINCL)
                    274: 
                    275: oleapp.obj : $(COMMONINCL)
                    276: 
                    277: oledoc.obj : $(COMMONINCL)
                    278: 
                    279: dragdrop.obj : $(COMMONINCL)
                    280: 
                    281: clipbrd.obj : $(COMMONINCL)
                    282: 
                    283: linking.obj : $(COMMONINCL)
                    284: 
                    285: cntrbase.obj : $(COMMONINCL)
                    286: 
                    287: cntrline.obj : $(COMMONINCL)
                    288: 
                    289: cntrinpl.obj : $(COMMONINCL)
                    290: 
                    291: svrpsobj.obj : $(COMMONINCL)
                    292: 
                    293: svrinpl.obj : $(COMMONINCL)
                    294: 
                    295: svrbase.obj : $(COMMONINCL)
                    296: 
                    297: status.obj : $(COMMONINCL) $(SRC_DIR)/message.h $(SRC_DIR)/status.h
                    298: 
                    299: memmgr.obj : 
                    300:     $(CPP) $(CPPFLAGS) /c $(SRC_DIR)/memmgr.c
                    301: 
                    302: frametls.obj : $(COMMONINCL) $(OLE2_H)/ole2ui.h
                    303: 
                    304: heading.obj : $(COMMONINCL)
                    305: 
                    306: dialogs.obj : $(COMMONINCL)
                    307: 
                    308: debug.obj : $(COMMONINCL) $(OLE2_H)/msgfiltr.h 
                    309: 
                    310: debug2.obj : $(COMMONINCL)

unix.superglobalmegacorp.com

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