|
|
1.1.1.2 ! root 1: # ========================================================================= ! 2: # NTWIN32.MAK - Win32 application master NMAKE definitions file for the ! 3: # Microsoft Win32 SDK for Windows NT programming samples ! 4: # ------------------------------------------------------------------------- ! 5: # This files should be included at the top of all MAKEFILEs as follows: ! 6: # !include <ntwin32.mak> ! 7: # ------------------------------------------------------------------------- ! 8: # NMAKE Options ! 9: # ! 10: # Use the table below to determine the additional options for NMAKE to ! 11: # generate various application debugging, profiling and performance tuning ! 12: # information. ! 13: # ! 14: # Application Information Type Invoke NMAKE ! 15: # ---------------------------- ------------ ! 16: # For No Debugging Info nmake nodebug=1 ! 17: # For Working Set Tuner Info nmake tune=1 ! 18: # For Call Attributed Profiling Info nmake profile=1 ! 19: # ! 20: # Note: Working Set Tuner and Call Attributed Profiling is for available ! 21: # for the Intel x86 and Pentium systems. ! 22: # ! 23: # Note: The three options above are mutually exclusive (you may use only ! 24: # one to compile/link the application). ! 25: # ! 26: # Note: creating the environment variables NODEBUG, TUNE, and PROFILE is an ! 27: # alternate method to setting these options via the nmake command line. ! 28: # ! 29: # Additional NMAKE Options Invoke NMAKE ! 30: # ---------------------------- ------------ ! 31: # For No ANSI NULL Compliance nmake no_ansi=1 ! 32: # (ANSI NULL is defined as PVOID 0) ! 33: # ! 34: # ========================================================================= 1.1 root 35: 1.1.1.2 ! root 36: # ------------------------------------------------------------------------- 1.1 root 37: # Get CPU Type - exit if CPU environment variable is not defined 1.1.1.2 ! root 38: # ------------------------------------------------------------------------- 1.1 root 39: 1.1.1.2 ! root 40: # Intel i386, i486, and Pentium systems 1.1 root 41: !IF "$(CPU)" == "i386" 42: CPUTYPE = 1 43: !ENDIF 44: 1.1.1.2 ! root 45: # MIPS R4x000 systems 1.1 root 46: !IF "$(CPU)" == "MIPS" 47: CPUTYPE = 2 48: !ENDIF 49: 50: !IFNDEF CPUTYPE 1.1.1.2 ! root 51: !ERROR Must specify CPU environment variable ( CPU=i386 or CPU=MIPS ) 1.1 root 52: !ENDIF 53: 1.1.1.2 ! root 54: # ------------------------------------------------------------------------- ! 55: # Platform Dependent Binaries Declarations 1.1 root 56: # 1.1.1.2 ! root 57: # If you are using the old MIPS compiler then define the following: ! 58: # cc = cc ! 59: # cvtobj = mip2coff ! 60: # ------------------------------------------------------------------------- 1.1 root 61: 1.1.1.2 ! root 62: # binary declarations for use on Intel i386, i486, and Pentium systems ! 63: !IF "$(CPU)" == "i386" ! 64: cc = cl386 ! 65: # for compatibility with older-style makefiles ! 66: cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!! ! 67: !ENDIF 1.1 root 68: 1.1.1.2 ! root 69: # binary declarations for use on self hosted MIPS R4x000 systems ! 70: !IF "$(CPU)" == "MIPS" ! 71: cc = mcl ! 72: # for compatibility with older-style makefiles ! 73: cvtobj = REM !!! CVTOBJ is no longer necessary - please remove !!! ! 74: !ENDIF 1.1 root 75: 1.1.1.2 ! root 76: # binary declarations common to all platforms ! 77: link = link32 ! 78: implib = lib32 ! 79: rc = rc ! 80: cvtres = cvtres ! 81: hc = hc 1.1 root 82: 1.1.1.2 ! root 83: # ------------------------------------------------------------------------- 1.1 root 84: # Platform Dependent Compile Flags - must be specified after $(cc) 85: # 1.1.1.2 ! root 86: # Note: Debug switches are on by default for current release ! 87: # ! 88: # These switches allow for source level debugging with WinDebug for local ! 89: # and global variables. 1.1 root 90: # 1.1.1.2 ! root 91: # Both compilers now use the same front end - you must still define either ! 92: # _X86_ or _MIPS_. These have replaced the i386 and MIPS definitions which ! 93: # are not ANSI compliant. 1.1 root 94: # 1.1.1.2 ! root 95: # Common compiler flags: 1.1 root 96: # -c - compile without linking 97: # -W3 - Set warning level to level 3 98: # -Zi - generate debugging information 99: # -Od - disable all optimizations 1.1.1.2 ! root 100: # -Ox - use maximum optimizations ! 101: # -Zd - generate only public symbols and line numbers for debugging 1.1 root 102: # 1.1.1.2 ! root 103: # i386 specific compiler flags: ! 104: # -Gz - stdcall ! 105: # ! 106: # MS MIPS specific compiler flags: ! 107: # none. ! 108: # ! 109: # *** OLD MIPS ONLY *** ! 110: # ! 111: # The following definitions are for the old MIPS compiler: ! 112: # ! 113: # OLD MIPS compiler flags: 1.1 root 114: # -c - compile without linking 1.1.1.2 ! root 115: # -std - produce warnings for non-ANSI standard source code 1.1 root 116: # -g2 - produce a symbol table for debugging 117: # -O - invoke the global optimizer 118: # -EL - produce object modules targeted for 119: # "little-endian" byte ordering 1.1.1.2 ! root 120: # ! 121: # If you are using the old MIPS compiler then define the following: ! 122: # ! 123: # # OLD MIPS Complile Flags ! 124: # !IF 0 ! 125: # !IF "$(CPU)" == "MIPS" ! 126: # cflags = -c -std -o $(*B).obj -EL -DMIPS=1 -D_MIPS_=1 ! 127: # !IFDEF NODEBUG ! 128: # cdebug = ! 129: # !ELSE ! 130: # cdebug = -g2 ! 131: # !ENDIF ! 132: # !ENDIF ! 133: # !ENDIF ! 134: # ! 135: # ------------------------------------------------------------------------- ! 136: ! 137: # declarations common to all compiler options ! 138: ccommon = -c -W3 1.1 root 139: 140: !IF "$(CPU)" == "i386" 1.1.1.2 ! root 141: cflags = $(ccommon) -D_X86_=1 ! 142: scall = -Gz ! 143: !ELSE ! 144: cflags = $(ccommon) -D_MIPS_=1 ! 145: scall = 1.1 root 146: !ENDIF 147: 1.1.1.2 ! root 148: !IF "$(CPU)" == "i386" ! 149: !IFDEF NODEBUG ! 150: cdebug = -Ox ! 151: !ELSE ! 152: !IFDEF PROFILE ! 153: cdebug = -Gh -Zd -Ox ! 154: !ELSE ! 155: !IFDEF TUNE ! 156: cdebug = -Gh -Zd -Ox ! 157: !ELSE ! 158: cdebug = -Zi -Od ! 159: !ENDIF ! 160: !ENDIF ! 161: !ENDIF ! 162: !ELSE ! 163: !IFDEF NODEBUG ! 164: cdebug = -Ox ! 165: !ELSE ! 166: cdebug = -Zi -Od ! 167: !ENDIF 1.1 root 168: !ENDIF 169: 1.1.1.2 ! root 170: # ------------------------------------------------------------------------- ! 171: # Target Module & Subsystem Dependent Compile Defined Variables - must be ! 172: # specified after $(cc) ! 173: # ! 174: # The following table indicates the various acceptable combinations of ! 175: # the C Run-Time libraries LIBC, LIBCMT, and CRTDLL respect to the creation ! 176: # of a EXE and/or DLL target object. The appropriate compiler flag macros ! 177: # that should be used for each combination are also listed. ! 178: # ! 179: # Link EXE Create Exe Link DLL Create DLL ! 180: # with Using with Using ! 181: # ---------------------------------------------------- ! 182: # LIBC CVARS None None * ! 183: # LIBC CVARS LIBC CVARS ! 184: # LIBC CVARS LIBCMT CVARSMT ! 185: # LIBCMT CVARSMT None None * ! 186: # LIBCMT CVARSMT LIBC CVARS ! 187: # LIBCMT CVARSMT LIBCMT CVARSMT ! 188: # CRTDLL CVARSDLL None None * ! 189: # CRTDLL CVARSDLL LIBC CVARS ! 190: # CRTDLL CVARSDLL LIBCMT CVARSMT ! 191: # CRTDLL CVARSDLL CRTDLL CVARSDLL * ! 192: # ! 193: # * - Denotes the Recommended Configuration ! 194: # ! 195: # Note: Any executable which accesses a DLL linked with CRTDLL.LIB must ! 196: # also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB. ! 197: # When using DLLs, it is recommended that all of the modules be ! 198: # linked with CRTDLL.LIB. ! 199: # ! 200: # Note: The macros of the form xDLL are used when linking the object with ! 201: # the DLL version of the C Run-Time (that is, CRTDLL.LIB). They are ! 202: # not used when the target object is itself a DLL. 1.1 root 203: # 1.1.1.2 ! root 204: # ------------------------------------------------------------------------- 1.1 root 205: 1.1.1.2 ! root 206: !IFDEF NO_ANSI ! 207: noansi = -DNULL=0 ! 208: !ENDIF 1.1 root 209: 1.1.1.2 ! root 210: # for Windows applications that use the C Run-Time libraries ! 211: cvars = -DWIN32 $(noansi) ! 212: cvarsmt = $(cvars) -D_MT ! 213: cvarsdll = $(cvarsmt) -D_DLL ! 214: ! 215: # for compatibility with older-style makefiles ! 216: cvarsdll = $(cvarsmt) -D_DLL ! 217: ! 218: # for POSIX applications ! 219: psxvars = -D_POSIX_ ! 220: ! 221: # resource compiler ! 222: rcvars = -DWIN32 $(noansi) ! 223: ! 224: # ------------------------------------------------------------------------- ! 225: # Platform Dependent Link Flags - must be specified after $(link) 1.1 root 226: # 1.1.1.2 ! root 227: # Note: $(DLLENTRY) should be appended to each -entry: flag on the link ! 228: # line. 1.1 root 229: # 1.1.1.2 ! root 230: # Note: When creating a DLL that uses C Run-Time functions it is ! 231: # recommended to include the entry point function of the name DllMain ! 232: # in the DLL's source code. Also, the MAKEFILE should include the ! 233: # -entry:_DllMainCRTStartup$(DLLENTRY) option for the creation of ! 234: # this DLL. (The C Run-Time entry point _DllMainCRTStartup in turn ! 235: # calls the DLL defined DllMain entry point.) ! 236: # ! 237: # ------------------------------------------------------------------------- ! 238: ! 239: # declarations common to all linker options ! 240: lcommon = 1.1 root 241: 1.1.1.2 ! root 242: # declarations for use on Intel i386, i486, and Pentium systems 1.1 root 243: !IF "$(CPU)" == "i386" 1.1.1.2 ! root 244: DLLENTRY = @12 ! 245: lflags = $(lcommon) -align:0x1000 1.1 root 246: !ENDIF 247: 1.1.1.2 ! root 248: # declarations for use on self hosted MIPS R4x000 systems 1.1 root 249: !IF "$(CPU)" == "MIPS" 1.1.1.2 ! root 250: DLLENTRY = ! 251: lflags = $(lcommon) 1.1 root 252: !ENDIF 253: 1.1.1.2 ! root 254: # ------------------------------------------------------------------------- ! 255: # Target Module Dependent Link Debug Flags - must be specified after $(link) 1.1 root 256: # 1.1.1.2 ! root 257: # These switches allow the inclusion of the necessary symbolic information ! 258: # for source level debugging with WinDebug, profiling and/or performance ! 259: # tuning. 1.1 root 260: # 1.1.1.2 ! root 261: # Note: Debug switches are on by default. ! 262: # ------------------------------------------------------------------------- 1.1 root 263: 1.1.1.2 ! root 264: !IF "$(CPU)" == "i386" ! 265: !IFDEF NODEBUG ! 266: ldebug = ! 267: !ELSE ! 268: !IFDEF PROFILE ! 269: ldebug = -debug:partial -debugtype:coff ! 270: !ELSE ! 271: !IFDEF TUNE ! 272: ldebug = -debug:partial -debugtype:coff ! 273: !ELSE ! 274: ldebug = -debug:full -debugtype:cv ! 275: !ENDIF ! 276: !ENDIF ! 277: !ENDIF ! 278: !ELSE ! 279: !IFDEF NODEBUG ! 280: ldebug = ! 281: !ELSE ! 282: ldebug = -debug:full -debugtype:cv ! 283: !ENDIF ! 284: !ENDIF 1.1 root 285: 1.1.1.2 ! root 286: # for compatibility with older-style makefiles ! 287: linkdebug = $(ldebug) 1.1 root 288: 1.1.1.2 ! root 289: # ------------------------------------------------------------------------- ! 290: # Subsystem Dependent Link Flags - must be specified after $(link) ! 291: # ! 292: # These switches allow for source level debugging with WinDebug for local ! 293: # and global variables. They also provide the standard application type and ! 294: # entry point declarations. ! 295: # ------------------------------------------------------------------------- ! 296: ! 297: # for Windows applications that use the C Run-Time libraries ! 298: conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup ! 299: guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup ! 300: ! 301: # for POSIX applications ! 302: psxlflags = $(lflags) -subsystem:posix -entry:__PosixProcessStartup ! 303: ! 304: # for compatibility with older-style makefiles ! 305: conflags = $(conlflags) ! 306: guiflags = $(guilflags) ! 307: psxflags = $(psxlflags) ! 308: ! 309: # ------------------------------------------------------------------------- ! 310: # C Run-Time Target Module Dependent Link Libraries ! 311: # ! 312: # Below is a table which describes which libraries to use depending on the ! 313: # target module type, although the table specifically refers to Graphical ! 314: # User Interface apps, the exact same dependencies apply to Console apps. ! 315: # That is, you could replace all occurrences of 'GUI' with 'CON' in the ! 316: # following: ! 317: # ! 318: # Desired CRT Libraries Desired CRT Libraries ! 319: # Library to link Library to link ! 320: # for EXE with EXE for DLL with DLL ! 321: # ---------------------------------------------------- ! 322: # LIBC GUILIBS None None * ! 323: # LIBC GUILIBS LIBC GUILIBS ! 324: # LIBC GUILIBS LIBCMT GUILIBSMT ! 325: # LIBCMT GUILIBSMT None None * ! 326: # LIBCMT GUILIBSMT LIBC GUILIBS ! 327: # LIBCMT GUILIBSMT LIBCMT GUILIBSMT ! 328: # CRTDLL GUILIBSDLL None None * ! 329: # CRTDLL GUILIBSDLL LIBC GUILIBS ! 330: # CRTDLL GUILIBSDLL LIBCMT GUILIBSMT ! 331: # CRTDLL GUILIBSDLL CRTDLL GUILIBSDLL * ! 332: # ! 333: # * - Recommended Configurations. ! 334: # ! 335: # Note: Any executable which accesses a DLL linked with CRTDLL.LIB must ! 336: # also link with CRTDLL.LIB instead of LIBC.LIB or LIBCMT.LIB. ! 337: # ! 338: # Note: For POSIX applications, link with $(psxlibs). ! 339: # ! 340: # ------------------------------------------------------------------------- 1.1 root 341: 1.1.1.2 ! root 342: # optional profiling and tuning libraries ! 343: !IF "$(CPU)" == "i386" ! 344: !IFDEF PROFILE ! 345: optlibs = cap.lib ! 346: !ELSE ! 347: !IFDEF TUNE ! 348: optlibs = wst.lib ! 349: !ELSE ! 350: optlibs = ! 351: !ENDIF ! 352: !ENDIF ! 353: !ELSE ! 354: optlibs = ! 355: !ENDIF 1.1 root 356: 1.1.1.2 ! root 357: # basic subsystem specific libraries, less the C Run-Time ! 358: baselibs = kernel32.lib $(optlibs) ! 359: winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib ! 360: ! 361: # for Windows applications that use the C Run-Time libraries ! 362: conlibs = libc.lib $(baselibs) ! 363: conlibsmt = libcmt.lib $(baselibs) ! 364: conlibsdll = crtdll.lib $(baselibs) ! 365: guilibs = libc.lib $(winlibs) ! 366: guilibsmt = libcmt.lib $(winlibs) ! 367: guilibsdll = crtdll.lib $(winlibs) 1.1 root 368: 1.1.1.2 ! root 369: # for POSIX applications ! 370: psxlibs = libcpsx.lib psxdll.lib psxrtl.lib
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.