1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
|
# $Id: WINSDK10.kmk 3418 2020-08-21 11:02:13Z bird $
## @file
# kBuild SDK - The Microsoft Windows SDK v10.
#
#
# Copyright (c) 2006-2020 knut st. osmundsen <bird-kBuild-spam-xx@anduin.net>
#
# This file is part of kBuild.
#
# kBuild is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# kBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kBuild; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# As a special exception you are granted permission to include this file, via
# the kmk include directive, as you wish without this in itself causing the
# resulting makefile, program or whatever to be covered by the GPL license.
# This exception does not however invalidate any other reasons why the makefile,
# program, whatever should not be covered the GPL.
#
#
SDK_WINSDK10 := The Windows Platform SDK v7.1, targeting (KBUILD_TARGET).
ifndef INCLUDED_WIN_COMMON_KMK
include $(KBUILD_PATH)/win-common.kmk
endif
#
# SDK Specific Properties
#
## @def PATH_SDK_WINSDK10
## The base path of the Windows 10 SDK.
## @def SDK_WINSDK10_VERSION
## The SDK version for subdirectories.
ifndef PATH_SDK_WINSDK10
ifndef SDK_WINSDK10_VERSION
PATH_SDK_WINSDK10 := $(firstfile $(foreachfile toolsdir, \
$(KBUILD_DEVTOOLS_BLD) $(KBUILD_DEVTOOLS_TRG) $(KBUILD_DEVTOOLS)/win.x86 $(KBUILD_DEVTOOLS)/win.amd64 \
, $(rsortfiles $(qwildcard ,$(toolsdir)/sdk/v10*/[Ii][Nn][Cc][Ll][Uu][Dd][Ee]/10.0.*))))
ifeq ($(PATH_SDK_WINSDK10),)
PATH_SDK_WINSDK10 := $(firstfile $(foreachfile progfilesdir,$(WINCMN_PROGRAM_FILES_LIST)\
,$(rsortfiles $(qwildcard ,$(progfilesdir)/Windows\ Kits/10/[Ii][Nn][Cc][Ll][Uu][Dd][Ee]/10.0.*)) ))
ifeq ($(PATH_SDK_WINSDK10),)
$(warning kBuild: PATH_SDK_WINSDK10 couldn't be determined!)
PATH_SDK_WINSDK10 := $(KBUILD_DEVTOOLS_BLD)/sdk/v10-not-found/Include/10.0.10240.0
endif
endif
SDK_WINSDK10_VERSION := $(qnotdir ,$(PATH_SDK_WINSDK10))
else
PATH_SDK_WINSDK10 := $(firstfile $(foreachfile toolsdir, \
$(KBUILD_DEVTOOLS_BLD) $(KBUILD_DEVTOOLS_TRG) $(KBUILD_DEVTOOLS)/win.x86 $(KBUILD_DEVTOOLS)/win.amd64 \
, $(rsortfiles $(qwildcard ,$(toolsdir)/sdk/v10*/[Ii][Nn][Cc][Ll][Uu][Dd][Ee]/$(SDK_WINSDK10_VERSION)))))
ifeq ($(PATH_SDK_WINSDK10),)
PATH_SDK_WINSDK10 := $(firstfile $(foreachfile progfilesdir,$(WINCMN_PROGRAM_FILES_LIST)\
,$(rsortfiles $(qwildcard ,$(progfilesdir)/Windows\ Kits/10/[Ii][Nn][Cc][Ll][Uu][Dd][Ee]/$(SDK_WINSDK10_VERSION))) ))
ifeq ($(PATH_SDK_WINSDK10),)
$(warning kBuild: PATH_SDK_WINSDK10 couldn't be determined!)
PATH_SDK_WINSDK10 := $(KBUILD_DEVTOOLS_BLD)/sdk/v10-not-found/Include/$(SDK_WINSDK10_VERSION)
endif
endif
SDK_WINSDK10_VERSION := $(qnotdir ,$(PATH_SDK_WINSDK10))
endif
PATH_SDK_WINSDK10 := $(substr $(qdir ,$(PATH_SDK_WINSDK10)),1,-9)
else
PATH_SDK_WINSDK10 := $(PATH_SDK_WINSDK10)
ifndef SDK_WINSDK10_VERSION
SDK_WINSDK10_VERSION := $(qnotdir ,$(firstfile $(rsortfiles $(qwildcard ,$(PATH_SDK_WINSDK10)/[Ii][Nn][Cc][Ll][Uu][Dd][Ee]/10.0.*))))
ifeq ($(SDK_WINSDK10_VERSION),)
$(warning kBuild: SDK_WINSDK10_VERSION could not be determined for PATH_SDK_WINSDK10=$(PATH_SDK_WINSDK10))
SDK_WINSDK10_VERSION := 10.0.10240.0
endif
endif
endif
# Non-versioned base directory paths:
ifndef PATH_SDK_WINSDK10_BASE_INC
PATH_SDK_WINSDK10_BASE_INC := $(firstfile $(qwildcard ,$(PATH_SDK_WINSDK10)/[Ii][Nn][Cc][Ll][Uu][Dd][Ee]) $(PATH_SDK_WINSDK10)/Include)
endif
ifndef PATH_SDK_WINSDK10_BASE_LIB
PATH_SDK_WINSDK10_BASE_LIB := $(firstfile $(qwildcard ,$(PATH_SDK_WINSDK10)/[Ll][Ii][Bb]) $(PATH_SDK_WINSDK10)/lib)
endif
ifndef PATH_SDK_WINSDK10_BASE_BIN
PATH_SDK_WINSDK10_BASE_BIN := $(firstfile $(qwildcard ,$(PATH_SDK_WINSDK10)/[Bb][Ii][Nn]) $(PATH_SDK_WINSDK10)/bin)
endif
# Universal CRT (UCRT).
ifndef PATH_SDK_WINSDK10_UCRT_INC
PATH_SDK_WINSDK10_UCRT_INC := $(PATH_SDK_WINSDK10_BASE_INC)/$(SDK_WINSDK10_VERSION)/ucrt
endif
ifndef PATH_SDK_WINSDK10_UCRT_LIB.amd64
PATH_SDK_WINSDK10_UCRT_LIB.amd64 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/ucrt/x64
endif
ifndef PATH_SDK_WINSDK10_UCRT_LIB.arm32
PATH_SDK_WINSDK10_UCRT_LIB.arm32 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/ucrt/arm
endif
ifndef PATH_SDK_WINSDK10_UCRT_LIB.arm64
PATH_SDK_WINSDK10_UCRT_LIB.arm64 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/ucrt/arm64
endif
ifndef PATH_SDK_WINSDK10_UCRT_LIB.x86
PATH_SDK_WINSDK10_UCRT_LIB.x86 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/ucrt/x86
endif
PATH_SDK_WINSDK10_UCRT_LIB = $(PATH_SDK_WINSDK10_UCRT_LIB.$(KBUILD_TARGET_ARCH))
SDK_WINSDK10_UCRT_IMPLIB_NAME := ucrt.lib
SDK_WINSDK10_UCRT_IMPLIB_DBG_NAME := ucrtd.lib
SDK_WINSDK10_UCRT_STATIC_NAME := libucrt.lib
SDK_WINSDK10_UCRT_STATIC_DBG_NAME := libucrtd.lib
# Shared API headers
ifndef PATH_SDK_WINSDK10_SHARED_INC
PATH_SDK_WINSDK10_SHARED_INC := $(PATH_SDK_WINSDK10_BASE_INC)/$(SDK_WINSDK10_VERSION)/shared
endif
# User-mode API (MS WIN SDK)
ifndef PATH_SDK_WINSDK10_UM_INC
PATH_SDK_WINSDK10_UM_INC := $(PATH_SDK_WINSDK10_BASE_INC)/$(SDK_WINSDK10_VERSION)/um
endif
ifndef PATH_SDK_WINSDK10_UM_LIB.amd64
PATH_SDK_WINSDK10_UM_LIB.amd64 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/um/x64
endif
ifndef PATH_SDK_WINSDK10_UM_LIB.arm32
PATH_SDK_WINSDK10_UM_LIB.arm32 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/um/arm
endif
ifndef PATH_SDK_WINSDK10_UM_LIB.arm64
PATH_SDK_WINSDK10_UM_LIB.arm64 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/um/arm64
endif
ifndef PATH_SDK_WINSDK10_UM_LIB.x86
PATH_SDK_WINSDK10_UM_LIB.x86 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/um/x86
endif
PATH_SDK_WINSDK10_UM_LIB = $(PATH_SDK_WINSDK10_UM_LIB.$(KBUILD_TARGET_ARCH))
ifndef SDK_WINSDK10_UM_LIB_NAMES
SDK_WINSDK10_UM_LIB_NAMES := \
Kernel32.Lib \
User32.Lib \
Gdi32.Lib \
AdvAPI32.Lib \
shell32.lib \
ShLwApi.Lib \
SetupAPI.Lib \
Uuid.Lib \
Version.Lib \
WS2_32.Lib \
\
Ole32.Lib \
OleAut32.Lib \
OleDlg.Lib \
RpcRT4.Lib \
DbgHelp.Lib \
\
ImageHlp.Lib \
IPHlpApi.Lib \
ComCtl32.Lib \
ComDlg32.Lib \
WinSpool.Lib \
WinMM.Lib
endif
# Kernel-mode API headers (WDK).
ifndef PATH_SDK_WINSDK10_KM_INC
PATH_SDK_WINSDK10_KM_INC := $(PATH_SDK_WINSDK10_BASE_INC)/$(SDK_WINSDK10_VERSION)/km
endif
ifndef PATH_SDK_WINSDK10_KM_LIB.amd64
PATH_SDK_WINSDK10_KM_LIB.amd64 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/km/x64
endif
ifndef PATH_SDK_WINSDK10_KM_LIB.arm32
PATH_SDK_WINSDK10_KM_LIB.arm32 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/km/arm
endif
ifndef PATH_SDK_WINSDK10_KM_LIB.arm64
PATH_SDK_WINSDK10_KM_LIB.arm64 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/km/arm64
endif
ifndef PATH_SDK_WINSDK10_KM_LIB.x86
PATH_SDK_WINSDK10_KM_LIB.x86 := $(PATH_SDK_WINSDK10_BASE_LIB)/$(SDK_WINSDK10_VERSION)/km/x86
endif
PATH_SDK_WINSDK10_KM_LIB = $(PATH_SDK_WINSDK10_KM_LIB.$(KBUILD_TARGET_ARCH))
# Binary directory for host.
ifndef PATH_SDK_WINSDK10_BIN
ifeq ($(KBUILD_HOST_ARCH),amd64)
PATH_SDK_WINSDK10_BIN := $(PATH_SDK_WINSDK10_BASE_BIN)/$(SDK_WINSDK10_VERSION)/x64
else ifeq ($(KBUILD_HOST_ARCH),arm)
PATH_SDK_WINSDK10_BIN := $(PATH_SDK_WINSDK10_BASE_BIN)/$(SDK_WINSDK10_VERSION)/arm
else
PATH_SDK_WINSDK10_BIN := $(PATH_SDK_WINSDK10_BASE_BIN)/$(SDK_WINSDK10_VERSION)/$(KBUILD_HOST_ARCH)
endif
endif
#
# Properties used by kBuild.
#
SDK_WINSDK10_INCS ?= $(PATH_SDK_WINSDK10_INC)
SDK_WINSDK10_LIBPATH.amd64 ?= $(PATH_SDK_WINSDK10_UM_LIB.amd64)
SDK_WINSDK10_LIBPATH.arm32 ?= $(PATH_SDK_WINSDK10_UM_LIB.arm32)
SDK_WINSDK10_LIBPATH.arm64 ?= $(PATH_SDK_WINSDK10_UM_LIB.arm64)
SDK_WINSDK10_LIBPATH.x86 ?= $(PATH_SDK_WINSDK10_UM_LIB.x86)
ifndef SDK_WINSDK10_LIBS.amd64
SDK_WINSDK10_LIBS.amd64 := $(addprefix $(PATH_SDK_WINSDK10_UM_LIB.amd64)/,$(SDK_WINSDK10_UM_LIB_NAMES))
endif
ifndef SDK_WINSDK10_LIBS.arm32
SDK_WINSDK10_LIBS.arm32 := $(addprefix $(PATH_SDK_WINSDK10_UM_LIB.arm32)/,$(SDK_WINSDK10_UM_LIB_NAMES))
endif
ifndef SDK_WINSDK10_LIBS.arm64
SDK_WINSDK10_LIBS.arm64 := $(addprefix $(PATH_SDK_WINSDK10_UM_LIB.arm64)/,$(SDK_WINSDK10_UM_LIB_NAMES))
endif
ifndef SDK_WINSDK10_LIBS.x86
SDK_WINSDK10_LIBS.x86 := $(addprefix $(PATH_SDK_WINSDK10_UM_LIB.x86)/,$(SDK_WINSDK10_UM_LIB_NAMES))
endif
|