📄 makefile.def
字号:
!IF 0
Copyright (c) 1989-1996 Microsoft Corporation
Module Name:
makefile.def
Abstract:
This is the standard makefile for the components of the NT project.
It includes the following files:
.\sources. - developer supplies this file. It defines the
required TARGETNAME, TARGETPATH, TARGETTYPE and
SOURCES as well as optional macros that control
the behavior of the compiler and linker:
obj\_objects.mac - built by BUILD.EXE from .\sources.
Targets:
all - Builds all targets in this make file
clean - Erase all targets that can be produced by this make
file, ignoring errors. Also rebuilds the depend target.
depend - Rebuilts source file dependencies, using BUILD.EXE tool
Useful Variables Set:
CPUTYPE={I386|AXP64|ALPHA|MPPC|IA64}
Optional Controls Variables (partial list), these are environment variables,
remember they can be set with env=value on the command line as well:
NOTE: xxx_... is {MSC|386|axp64|alpha|MPPC|ia64} where MSC_ applies to the C8 compiler
independent of the cpu type. Specific cpu_ will take precedence
over the equivalent MSC_ variable.
EXAMPLE: To compile with codeview symbols for windbg:
set NTDEBUG=ntsd
set NTDEBUGTYPE=windbg
set MSC_OPTIMIZATION=/Od
nttest=filename
umtest=filename
umappl=filename
NT_UP
Define as 0 in environment to turn on MP.
If undefined or equal to 1, you get UP.
xxx_warning_level
xxx_optimization
xxx_STDCALL = 1 use _stdcall calling convention
0 use _cdecl calling convention
ntdebug
browser_info
xxx_cppflags
ntcppflags
NT_INST - set to turn on instrumentation
BASEDIR - \nt or \ntrel (default \nt)
PRECOMPILED_CXX=1 - do precompiled headers for CXX instead of C files
note: precompiled headers can not be used on both
c and cxx files in a single directory.
!ENDIF
!if 0
! message You must use nmake version 1.30 or greater...
!endif
# A couple of overrides
!ifndef SDK_INC_PATH
SDK_INC_PATH = $(BASEDIR)\public\sdk\inc
!endif
!ifndef SDK_LIB_PATH
SDK_LIB_PATH = $(BASEDIR)\public\sdk\lib\*
!endif
!ifndef SDK_LIB_DEST
SDK_LIB_DEST = $(BASEDIR)\public\sdk\lib
!endif
!ifndef DDK_INC_PATH
DDK_INC_PATH = $(BASEDIR)\public\ddk\inc
!endif
!ifndef WDM_INC_PATH
WDM_INC_PATH = $(DDK_INC_PATH)\wdm
!endif
!ifndef DDK_LIB_PATH
DDK_LIB_PATH = $(BASEDIR)\public\sdk\lib\*
!endif
!ifndef DDK_LIB_DEST
DDK_LIB_DEST = $(BASEDIR)\public\sdk\lib
!endif
!ifndef CRT_INC_PATH
CRT_INC_PATH = $(BASEDIR)\public\sdk\inc\crt
!endif
!ifndef CRT_LIB_PATH
CRT_LIB_PATH = $(BASEDIR)\public\sdk\lib\*
!endif
!ifndef OAK_INC_PATH
OAK_INC_PATH = $(BASEDIR)\public\oak\inc
!endif
!ifndef PRIVATE_INC_PATH
PRIVATE_INC_PATH = $(BASEDIR)\private\inc
!endif
!ifndef MASTER_VERSION_FILE
MASTER_VERSION_FILE = $(SDK_INC_PATH)\ntverp.h
DEFAULT_VERSION_FILE=1
!endif
#
# Select build target and set platform specific variables.
#
!INCLUDE makefile.plt
#
# IDL/RDL/TDL build rules.
#
!ifdef IDL_RULES
IDL_OUT_DIR =.
IDL_HDR_OUT_DIR =.
RDL_OUT_DIR =.
RDL_HDR_OUT_DIR =.
! ifndef MIDL_INCS
MIDL_INCS = $(_OBJ_DIR)\$(TARGET_DIRECTORY)
! endif
! ifndef MC_OUT_DIR
MC_OUT_DIR = $(_OBJ_DIR)\$(TARGET_DIRECTORY)
! endif
!endif
!ifndef LANGUAGE
LANGUAGE=usa
!endif
# define a simple macro that can be used for the object subdir in makefile.inc/sources files
O = $(_OBJ_DIR)\$(TARGET_DIRECTORY)
#
# Include the developer supplied file that defines the TARGETNAME, TARGETPATH,
# TARGETTYPE and SOURCES macros. Make sure it defines them.
#
!if defined(USE_ICECAP) || defined(USE_ICECAP4) || defined(USE_DLP)
! ifdef USE_ICECAP
PERFFLAGS=-Gh
PERFLIBS=$(SDK_LIB_PATH)\icap.lib
! else
! ifdef USE_ICECAP4
PERFFLAGS=/fastcap
PERFLIBS=$(SDK_LIB_PATH)\icecap.lib
! else # USE_DLP
PERFFLAGS=/dlp
PERFLIBS=$(SDK_LIB_PATH)\icecap.lib
! endif
! endif
! if $(FREEBUILD)
NTDEBUG=ntsdnodbg
! else
NTDEBUG=ntsd
! endif
NTDEBUGTYPE=windbg
NTBBT=1
!endif
SUBSYSTEM_VERSION_CURRENT=4.10
LATEST_WIN32_IE_VERSION=0x0501
LATEST_WIN32_WINNT_VERSION=0x0500
LATEST_WIN32_WIN95_VERSION=0x0400
!INCLUDE .\sources.
SOURCES_USED=$(SOURCES_USED) .\sources
!IF EXIST(.\$(TARGET_DIRECTORY)\sources.)
! INCLUDE .\$(TARGET_DIRECTORY)\sources.
SOURCES_USED=$(SOURCES_USED) .\$(TARGET_DIRECTORY)\sources.
!ENDIF
#
# Attempt to include the sources file from the parent target subdirectory.
#
!IF EXIST(..\$(TARGET_DIRECTORY)\sources.)
! INCLUDE ..\$(TARGET_DIRECTORY)\sources.
SOURCES_USED=$(SOURCES_USED) ..\$(TARGET_DIRECTORY)\sources.
!ENDIF
!if defined(LOCALIZED_RESOURCES) && !defined(RCCODEPAGE)
! if "$(LANGUAGE)" == "JPN" || "$(LANGUAGE)" == "jpn"
RCCODEPAGE=932
! elseif "$(LANGUAGE)" == "KOR" || "$(LANGUAGE)" == "kor"
RCCODEPAGE=949
! elseif "$(LANGUAGE)" == "CHS" || "$(LANGUAGE)" == "chs"
RCCODEPAGE=936
! elseif "$(LANGUAGE)" == "CHP" || "$(LANGUAGE)" == "chp"
RCCODEPAGE=936
! elseif "$(LANGUAGE)" == "CHT" || "$(LANGUAGE)" == "cht"
RCCODEPAGE=950
! endif
!endif
#
# Attempt to include the sources file from the target subdirectory.
#
#
# Set far east specific defines based on the project
#
DO_FE_SB=0
!if "$(ALT_PROJECT)" == "FE" || \
"$(ALT_PROJECT)" == "CHT" || \
"$(ALT_PROJECT)" == "CHS" || \
"$(ALT_PROJECT)" == "CHP" || \
"$(ALT_PROJECT)" == "JPN" || \
"$(ALT_PROJECT)" == "KOR" || \
"$(ALT_PROJECT)" == "NEC_98"
C_DEFINES=$(C_DEFINES) -DDBCS -DKKBUGFIX
ASM_DEFINES=$(ASM_DEFINES) -DDBCS -DKKBUGFIX
DO_FE_SB=1
!endif
!if "$(ALT_PROJECT)" == "CHT"
C_DEFINES=$(C_DEFINES) -DTAIWAN
ASM_DEFINES=$(ASM_DEFINES) -DTAIWAN
!elseif "$(ALT_PROJECT)" == "CHS" || "$(ALT_PROJECT)" == "CHP"
C_DEFINES=$(C_DEFINES) -DPRC
ASM_DEFINES=$(ASM_DEFINES) -DPRC
!elseif "$(ALT_PROJECT)" == "JPN"
C_DEFINES=$(C_DEFINES) -DJAPAN
ASM_DEFINES=$(ASM_DEFINES) -DJAPAN
!elseif "$(ALT_PROJECT)" == "KOR"
C_DEFINES=$(C_DEFINES) -DKOREA
ASM_DEFINES=$(ASM_DEFINES) -DKOREA
!elseif "$(ALT_PROJECT)" == "NEC_98"
C_DEFINES=$(C_DEFINES) -DJAPAN -DNEC_98
ASM_DEFINES=$(ASM_DEFINES) -DJAPAN -DNEC_98
!elseif "$(ALT_PROJECT)" != ""
C_DEFINES=$(C_DEFINES) -D_$(ALT_PROJECT)_
!endif
!IF "$(ALT_PROJECT)" == "HYDRA"
ASM_DEFINES=$(ASM_DEFINES) -D_HYDRA_
HYDRA=1
!ENDIF
!IF "$(ALT_PROJECT)" == "JANUS"
ASM_DEFINES=$(ASM_DEFINES) -D_JANUS_
C_DEFINES=$(C_DEFINES) -D_JANUS_
JANUS=1
!ENDIF
!IF ("$(NO_W32_SB)" == "" && "$(W32_SB)" == "1")
DO_FE_SB=1
! ENDIF
!IF "$(DO_FE_SB)" == "1"
C_DEFINES=$(C_DEFINES) -DFE_SB -DFE_IME
ASM_DEFINES=$(ASM_DEFINES) -DFE_SB
!ENDIF
!IF "$(ALT_PROJECT)" == "DS"
# Nothing, just -D_DS_ from above
!ENDIF
!IF "$(DSLIBRARY)" == ""
DSLIBRARY=$(BASEDIR)\public\sdk\lib
!ENDIF
!ifdef RESOURCE_ONLY_DLL
# Resource only DLL's have no exports, no entrypoint, no code, no data, no debug symbolic.
NTDEBUGTYPE=
NTDEBUG=
LINKER_DBG_SECTION=-debug:NONE
!undef NTBBT
!undef DLLENTRY
LINK_NO_RELEASE=1
MAKEDLL=1
TARGETLIBS=
LINKLIBS=
USE_NOLIBS=1
NO_NTDLL=1
!else
LINKER_DBG_SECTION=-debug:FULL
!endif
!ifdef DEFAULT_VERSION_FILE
# ! if "$(C_DEFINES)" != "$(C_DEFINES:DNASHVILLE=)"
# MASTER_VERSION_FILE=$(MASTER_VERSION_FILE) $(SDK_INC_PATH)\ieverp.h
# ! endif
!endif
!IFNDEF TARGETPATH
! ERROR Your .\sources. file must define the TARGETPATH= macro
!ENDIF
!if "$(TARGETPATH)" == "obj" || "$(TARGETPATH)" == "OBJ"
TARGETPATH=$(_OBJ_DIR)
!endif
!ifdef TARGETPATHLIB
! if ("$(TARGETTYPE)" == "DYNLINK") || ("$(TARGETTYPE)" == "EXPORT_DRIVER")
! if "$(MAKEDLL)" == ""
# Pass 1 of a two pass build. Make sure TargetPath is the same as targetpathlib.
NO_BROWSER_FILE=1
TARGETPATH=$(TARGETPATHLIB)
! endif
! endif
!else
TARGETPATHLIB=$(TARGETPATH)
!endif
!IF ("$(TARGETPATH)" == "$(BASEDIR)\lib") || ("$(TARGETPATH)" == "$(BASEDIR)\LIB")
! ERROR Setting TARGETPATH= $(BASEDIR)\lib in .\sources is not valid - please use obj.
!ENDIF
!IFNDEF TARGETTYPE
! ERROR Your .\sources. file must define the TARGETTYPE= macro
!ENDIF
!IFNDEF TARGETNAME
! IF "$(TARGETTYPE)" != "NOTARGET"
! ERROR Your .\sources. file must define the TARGETNAME= macro
! ELSE
TARGETNAME=
! ENDIF
!ENDIF
!IFNDEF SOURCES
! ERROR Your .\sources. file must define the SOURCES= macro
!ENDIF
!if ("$(BUILD_ALT_DIR)" != "" && "$(BUILD_ALT_DIR)" != "d")
! if ("$(UMAPPL:*=X)" != "$(UMAPPL)")
! error Can't use multiple UMAPPL with Alternate Directories (other than "d")
! elseif ("$(UMTEST:*=X)" != "$(UMTEST)")
! error Can't use multiple UMTEST with Alternate Directories (other than "d")
! endif
!endif
!ifndef COFFBASE_TXT_FILE
COFFBASE_TXT_FILE = $(SDK_LIB_DEST)\coffbase.txt
!endif
!IFNDEF UMBASE
! IFDEF COFFBASE
UMBASE=@$(COFFBASE_TXT_FILE),$(COFFBASE)
! ELSE
UMBASE=@$(COFFBASE_TXT_FILE),usermode
! ENDIF
!ENDIF
LINKLIBS=$(LINKLIBS) $(PERFLIBS)
!ifndef ATL_VER
ATL_VER=21
!endif
!if defined(USE_ATL)
ATL_INCLUDES=$(SDK_INC_PATH)\atl$(ATL_VER)
ATL_DEFINES=/D_ATL_DLL
! if "$(ATL_VER)" == "10"
ATL_LIBS=
! else
ATL_LIBS=$(SDK_LIB_PATH)\atl.lib $(ADDITIONAL_ATL_LIBS)
! endif
!elseif defined(USE_STATIC_ATL)
ATL_INCLUDES=$(SDK_INC_PATH)\atl$(ATL_VER)
ATL_LIBS=$(ADDITIONAL_ATL_LIBS)
ATL_DEFINES=/D_ATL_STATIC_REGISTRY
!endif
!IF DEFINED(USE_MFC) || DEFINED(USE_MFCUNICODE)
!ifdef USE_LATEST_MFC
PLATFORM_MFC_VER=0x0600
!endif
!if "$(PLATFORM_MFC_VER)" != "0x0600"
# MFC versions before 6.0 need NT4/Win95 values. Override at your own risk.
!ifndef WIN32_WINNT_VERSION
WIN32_WINNT_VERSION=0x0400
!endif
!ifndef WIN32_IE_VERSION
WIN32_IE_VERSION=0x0300
!endif
!else # MFC post 6x defaults to the current version of IE/Win2k.
!ifndef WIN32_WINNT_VERSION
WIN32_WINNT_VERSION=$(LATEST_WIN32_WINNT_VERSION)
!endif
!ifndef WIN32_IE_VERSION
WIN32_IE_VERSION=$(LATEST_WIN32_IE_VERSION)
!endif
!endif
!ifndef WIN32_WIN95_VERSION
WIN32_WIN95_VERSION=0x0400
!endif
#---------------------------------------------------------#
# this set of defines establishes the "correct" build #
# environment for an app that needs to use MFC. the #
# app's sources file only needs to specify USE_MFC=1 #
# and this makefile will set the enviroment up correctly. #
#---------------------------------------------------------#
! ifndef UMENTRY
! ifdef USE_MFCUNICODE
UMENTRY=wwinmain
! else
UMENTRY=winmain
! endif
! endif
! if "$(TARGETTYPE)" == "DYNLINK"
! ifndef DLLENTRY
DLLENTRY=_DllMainCRTStartup
! endif
! endif
! ifndef UMTYPE
UMTYPE=windows
! endif
UMENTRYABS=
# Allow other MFC's.
# To do so, you need to:
# 1. Define MFC_INCLUDES to point to your MFC headers.
# 2. Define MFC_LIBS to point to your MFC libraries (specifically, the dll
# library)
# 3. Define USE_MSVCRT=1 if you don't want to link with the NT CRT DLL.
#
# Note:
# There is only one type of build (_AFXDLL or MFC in a DLL linking to the
# CRT in a dll).
# You should disable the alternate MFC's if compiling for RISC platforms.
# You need to handle specifying the correct libs for Check/Free and
# Ansi/Unicode.
! if !defined(USE_MSVCRT) && !defined(USE_NOLIBS) && !defined(USE_MSVCRT40)
! if defined(USE_STATIC_MFC)
USE_LIBCMT=1
! else
USE_CRTDLL=1
! endif
! endif
# Add MFC_FLAGS in just in case there's old sources files that use it.
MFC_DEFINES=$(MFC_DEFINES) $(MFC_FLAGS) -D_AFX_NOFORCE_LIBS -D_MFC_VER=$(PLATFORM_MFC_VER)
! ifdef DEBUG_CRTS
MFC_DEFINES=$(MFC_DEFINES) -D_AFX_ENABLE_INLINES
! endif
! IFDEF USE_MFCUNICODE
UNICODE=1
MFC_DEFINES=$(MFC_DEFINES) -DUNICODE -D_UNICODE
! ENDIF
# Assume Latest MFC (4.0 for now)
! ifndef USE_STATIC_MFC
MFC_DEFINES=$(MFC_DEFINES) -D_AFXDLL
LINKER_FLAGS = $(LINKER_FLAGS) /include:__afxForceSTDAFX
! endif
! ifdef MFC_USRDLL
MFC_DEFINES=$(MFC_DEFINES) -D_USRDLL
LINKER_FLAGS = $(LINKER_FLAGS) /include:__afxForceUSRDLL
! endif
# MFC 4 uses Native EH only
USE_NATIVE_EH=1
USE_RTTI=1
# UNICODE must use the UNICODE entrypoint
! ifdef USE_MFCUNICODE
! if "$(UMENTRY)" == "winmain"
UMENTRY = wwinmain
! else if "$(UMENTRY)" == "main"
UMENTRY = wmain
! endif
! endif
! ifndef MFC_VER
MFC_VER=42
! else if "$(MFC_VER)" == "40" && !defined(USE_STATIC_MFC)
!undef USE_MSVCRT
!undef USE_CRTDLL
USE_MSVCRT40=1
! endif
! ifndef MFC_DAO_INC
MFC_DAO_INC=$(BASEDIR)\public\sdk\inc\dao350
! endif
! ifndef MFC_INCLUDES
MFC_INCLUDES=$(SDK_INC_PATH)\mfc$(MFC_VER);$(MFC_DAO_INC)
! ifdef MFC_LANGUAGE
MFC_INCLUDES=$(SDK_INC_PATH)\mfc$(MFC_VER)\l.$(MFC_LANGUAGE);$(MFC_INCLUDES)
! endif
! endif
! ifndef MFC_LIBS
! ifdef USE_STATIC_MFC
! ifdef DEBUG_CRTS
! ifdef USE_MFCUNICODE
MFC_STATIC_LIB =
MFC_LIBS=$(SDK_LIB_PATH)\uafxcwd.lib
! else
MFC_STATIC_LIB =
MFC_LIBS=$(SDK_LIB_PATH)\nafxcwd.lib
! endif
! else
! ifdef USE_MFCUNICODE
MFC_STATIC_LIB =
MFC_LIBS=$(SDK_LIB_PATH)\uafxcw.lib
! else
MFC_STATIC_LIB =
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -