Annotation of mstools/ole20/samples/spoly2/makefile, revision 1.1.1.1

1.1       root        1: ##############################################################################
                      2: #
                      3: #  (c) Copyright Microsoft Corp. 1992-1993 All Rights Reserved
                      4: #
                      5: #  File:
                      6: #
                      7: #    makefile - makefile for spoly2.exe
                      8: #
                      9: #  Purpose:
                     10: #
                     11: #    Builds the OLE 2.0 sample IDispatch server, spoly2.exe.
                     12: #
                     13: #
                     14: #  Usage:
                     15: #
                     16: #     NMAKE                     ; build with defaults
                     17: #     or: NMAKE option         ; build with the given option(s)
                     18: #     or: NMAKE clean          ; erase all compiled files
                     19: #
                     20: #     option: dev = [win16 | win32]    ; dev=win16 is the default
                     21: #             DEBUG=[0|1]              ; DEBUG=1 is the default
                     22: #
                     23: #
                     24: #  Notes:
                     25: #
                     26: #    This makefile assumes that the PATH, INCLUDE and LIB environment
                     27: #    variables are setup properly.
                     28: #
                     29: ##############################################################################
                     30: 
                     31: 
                     32: 
                     33: ##########################################################################
                     34: #
                     35: # Default Settings
                     36: #
                     37: 
                     38: !if "$(dev)" == ""
                     39: dev = win32
                     40: !endif
                     41: 
                     42: !if !("$(dev)" == "win16" || "$(dev)" == "win32" || "$(dev)" == "mac")
                     43: !error Invalid dev option, choose from [win16 | win32 | mac]
                     44: !endif
                     45: 
                     46: !if "$(dev)" == "win16"
                     47: TARGET  = WIN16
                     48: !endif
                     49: 
                     50: !if "$(dev)" == "win32"
                     51: TARGET  = WIN32
                     52: MACHINE = i386
                     53: !endif
                     54: 
                     55: !if "$(dev)" == "mac"
                     56: !error Mac build is currently not supported
                     57: !endif
                     58: 
                     59: !if "$(DEBUG)" == ""
                     60: DEBUG = 1
                     61: !endif
                     62: 
                     63: 
                     64: ##########################################################################
                     65: #
                     66: # WIN16 Settings
                     67: #
                     68: !if "$(TARGET)" == "WIN16"
                     69: 
                     70: CC   = cl
                     71: LINK = link
                     72: 
                     73: RCFLAGS = -dWIN16
                     74: CFLAGS = -W3 -AM -GA -GEs -DWIN16
                     75: LINKFLAGS = /NOD /NOI /BATCH /ONERROR:NOEXE
                     76: 
                     77: LIBS = libw.lib mlibcew.lib
                     78: 
                     79: !if "$(DEBUG)" == "1"
                     80: CFLAGS = $(CFLAGS) -Od -Zi -D_DEBUG $(CL)
                     81: LINKFLAGS = $(LINKFLAGS) /COD
                     82: !else
                     83: CFLAGS = $(CFLAGS) -Ox $(CL)
                     84: LINKFLAGS = $(LINKFLAGS) /FAR /PACKC
                     85: !endif
                     86: !endif
                     87: 
                     88: 
                     89: ##########################################################################
                     90: #
                     91: # WIN32 Settings
                     92: #
                     93: !if "$(TARGET)" == "WIN32"
                     94: 
                     95: CC   = cl386
                     96: LINK = link32
                     97: 
                     98: RCFLAGS = -dWIN32
                     99: CFLAGS = -W3 -G3 -nologo -D$(MACHINE)=1 -DWIN32 -D_NTWIN -D_WINDOWS $(CL)
                    100: CFLAGS = $(CFLAGS) -DOLE2SHIP -DOLE2FINAL -D_INC_OLE -D__RPC_H__ -D__RPCDCE_H__ -D_X86_ -DNTBETA2 -D_MT
                    101: LINKFLAGS = -subsystem:windows -entry:WinMainCRTStartup -machine:$(MACHINE) 
                    102: 
                    103: LIBS = libc.lib kernel32.lib user32.lib gdi32.lib 
                    104: 
                    105: !if "$(DEBUG)" == "1"
                    106: CFLAGS = $(CFLAGS) -Od -Zi -D_DEBUG $(CL)
                    107: LINKFLAGS = -debug:full -debugtype:cv $(LINKFLAGS) 
                    108: !else
                    109: CFLAGS = $(CFLAGS) -Ox
                    110: !endif
                    111: !endif
                    112: 
                    113: 
                    114: ##########################################################################
                    115: #
                    116: # Build rules
                    117: #
                    118: 
                    119: .cpp.obj:
                    120:     @echo Compiling $<...
                    121:     $(CC) -c $<
                    122: 
                    123: ##########################################################################
                    124: #
                    125: # Application Settings
                    126: #
                    127: 
                    128: APPS = spoly2
                    129: 
                    130: 
                    131: !if "$(TARGET)" == "WIN16"
                    132: LIBS = ole2.lib compobj.lib ole2disp.lib $(LIBS)
                    133: !else 
                    134: !if "$(TARGET)" == "WIN32"
                    135: LIBS = ole2w32.lib ole2di32.lib $(LIBS)
                    136: !endif
                    137: !endif
                    138: 
                    139: OBJS = \
                    140:        winmain.obj     \
                    141:        cpoly.obj       \
                    142:        cpoint.obj      \
                    143:        cfpoly.obj      \
                    144:        cfpoint.obj     \
                    145:        cenumpt.obj     \
                    146:        statbar.obj     \
                    147:        clsid.obj       \
                    148:        tdata.obj
                    149: 
                    150: 
                    151: ##########################################################################
                    152: #
                    153: # Default Goal
                    154: #
                    155: 
                    156: goal : setflags $(APPS).exe
                    157: 
                    158: setflags :
                    159:        set CL=$(CFLAGS)
                    160: 
                    161: 
                    162: ##########################################################################
                    163: #
                    164: # Clean (erase) generated files
                    165: #
                    166: clean :
                    167:     if exist *.obj       del *.obj
                    168:     if exist $(APPS).exe del $(APPS).exe
                    169:     if exist $(APPS).map del $(APPS).map
                    170:     if exist $(APPS).res del $(APPS).res
                    171:     if exist $(APPS).rs  del $(APPS).rs
                    172:     if exist *.pdb       del *.pdb
                    173: 
                    174: 
                    175: ##########################################################################
                    176: #
                    177: # Application Build (WIN16 Specific)
                    178: #
                    179: 
                    180: !if "$(TARGET)" == "WIN16"
                    181: $(APPS).exe : $(OBJS) $(APPS).def $(APPS).res $(APPS).ico
                    182:        link $(LINKFLAGS) @<<
                    183: $(OBJS),
                    184: $@,,
                    185: $(LIBS),
                    186: $(APPS).def
                    187: <<
                    188:        rc -k -t $(APPS).res $@
                    189: !endif
                    190: 
                    191: 
                    192: ##########################################################################
                    193: #
                    194: # Application Build (WIN32 Specific)
                    195: #
                    196: !if "$(TARGET)" == "WIN32"
                    197: $(APPS).exe : $(OBJS) $(APPS).def $(APPS).res $(APPS).ico
                    198:       cvtres -$(MACHINE) $(APPS).res -o $(APPS).rs
                    199:       $(LINK) @<< 
                    200:         $(LINKFLAGS)
                    201:         -out:$@ 
                    202:         -map:$*.map
                    203:         $(OBJS)
                    204:         $(APPS).rs
                    205:         $(LIBS)
                    206: <<
                    207: !endif
                    208: 
                    209: 
                    210: ##########################################################################
                    211: #
                    212: # Application Build (Common)
                    213: #
                    214: 
                    215: $(APPS).res : $(APPS).rc
                    216:        rc $(RCFLAGS) -r -fo$@ $?
                    217: 
                    218: 
                    219: ##########################################################################
                    220: #
                    221: # Dependencies
                    222: #
                    223: 
                    224: 
                    225: winmain.obj: winmain.cpp spoly.h cpoint.h cpoly.h statbar.h
                    226:     $(CC) -c winmain.cpp
                    227: 
                    228: cpoint.obj: cpoint.cpp cpoint.h spoly.h statbar.h
                    229:     $(CC) -c cpoint.cpp
                    230: 
                    231: cpoly.obj: cpoly.cpp cpoint.h cpoly.h spoly.h statbar.h
                    232:     $(CC) -c cpoly.cpp
                    233: 
                    234: cfpoint.obj: cfpoint.cpp cpoint.h spoly.h
                    235:     $(CC) -c cfpoint.cpp
                    236: 
                    237: cfpoly.obj: cfpoly.cpp cpoly.h spoly.h
                    238:     $(CC) -c cfpoly.cpp
                    239: 
                    240: clsid.obj: clsid.c clsid.h
                    241:     $(CC) -c clsid.c
                    242: 
                    243: cenumpt.obj: cenumpt.cpp cenumpt.h
                    244:     $(CC) -c cenumpt.cpp
                    245: 
                    246: statbar.obj: statbar.cpp statbar.h
                    247:     $(CC) -c statbar.cpp
                    248: 
                    249: tdata.obj: tdata.cpp cpoint.h cpoly.h
                    250:     $(CC) -c tdata.cpp

unix.superglobalmegacorp.com

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