mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
196 lines
5.4 KiB
196 lines
5.4 KiB
# Set up DEVTOOLSBIN, DEVTOOLSLIB, DEVTOOLSINC, and DEVTOOLSSDKLIB to point
|
|
# to the compiler tools to be used. Also set PA as a short alias for
|
|
# PROCESSOR_ARCHITECTURE, and CPUDIR to the proper subdirectory name for
|
|
# built files for the target architecture.
|
|
#
|
|
# If doing a 64-bit CRT build on a 32-bit system, use the native 32-bit
|
|
# compiler, not a 64-bit-targetting cross-compiler
|
|
#
|
|
# Find the proper tools somewhere under $(DEVTOOLS), unless overridden by
|
|
# explicit definitions
|
|
|
|
PA = $(PROCESSOR_ARCHITECTURE) # Use a shorter name
|
|
|
|
!if "$(PA)"=="IA64" || ("$(PA)"=="x86" && "$(LLP64)"=="1")
|
|
TARGET_CPU = IA64
|
|
CPUDIR = ia64
|
|
!elseif "$(PA)"=="x86"
|
|
TARGET_CPU = i386
|
|
CPUDIR = intel
|
|
!elseif "$(PA)"=="ALPHA"
|
|
!if "$(LLP64)"=="1"
|
|
TARGET_CPU = ALPHA64
|
|
CPUDIR = alpha64
|
|
!else
|
|
TARGET_CPU = ALPHA
|
|
CPUDIR = alpha
|
|
!endif
|
|
!elseif "$(PA)"=="MIPS"
|
|
TARGET_CPU = MIPS
|
|
CPUDIR = mips
|
|
!elseif "$(PA)"=="PPC"
|
|
TARGET_CPU = PPC
|
|
CPUDIR = ppc
|
|
!else
|
|
!error makefile: unknown host CPU
|
|
!endif
|
|
|
|
!message TARGET: $(TARGET_CPU)
|
|
|
|
!if "$(LLP64)" == ""
|
|
LLP64 = 0
|
|
!elseif "$(LLP64)" != "0" && "$(LLP64)" != "1"
|
|
! error LLP64 = $(LLP64), should be 0 or 1
|
|
!endif
|
|
|
|
!message LLP64: $(LLP64)
|
|
|
|
!if "$(BLD_SYSCRT)" == ""
|
|
! if "$(LLP64)" == "0"
|
|
BLD_SYSCRT = 0
|
|
! else
|
|
BLD_SYSCRT = 1
|
|
! endif
|
|
!elseif "$(BLD_SYSCRT)" != "0" && "$(BLD_SYSCRT)" != "1"
|
|
! error BLD_SYSCRT = $(BLD_SYSCRT), should be 0 or 1
|
|
!endif
|
|
|
|
!message BLD_SYSCRT: $(BLD_SYSCRT)
|
|
|
|
# By default, we set up pointers to the compiler tool directories by searching
|
|
# for the following subdirectories of DEVTOOLS, in this order:
|
|
#
|
|
# DEVTOOLSBIN: $(DEVTOOLS)\$(PA)\vc7\bin
|
|
# else $(DEVTOOLS)\$(PA)\vclkg\bin
|
|
#
|
|
# DEVTOOLSLIB: $(DEVTOOLS)\$(PA)\vc7\lib
|
|
# else $(DEVTOOLS)\$(PA)\vclkg\lib
|
|
#
|
|
# DEVTOOLSINC: $(DEVTOOLS)\common\vc7\inc
|
|
# else $(DEVTOOLS)\common\vc7\include
|
|
# else $(DEVTOOLS)\common\vclkg\inc
|
|
# else $(DEVTOOLS)\common\vclkg\include
|
|
#
|
|
# DEVTOOLSSDKLIB: $(DEVTOOLS)\$(PA)\win32sdk\lib
|
|
#
|
|
# You can avoid all automatic choice by explicitly setting DEVTOOLSBIN,
|
|
# DEVTOOLSLIB, DEVTOOLSINC, and DEVTOOLSSDKLIB.
|
|
|
|
# check that DEVTOOLS is set if it is needed
|
|
!if !defined(DEVTOOLSBIN) || !defined(DEVTOOLSLIB) \
|
|
|| !defined(DEVTOOLSINC) \
|
|
|| !defined(DEVTOOLSSDKLIB)
|
|
! if !defined(DEVTOOLS)
|
|
! message
|
|
! message *** ERROR: %DEVTOOLS% must be defined, or else define explicit
|
|
! message *** path variables as follows:
|
|
! message
|
|
! message DEVTOOLSBIN: path to native CL.EXE
|
|
! message DEVTOOLSINC: path to VC++ headers
|
|
! message DEVTOOLSLIB: path to native VC++ libs
|
|
! message DEVTOOLSSDKLIB: path to native Win32 SDK libs
|
|
! message
|
|
! error Set environment variables and rebuild.
|
|
! endif
|
|
! if !exist("$(DEVTOOLS)")
|
|
! message
|
|
! message *** ERROR: %DEVTOOLS% is set to "$(DEVTOOLS)", but that directory
|
|
! message *** does not exist.
|
|
! message
|
|
! error Correct DEVTOOLS and rebuild.
|
|
! endif
|
|
! if defined(VCFLAVOR)
|
|
! if !exist("$(DEVTOOLS)\$(PA)\$(VCFLAVOR)")
|
|
! message
|
|
! message *** ERROR: %VCFLAVOR% is set to "$(VCFLAVOR)", but the directory
|
|
! message *** $(DEVTOOLS)\$(PA)\$(VCFLAVOR) does not exist.
|
|
! message *** VCFLAVOR should generally be set to "vc7" or "vclkg".
|
|
! message
|
|
! error Correct VCFLAVOR and rebuild.
|
|
! endif
|
|
! elseif exist("$(DEVTOOLS)\$(PA)\vc7")
|
|
VCFLAVOR = vc7
|
|
! elseif exist("$(DEVTOOLS)\$(PA)\vclkg")
|
|
VCFLAVOR = vclkg
|
|
! else
|
|
! error Unable to find $(DEVTOOLS)\$(PA)\vc7 or vclkg
|
|
! endif
|
|
!endif
|
|
|
|
!message Paths to native-hosted toolset used to build SRCREL tools:
|
|
!if defined(DEVTOOLS)
|
|
! message DEVTOOLS: $(DEVTOOLS)
|
|
!endif
|
|
!if defined(VCFLAVOR)
|
|
! message VCFLAVOR: $(VCFLAVOR)
|
|
!endif
|
|
|
|
# set DEVTOOLSCPUVC if needed
|
|
!if !defined(DEVTOOLSBIN) || !defined(DEVTOOLSLIB)
|
|
DEVTOOLSCPUVC = $(DEVTOOLS)\$(PA)\$(VCFLAVOR)
|
|
! if !exist("$(DEVTOOLSCPUVC)")
|
|
! error Unable to find $(DEVTOOLSCPUVC)
|
|
! endif
|
|
!endif
|
|
|
|
# set DEVTOOLSCOMMONVC if needed
|
|
!if !defined(DEVTOOLSINC)
|
|
DEVTOOLSCOMMONVC = $(DEVTOOLS)\common\$(VCFLAVOR)
|
|
! if !exist("$(DEVTOOLSCOMMONVC)")
|
|
! error Unable to find $(DEVTOOLSCOMMONVC)
|
|
! endif
|
|
!endif
|
|
|
|
# set DEVTOOLSCPUSDK if needed
|
|
!if !defined(DEVTOOLSSDKLIB)
|
|
DEVTOOLSCPUSDK = $(DEVTOOLS)\$(PA)\win32sdk
|
|
! if !exist("$(DEVTOOLSCPUSDK)")
|
|
! error Unable to find $(DEVTOOLSCPUSDK)
|
|
! endif
|
|
!endif
|
|
|
|
# set DEVTOOLSBIN if not already defined
|
|
!if !defined(DEVTOOLSBIN)
|
|
DEVTOOLSBIN = $(DEVTOOLSCPUVC)\bin
|
|
!endif
|
|
|
|
# set DEVTOOLSLIB if not already defined
|
|
!if !defined(DEVTOOLSLIB)
|
|
DEVTOOLSLIB = $(DEVTOOLSCPUVC)\lib
|
|
!endif
|
|
|
|
# set DEVTOOLSINC if not already defined
|
|
!if !defined(DEVTOOLSINC)
|
|
! if exist("$(DEVTOOLSCOMMONVC)\inc")
|
|
DEVTOOLSINC = $(DEVTOOLSCOMMONVC)\inc
|
|
! elseif exist("$(DEVTOOLSCOMMONVC)\include")
|
|
DEVTOOLSINC = $(DEVTOOLSCOMMONVC)\include
|
|
! else
|
|
# For better error-reporting below
|
|
DEVTOOLSINC = $(DEVTOOLSCOMMONVC)\inc
|
|
! endif
|
|
!endif
|
|
|
|
# set DEVTOOLSSDKLIB if not already defined
|
|
!if !defined(DEVTOOLSSDKLIB)
|
|
DEVTOOLSSDKLIB = $(DEVTOOLSCPUSDK)\lib
|
|
!endif
|
|
|
|
!message DEVTOOLSBIN: $(DEVTOOLSBIN)
|
|
!if !exist("$(DEVTOOLSBIN)")
|
|
! error Unable to find $(DEVTOOLSBIN)
|
|
!endif
|
|
!message DEVTOOLSINC: $(DEVTOOLSINC)
|
|
!if !exist("$(DEVTOOLSINC)")
|
|
! error Unable to find $(DEVTOOLSINC)
|
|
!endif
|
|
!message DEVTOOLSLIB: $(DEVTOOLSLIB)
|
|
!if !exist("$(DEVTOOLSLIB)")
|
|
! error Unable to find $(DEVTOOLSLIB)
|
|
!endif
|
|
!message DEVTOOLSSDKLIB: $(DEVTOOLSSDKLIB)
|
|
!if !exist("$(DEVTOOLSSDKLIB)")
|
|
! error Unable to find $(DEVTOOLSSDKLIB)
|
|
!endif
|
|
|
|
!message
|