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