windows-nt/Source/XPSP1/NT/tools/ia64mk.inc

357 lines
9 KiB
PHP
Raw Normal View History

2020-09-26 03:20:57 -05:00
!IF 0
Copyright (c) 1994-1996 Microsoft Corporation
Module Name:
ia64mk.inc
Abstract:
This module contains the ia64 specific build controls. It is included
by makefile.def.
Add the following variable to your env.
1) To turn on IA64 hazard detection:
set _IA64_HAZARD_DETECTION=-X explicit
2) To turn on Merced MSR access, add the following variable to your env.
set _IA64_MERCED_MSR =-A MERCED
Revision History:
!ENDIF
DELAYLOAD_SUPPORTED=1
!ifndef DELAYLOAD_VERSION
DELAYLOAD_VERSION=0x0200
!endif
#
# ia64 option control
#
!undef USE_MAPSYM
!undef USE_CV
USE_PDB=1
UMBASE=$(UMBASE:*=ia64)
UMLIBS=$(UMLIBS:*=ia64)
NTRES=$(NTRES:*=ia64)
UMRES=$(UMRES:*=ia64)
UMOBJS=$(UMOBJS:*=ia64)
LINKLIBS=$(LINKLIBS:*=ia64)
GDI_DRIVER_LIBS=$(GDI_DRIVER_LIBS:*=ia64)
DLLBASE=$(DLLBASE:*=ia64)
DLLDEF=$(DLLDEF:*=ia64)
MACHINE_TARGETLIBS=$(MACHINE_TARGETLIBS:*=ia64)
TARGET=$(TARGET:*=ia64)
DYNLINK_LIB=$(DYNLINK_LIB:*=ia64)
TARGETEXEFILES=$(TARGETEXEFILES:*=ia64)
TARGETLIBFILES=$(TARGETLIBFILES:*=ia64)
TARGETOBJFILES=$(TARGETOBJFILES:*=ia64)
UMOBJFILES=$(UMOBJFILES:*=ia64)
UMEXEFILES=$(UMEXEFILES:*=ia64)
HEADERFILE=$(HEADERFILE:*=ia64)
HEADEROBJNAME=$(HEADEROBJNAME:*=ia64)
HEADEROBJ=$(HEADEROBJ:*=ia64)
PRECOMPILED=$(PRECOMPILED:*=ia64)
PRECOMPILED_CXX=$(PRECOMPILED_CXX:*=ia64)
PRECOMPILED_TARGET=$(PRECOMPILED_TARGET:*=ia64)
MFC_STATIC_LIB=$(MFC_STATIC_LIB:*=ia64)
CRT_LIB_PATH=$(CRT_LIB_PATH:*=ia64)
SDK_LIB_PATH=$(SDK_LIB_PATH:*=ia64)
DDK_LIB_PATH=$(DDK_LIB_PATH:*=ia64)
IFSKIT_LIB_PATH=$(IFSKIT_LIB_PATH:*=ia64)
HALKIT_LIB_PATH=$(HALKIT_LIB_PATH:*=ia64)
PROCESSOR_LIB_PATH=$(PROCESSOR_LIB_PATH:*=ia64)
ORDER=$(ORDER:*=ia64)
OBJLIBFILES=$(OBJLIBFILES:*=ia64)
MISCFILES=$(MISCFILES) $(IA64_MISCFILES)
# BINPLACE_FLAGS=$(BINPLACE_FLAGS) -CI 8,halo.exe,-certain,-errata,-quiet
!ifdef NTTARGETFILES
NTTARGETFILES=$(NTTARGETFILES:*=ia64)
!endif
!ifdef NTTARGETFILE0
NTTARGETFILE0=$(NTTARGETFILE0:*=ia64)
!endif
!ifdef NTTARGETFILE1
NTTARGETFILE1=$(NTTARGETFILE1:*=ia64)
!endif
!ifdef PROJECT_LIB_PATH
PROJECT_LIB_PATH=$(PROJECT_LIB_PATH:*=ia64)
!endif
ENTRY_SUFFIX=
GDI_ENTRY_SUFFIX=
DEFAULT_STACKRESERVE=0x100000
DEFAULT_STACKCOMMIT=0x4000
ADDITIONAL_ATL_LIBS = $(ADDITIONAL_ATL_LIBS) $(SDK_LIB_PATH)\atl21asm.lib
!if !defined(_IA64_HAZARD_DETECTION)
_IA64_HAZARD_DETECTION=-X explicit
!endif
!if !defined(_IA64_MERCED_MSR)
_IA64_MERCED_MSR=-A itanium
!endif
!ifndef GENIA64
MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) /Wp64
!endif
!IF DEFINED(IA64_WARNING_LEVEL)
MSC_WARNING_LEVEL=$(IA64_WARNING_LEVEL)
!ENDIF
!ifndef MSC_WARNING_LEVEL
MSC_WARNING_LEVEL=/W3
!endif
MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) /WX
!IF DEFINED(IA64_PERFFLAGS)
PERFFLAGS = $(IA64_PERFFLAGS)
!endif
# Set MSC_OPTIMIZATION.
# Order of precedence:
# Platform specific override
# Environment variable
# System Default
!if defined(IA64_OPTIMIZATION)
MSC_OPTIMIZATION=$(IA64_OPTIMIZATION)
!else
!if !defined(MSC_OPTIMIZATION)
MSC_OPTIMIZATION=$(DEFAULT_MSC_OPT)
!endif
MSC_OPTIMIZATION=$(MSC_OPTIMIZATION)
!endif
!ifndef GENIA64
!if defined(IA64_DEBUGGABLE_OPTIMIZATION)
MSC_OPTIMIZATION=$(MSC_OPTIMIZATION) /Zx
!endif
!ifndef IA64_FULL_FLOATING_POINT
MSC_OPTIMIZATION=$(MSC_OPTIMIZATION) /QIA64_fr32
!endif
LINK_TIME_CODE_GENERATION_MSC_OPTIMIZATION=
!if defined(LINK_TIME_CODE_GENERATION) && !defined(FORCENATIVEOBJECT)
# Some objects must be built native, so turn off GL for those
LINK_TIME_CODE_GENERATION_MSC_OPTIMIZATION=/GL
MSC_OPTIMIZATION=$(MSC_OPTIMIZATION) $(LINK_TIME_CODE_GENERATION_MSC_OPTIMIZATION)
!endif
!endif
DBGFLAGS=$(DBGFLAGS) $(MSC_OPTIMIZATION)
IA64_ADBGFLAGS=$(IA64_ADBGFLAGS) -d debug
WIN32_LIBS=$(WIN32_LIBS) $(LIBRARY_PATH)\ntdll.lib
!if defined(IA64_CPPFLAGS)
MSC_CPPFLAGS=$(IA64_CPPFLAGS)
!elseif defined(386_CPPFLAGS)
MSC_CPPFLAGS=$(386_CPPFLAGS)
!ENDIF
!ifdef NO_READONLY_STRINGS
STRING_POOLING = /Gf
!else
STRING_POOLING = /GF
!endif
!ifdef USE_NATIVE_EH
EH_FLAGS=/GX
!if "$(USE_NATIVE_EH)" == "ASYNC"
EH_FLAGS=$(EH_FLAGS) /EHa
!endif
!else
EH_FLAGS=/GX-
!endif
! ifdef USE_RTTI
RTTI_FLAGS=/GR
! else
RTTI_FLAGS=/GR-
! endif
!ifdef USE_INCREMENTAL_COMPILING
C_INCREMENTAL_FLAG=/Gi
USE_PDB_TO_COMPILE=1
!else
C_INCREMENTAL_FLAG=/Gi-
!undef USE_PDB_TO_COMPILE
!endif
ERRATA_FLAGS=
STDFLAGS= /c /Zel /Zp8 /Gy $(CBSTRING) $(MSC_WARNING_LEVEL) \
$(ERATTA_FLAGS) $(C_INCREMENTAL_FLAG) $(EH_FLAGS) \
$(RTTI_FLAGS) $(STRING_POOLING)
!IF $(FREEBUILD)
ASM_DBG_DEFINES=-DDBG=0
!ELSE
IA64_ADBGFLAGS=$(IA64_ADBGFLAGS) -d debug
!ENDIF
# This is only needed on x86
TARGET_DBG_DEFINES= $(TARGET_DBG_DEFINES) -DFPO=0
# @@BEGIN_DDKSPLIT
!IFDEF NTBBT
DBGFLAGS=$(DBGFLAGS) /Zi
IA64_ADBGFLAGS=$(IA64_ADBGFLAGS) -d debug
LINKER_FLAGS=$(LINKER_FLAGS) -debug:full -debugtype:cv,fixup
!ENDIF
# @@END_DDKSPLIT
!IFDEF SECTION_ALIGNMENT
SECTION_ALIGNMENT=-align:$(SECTION_ALIGNMENT)
!ENDIF
KERNEL_ALIGNMENT=0x80
HAL_ALIGNMENT=0x80
LINKER_FLAGS = $(LINKER_FLAGS) $(SECTION_ALIGNMENT) -debugtype:pdata
LINK_LIB_IGNORE_FLAG=$(LINK_LIB_IGNORE_FLAG),4006,4044,4108,4088
!ifndef USE_PDB_TO_COMPILE
DBGFLAGS=$(DBGFLAGS:/Zi=-Z7)
DBGFLAGS=$(DBGFLAGS:-Zi=-Z7)
!else
! if "$(TARGETTYPE)" == "LIBRARY"
DBGFLAGS=$(DBGFLAGS) /Fd$(TARGETPATH)\$(TARGET_DIRECTORY)\$(TARGETNAME).pdb
! else
DBGFLAGS=$(DBGFLAGS) /Fd$(MAKEDIR)\$(_OBJ_DIR)\ia64^\
! endif
!endif
!ifndef NO_BROWSER_INFO
! ifdef BROWSER_INFO
DBGFLAGS=$(DBGFLAGS) /FR$(MAKEDIR)\$(_OBJ_DIR)\ia64^\
! endif
!endif
!IF "$(HALTYPE)" == ""
HALDEF=
!ELSE
HALDEF=-D$(HALTYPE)=1
!ENDIF
#
#
#
!ifdef GENIA64
STD_DEFINES= -D_WIN64 -D_IA64_=1 -DIA64=1 -DNO_HW_DETECT -D_MSC_EXTENSIONS -D_GENIA64_ $(HALDEF) $(STD_DEFINES) -D_CROSS_PLATFORM_=1
!else
STD_DEFINES= -D_WIN64 -D_IA64_=1 -DIA64=1 -DNO_HW_DETECT -D_MSC_EXTENSIONS $(PTR_SIZE) $(HALDEF) $(STD_DEFINES) -D_MERCED_A0_=1
!endif
!if defined(PC98CHANGE)
STD_DEFINES=$(STD_DEFINES) -D_PC98_
!endif
CDEFINES=$(STD_DEFINES) $(TARGET_DBG_DEFINES) \
$(LIBC_DEFINES) $(C_DEFINES) $(NET_C_DEFINES) $(MFC_DEFINES)
ASM_DEFINES=$(ASM_DEFINES) -D__assembler=1
CFLAGS=$(IA64_FLAGS) $(NTIA64FLAGS) $(STDFLAGS) $(DBGFLAGS) $(PERFFLAGS) $(USER_C_FLAGS)
IA64_ASMFLAGS=$(IA64_ADBGFLAGS) $(STD_DEFINES) $(ASM_DBG_DEFINES)\
$(TARGET_DBG_DEFINES) $(ASM_DEFINES)
IA64_CDEFINES=$(CDEFINES)
IA64_CFLAGS=$(CFLAGS)
CC_NAME = cl -nologo
C_COMPILER_NAME = $(CC_NAME)
CXX_COMPILER_NAME = $(CC_NAME)
C_PREPROCESSOR_NAME = $(CC_NAME)
!ifndef IA64_ASSEMBLER_NAME
IA64_ASSEMBLER_NAME = ias
!endif
GLOBAL_C_FLAGS = -Iia64\ -I. $(INCPATH1) $(CDEFINES) $(CFLAGS)
NP_COMPILER_FLAGS = $(GLOBAL_C_FLAGS) $(COMPILER_WARNINGS)
C_COMPILER_FLAGS = $(NP_COMPILER_FLAGS) $(PRECOMPILED)
CXX_COMPILER_FLAGS = $(NP_COMPILER_FLAGS) $(PRECOMPILED_CXX) $(MSC_CPPFLAGS) $(NTCPPFLAGS)
C_PREPROCESSOR_FLAGS = $(GLOBAL_C_FLAGS) -EP -Tc
C_PREPROCESSOR = $(C_PREPROCESSOR_NAME) $(C_PREPROCESSOR_FLAGS)
C_ASM_PREPROCESSOR = $(C_PREPROCESSOR_NAME) $(ASM_DEFINES) $(C_PREPROCESSOR_FLAGS:-EP=-E)
C_COMPILER = $(C_COMPILER_NAME) $(C_COMPILER_FLAGS)
NP_C_COMPILER = $(C_COMPILER_NAME) $(NP_COMPILER_FLAGS)
CXX_COMPILER = $(CXX_COMPILER_NAME) $(CXX_COMPILER_FLAGS)
IA64_ASSEMBLER=$(IA64_ASSEMBLER_NAME) $(_IA64_HAZARD_DETECTION) $(_IA64_MERCED_MSR) -Nso -Iia64\ -I. $(INCPATH1) $(IA64_ADBGFLAGS)
ECHO_MSG=$(C_COMPILER) $<
ECHO_MSG_P=$(NP_C_COMPILER) $**
ECHO_CXX_MSG=$(CXX_COMPILER) $<
ECHO_PRECOMPILED_MSG1=$(C_COMPILER_NAME) $(PRECOMPILED_FLAG) $(PRECOMPILED_SOURCEFILE) \
$(C_COMPILER_FLAGS) /Yl$(TARGETNAME) /Yc$(?F) $(HEADERFILE) $(HEADEROBJ)
ECHO_PRECOMPILED_MSG2=$(C_COMPILER_NAME) $(PRECOMPILED_FLAG) \
$(C_COMPILER_FLAGS) /Yl$(TARGETNAME) /Yc$(?F) $(HEADERFILE) $(HEADEROBJ)
{}.c{}.s:
$(C_COMPILER_NAME) @<< /Fa $(MAKEDIR)\$(<F)
$(C_COMPILER_FLAGS: =
)
$(C_COMPILER_FLAGS:##= )
<<NOKEEP
{..\ia64\}.s{}.lst:
$(IA64_ASSEMBLER) -o $(_OBJ_DIR)\ia64\$(@B).obj $<
{ia64\}.s{}.lst:
$(IA64_ASSEMBLER) -o $(MAKEDIR)\$(_OBJ_DIR)\ia64\$(@B).obj $<
{..\ia64\}.s{$(_OBJ_DIR)\ia64\}.obj:
@-erase $@ >nul 2>&1
$(C_ASM_PREPROCESSOR) $(MAKEDIR)\..\ia64\$(<F) >$(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<B).i
$(IA64_ASSEMBLER) -o $(MAKEDIR)\$@ $(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<B).i
@-erase $(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<B).i >nul 2>&1
{$(_OBJ_DIR)\ia64\}.s{$(_OBJ_DIR)\ia64\}.obj:
@-erase $@ >nul 2>&1
$(C_ASM_PREPROCESSOR) $(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<F) >$(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<B).i
$(IA64_ASSEMBLER) -o $@ $(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<B).i
@-erase $(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<B).i >nul 2>&1
{ia64\}.s{$(_OBJ_DIR)\ia64\}.obj:
@-erase $@ >nul 2>&1
$(C_ASM_PREPROCESSOR) $(MAKEDIR)\ia64\$(<F) >$(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<B).i
$(IA64_ASSEMBLER) -o $@ $(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<B).i
@-erase $(MAKEDIR)\$(_OBJ_DIR)\ia64\$(<B).i >nul 2>&1
!if defined(_NTIA64LIBS)
_NTLIBS=$(_NTIA64LIBS)
!elseif DEFINED(_NT386LIBS)
_NTLIBS=$(_NT386LIBS)
!endif
!if defined(IA64COPYDST)
COPYDST=$(IA64COPYDST)
!elseif defined(386COPYDST)
COPYDST=$(386COPYDST)
!endif
LIB_COPY=ntia64cp.cmd
NTTEST_LINK_OPTIONS=-section:ivt,,align=0x8000 -fixed:no -base:0xE000000083000000 -entry:KiSystemBegin