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