|
|
1.1 root 1: # This is a part of the Microsoft Foundation Classes C++ library.
2: # Copyright (C) 1992 Microsoft Corporation
3: # All rights reserved.
4: #
5: # This source code is only intended as a supplement to the
6: # Microsoft Foundation Classes Reference and Microsoft
1.1.1.2 ! root 7: # documentation provided with the library.
1.1 root 8: # See these sources for detailed information regarding the
9: # Microsoft Foundation Classes product.
10: #
11:
12: # Build hello1 application and Tracer DLL
13:
1.1.1.2 ! root 14: # Options to NMAKE:
! 15: # "OPT" => use to set custom compile options
! 16: # "PLATFORM=INTEL" (defaults to INTEL)
! 17: # This option chooses the appropriate tools and sources for the
! 18: # different platforms support by Windows/NT. Currently INTEL and
! 19: # MIPS are supported; more will be aded as they become available.
1.1 root 20:
21:
1.1.1.2 ! root 22: !if "$(PLATFORM)"==""
! 23: PLATFORM=ALPHA
! 24: !endif
1.1 root 25:
1.1.1.2 ! root 26: DEBUGFLAGS = /Z7 /Od /D_DEBUG
! 27: MFCLIB=..\..\lib\nafxcwd.lib
! 28: MFCLIBDLL=..\..\lib\nafxdwd.lib
! 29:
! 30: !if "$(PLATFORM)"=="INTEL"
! 31: CPUFLAGS = /D_X86_
! 32: CPP = cl
! 33: LINK = link
! 34: LIB32 = lib
! 35: MFCDLLENTRY =
! 36: !else
! 37: !if "$(PLATFORM)"=="MIPS"
! 38: CPUFLAGS = /D_MIPS_
! 39: CPP = mcl
! 40: LINK = link32
! 41: LIB32 = lib32
! 42: MFCDLLENTRY = -entry:DllMain
! 43: !else
! 44: !if "$(PLATFORM)"=="ALPHA"
! 45: CPUFLAGS =
! 46: CPP = claxp
! 47: LINK = link32
! 48: LIB32 = lib32
! 49: MFCDLLENTRY = -entry:DllMain
! 50: !endif
! 51: !endif
! 52: !endif
1.1 root 53:
1.1.1.2 ! root 54: MFCFLAGS=/D_WINDOWS
! 55: CPPFLAGS = /c /W3 $(DEBUGFLAGS) $(MFCFLAGS) $(CPUFLAGS) $(OPT)
! 56: GUIFLAGS = -debug:full -debugtype:both -subsystem:windows -entry:WinMainCRTStartup
! 57:
! 58: GUILIBS = user32.lib gdi32.lib \
! 59: winspool.lib comdlg32.lib advapi32.lib \
! 60: olecli32.lib olesvr32.lib shell32.lib \
! 61: kernel32.lib libc.lib
1.1 root 62:
1.1.1.2 ! root 63: GUILIBSDLL = $(GUILIBS)
1.1 root 64:
1.1.1.2 ! root 65: goal: hello1.exe tracer.dll
1.1 root 66:
67:
1.1.1.2 ! root 68: #############################################################################
1.1 root 69:
70: hello1.obj: hello1.cpp resource.h traceapi.h
71: $(CPP) $(CPPFLAGS) hello1.cpp
72:
73: hello1.exe: hello1.obj hello1.def hello1.res tracer.lib
74: $(LINK) $(GUIFLAGS) -out:hello1.exe hello1.obj tracer.lib hello1.res $(MFCLIB) $(GUILIBS)
75:
76: hello1.res: hello1.rc resource.h hello1.ico
1.1.1.2 ! root 77: !if "$(PLATFORM)"=="INTEL"
! 78: rc -r hello1.rc
! 79: !else
! 80: !if "$(PLATFORM)"=="MIPS"
! 81: rc -r -fo hello1.rct hello1.rc
! 82: cvtres -MIPS -o hello1.res hello1.rct
! 83: -erase hello1.rct
! 84: !else
! 85: !if "$(PLATFORM)"=="ALPHA"
! 86: rc -r -fo hello1.rct hello1.rc
! 87: cvtres -ALPHA -o hello1.res hello1.rct
! 88: -erase hello1.rct
! 89: !endif
! 90: !endif
1.1 root 91: !endif
92:
93: #############################################################################
94:
95:
96: tracer.obj: tracer.cpp traceapi.h
1.1.1.2 ! root 97: $(CPP) $(CPPFLAGS) /D_WINDLL /D_USRDLL tracer.cpp
1.1 root 98:
99: tracer.dll: tracer.obj tracer.res tracer.lib
100: $(LINK) -debug:full -debugtype:cv -dll -out:tracer.dll \
101: -subsystem:windows \
102: -map:tracer.map \
1.1.1.2 ! root 103: $(MFCDLLENTRY) \
! 104: -base:0x1C000000 \
1.1 root 105: tracer.obj tracer.res tracer.exp \
106: $(MFCLIBDLL) $(GUILIBSDLL)
107:
1.1.1.2 ! root 108: tracer.res: tracer.rc traceres.h
! 109: !if "$(PLATFORM)"=="INTEL"
! 110: rc -r tracer.rc
! 111: !else
! 112: !if "$(PLATFORM)"=="MIPS"
! 113: rc -r -fo tracer.rct tracer.rc
! 114: cvtres -MIPS -o tracer.res tracer.rct
! 115: -erase tracer.rct
! 116: !else
! 117: !if "$(PLATFORM)"=="ALPHA"
! 118: rc -r -fo tracer.rct tracer.rc
! 119: cvtres -ALPHA -o tracer.res tracer.rct
! 120: -erase tracer.rct
! 121: !endif
! 122: !endif
! 123: !endif
1.1 root 124:
1.1.1.2 ! root 125: # import library
! 126: tracer.lib: tracer.obj
! 127: !if "$(PLATFORM)"=="INTEL"
! 128: $(LIB32) -machine:i386 -def:tracer.def tracer.obj -out:tracer.lib
! 129: !else
! 130: !if "$(PLATFORM)"=="MIPS"
! 131: $(LIB32) -machine:mips -def:tracer.def tracer.obj -out:tracer.lib
! 132: !else
! 133: !if "$(PLATFORM)"=="ALPHA"
! 134: $(LIB32) -machine:alpha -def:tracer.def tracer.obj -out:tracer.lib
! 135: !endif
! 136: !endif
1.1 root 137: !endif
138:
139: #############################################################################
140:
141: clean:
142: -del *.exe
143: -del *.dll
144: -del *.res
145: -del *.obj
146: -del *.lib
147:
148: #############################################################################
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.