Fixed warnings when using the NAME property and ending up with output where only...
[kbuild-mirror.git] / kBuild / sdks / WINDDK.kmk
blob2a49f1f4dc0e650201e8a25fdbd591f84ec4a5fa
1 # $Id$
2 ## @file
3 # kBuild SDK - The Microsoft Windows Vista and Server 2008 DDKs.
4 # Defaults to $(KBUILD_TARGET_ARCH). Base SDK.
8 # Copyright (c) 2006-2008 knut st. osmundsen <bird-kBuild-spam@anduin.net>
10 # This file is part of kBuild.
12 # kBuild is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
17 # kBuild is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with kBuild; if not, write to the Free Software
24 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 # As a special exception you are granted permission to include this file, via
28 # the kmk include directive, as you wish without this in itself causing the
29 # resulting makefile, program or whatever to be covered by the GPL license.
30 # This exception does not however invalidate any other reasons why the makefile,
31 # program, whatever should not be covered the GPL.
35 SDK_WINDDK := The Microsoft Windows Vista and Server 2008 DDKs. \
36 Defaults to $(KBUILD_TARGET_ARCH). Base SDK.
38 # SDK Specific Properties
39 ifndef PATH_SDK_WINDDK
40 PATH_SDK_WINDDK := $(wildcard $(PATH_DEVTOOLS_TRG)/ddk/6*)
41 ifeq ($(PATH_SDK_WINDDK),)
42 PATH_SDK_WINDDK := $(wildcard $(PATH_DEVTOOLS)/win.x86/ddk/6*)
43 endif
44 ifeq ($(PATH_SDK_WINDDK),)
45 PATH_SDK_WINDDK := $(wildcard $(PATH_DEVTOOLS)/win.amd64/ddk/6*)
46 endif
47 ifeq ($(PATH_SDK_WINDDK),)
48 ifeq ($(KBUILD_HOST),win)
49 PATH_SDK_WINDDK := $(wildcard C:/WinDDK/6*)
50 endif
51 endif
52 ifneq ($(PATH_SDK_WINDDK),)
53 PATH_SDK_WINDDK := $(lastword $(sort $(PATH_SDK_WINDDK)))
54 else
55 $(warning kBuild: PATH_SDK_WINDDK couldn't be determined!)
56 PATH_SDK_WINDDK := $(PATH_DEVTOOLS)/win.x86/ddk/not/found
57 endif
58 else
59 # Resolve any fancy stuff once and for all.
60 PATH_SDK_WINDDK := $(PATH_SDK_WINDDK)
61 endif
63 PATH_SDK_WINDDK_INC ?= $(PATH_SDK_WINDDK)/inc
64 PATH_SDK_WINDDK_INC_API ?= $(PATH_SDK_WINDDK_INC)/api
65 PATH_SDK_WINDDK_INC_CRT ?= $(PATH_SDK_WINDDK_INC)/crt
66 PATH_SDK_WINDDK_INC_DDK ?= $(PATH_SDK_WINDDK_INC)/ddk
68 PATH_SDK_WINDDK_LIB_ROOT ?= $(PATH_SDK_WINDDK)/lib
69 PATH_SDK_WINDDK_LIB_WLH_ROOT ?= $(PATH_SDK_WINDDK_LIB_ROOT)/wlh
70 PATH_SDK_WINDDK_LIB_WNET_ROOT ?= $(PATH_SDK_WINDDK_LIB_ROOT)/wnet
71 PATH_SDK_WINDDK_LIB_WXP_ROOT ?= $(PATH_SDK_WINDDK_LIB_ROOT)/wxp
72 PATH_SDK_WINDDK_LIB_W2K_ROOT ?= $(PATH_SDK_WINDDK_LIB_ROOT)/w2k
73 PATH_SDK_WINDDK_LIB_WDF_ROOT ?= $(PATH_SDK_WINDDK_LIB_ROOT)/w2k
75 PATH_SDK_WINDDK_LIB_WLH.amd64 ?= $(PATH_SDK_WINDDK_LIB_WLH_ROOT)/amd64
76 PATH_SDK_WINDDK_LIB_WLH.ia64 ?= $(PATH_SDK_WINDDK_LIB_WLH_ROOT)/ia64
77 PATH_SDK_WINDDK_LIB_WLH.x86 ?= $(PATH_SDK_WINDDK_LIB_WLH_ROOT)/i386
78 PATH_SDK_WINDDK_LIB_WLH ?= $(PATH_SDK_WINDDK_LIB_WLH.$(KBUILD_TARGET_ARCH))
80 PATH_SDK_WINDDK_LIB_WNET.amd64?= $(PATH_SDK_WINDDK_LIB_WNET_ROOT)/amd64
81 PATH_SDK_WINDDK_LIB_WNET.ia64 ?= $(PATH_SDK_WINDDK_LIB_WNET_ROOT)/ia64
82 PATH_SDK_WINDDK_LIB_WNET.x86 ?= $(PATH_SDK_WINDDK_LIB_WNET_ROOT)/i386
83 PATH_SDK_WINDDK_LIB_WNET ?= $(PATH_SDK_WINDDK_LIB_WNET.$(KBUILD_TARGET_ARCH))
85 PATH_SDK_WINDDK_LIB_WXP.x86 ?= $(PATH_SDK_WINDDK_LIB_WXP_ROOT)/i386
86 PATH_SDK_WINDDK_LIB_WXP ?= $(PATH_SDK_WINDDK_LIB_WXP.$(KBUILD_TARGET_ARCH))
88 PATH_SDK_WINDDK_LIB_W2K.x86 ?= $(PATH_SDK_WINDDK_LIB_W2K_ROOT)/i386
89 PATH_SDK_WINDDK_LIB_W2K ?= $(PATH_SDK_WINDDK_LIB_W2K.$(KBUILD_TARGET_ARCH))
91 PATH_SDK_WINDDK_LIB.amd64 ?= $(PATH_SDK_WINDDK_LIB_WLH.amd64)
92 PATH_SDK_WINDDK_LIB.ia64 ?= $(PATH_SDK_WINDDK_LIB_WLH.ia64)
93 PATH_SDK_WINDDK_LIB.x86 ?= $(PATH_SDK_WINDDK_LIB_WLH.x86)
94 PATH_SDK_WINDDK_LIB ?= $(PATH_SDK_WINDDK_LIB.$(KBUILD_TARGET_ARCH))
96 # General Properties used by kBuild
97 SDK_WINDDK_DEFS.amd64 ?= _AMD64_ AMD64 _WIN64
98 SDK_WINDDK_DEFS.ia64 ?= _IA64_=1 IA64=1 _WIN64 _MSC_EXTENSIONS
99 SDK_WINDDK_DEFS.x86 ?= _X86_=1 i386=1 STD_CALL
100 SDK_WINDDK_INCS ?= \
101 $(PATH_SDK_WINDDK_INC_API) \
102 $(PATH_SDK_WINDDK_INC_DDK)
103 # The compiler tool(s) will have to select the appropriate crt includes.
104 SDK_WINDDK_LIBPATH.amd64 ?= $(PATH_SDK_WINDDK_LIB_WLH.amd64)
105 SDK_WINDDK_LIBPATH.ia64 ?= $(PATH_SDK_WINDDK_LIB_WLH.ia64)
106 SDK_WINDDK_LIBPATH.x86 ?= $(PATH_SDK_WINDDK_LIB_WLH.x86)
109 # CDFS defines for the various build environments. Just to give an idea what
110 # you should put in your templates and target DEFS.
113 # Vista / Server Longhorn x64 Free: NT_INST=0 WIN32=100 _WIN32_WINNT=0x0600 WINVER=0x0600 _WIN32_IE=0x0700 NTDDI_VERSION=0x06000000 KMDF_MAJOR_VERSION=01 KMDF_MINOR_VERSION=005 WIN32_LEAN_AND_MEAN=1 CONDITION_HANDLING=1 DEVL=1 NDEBUG __BUILDMACHINE__=WinDDK _DLL
114 # Vista / Server Longhorn ia64 Free: NT_INST=0 WIN32=100 _WIN32_WINNT=0x0600 WINVER=0x0600 _WIN32_IE=0x0700 NTDDI_VERSION=0x06000000 KMDF_MAJOR_VERSION=01 KMDF_MINOR_VERSION=005 WIN32_LEAN_AND_MEAN=1 CONDITION_HANDLING=1 DEVL=1 NDEBUG __BUILDMACHINE__=WinDDK _DLL NO_HW_DETECT _MSC_EXTENSIONS _MERCED_A0_=1 FPO=0
115 # Vista / Server Longhorn x86 Free: NT_INST=0 WIN32=100 _WIN32_WINNT=0x0600 WINVER=0x0600 _WIN32_IE=0x0700 NTDDI_VERSION=0x06000000 KMDF_MAJOR_VERSION=01 KMDF_MINOR_VERSION=005 WIN32_LEAN_AND_MEAN=1 CONDITION_HANDLING=1 DEVL=1 NDEBUG __BUILDMACHINE__=WinDDK _DLL STD_CALL FPO=0
116 # Windows Server 2003 amd64 Free: NT_INST=0 WIN32=100 _WIN32_WINNT=0x0502 WINVER=0x0502 _WIN32_IE=0x0603 NTDDI_VERSION=0x05020100 KMDF_MAJOR_VERSION=01 KMDF_MINOR_VERSION=005 WIN32_LEAN_AND_MEAN=1 CONDITION_HANDLING=1 DEVL=1 NDEBUG __BUILDMACHINE__=WinDDK _DLL
117 # Windows Server 2003 ia64 Free: NT_INST=0 WIN32=100 _WIN32_WINNT=0x0502 WINVER=0x0502 _WIN32_IE=0x0603 NTDDI_VERSION=0x05020100 KMDF_MAJOR_VERSION=01 KMDF_MINOR_VERSION=005 WIN32_LEAN_AND_MEAN=1 CONDITION_HANDLING=1 DEVL=1 NDEBUG __BUILDMACHINE__=WinDDK _DLL NO_HW_DETECT _MSC_EXTENSIONS _MERCED_A0_=1 FPO=0
118 # Windows Server 2003 x86 Free: NT_INST=0 WIN32=100 _WIN32_WINNT=0x0502 WINVER=0x0502 _WIN32_IE=0x0603 NTDDI_VERSION=0x05020100 KMDF_MAJOR_VERSION=01 KMDF_MINOR_VERSION=005 WIN32_LEAN_AND_MEAN=1 CONDITION_HANDLING=1 DEVL=1 NDEBUG __BUILDMACHINE__=WinDDK _DLL STD_CALL FPO=0
119 # Windows XP Free: NT_INST=0 WIN32=100 _WIN32_WINNT=0x0501 WINVER=0x0501 _WIN32_IE=0x0603 NTDDI_VERSION=0x05010200 KMDF_MAJOR_VERSION=01 KMDF_MINOR_VERSION=005 WIN32_LEAN_AND_MEAN=1 CONDITION_HANDLING=1 DEVL=1 NDEBUG __BUILDMACHINE__=WinDDK _DLL STD_CALL FPO=0
120 # Windows 2000 Free: NT_INST=0 WIN32=100 _WIN32_WINNT=0x0500 WINVER=0x0500 _WIN32_IE=0x0501 NTDDI_VERSION=0x05000400 KMDF_MAJOR_VERSION=01 KMDF_MINOR_VERSION=005 WIN32_LEAN_AND_MEAN=1 CONDITION_HANDLING=1 DEVL=1 NDEBUG __BUILDMACHINE__=WinDDK _DLL STD_CALL FPO=0
121 # Windows 2000 Checked: NT_INST=0 WIN32=100 _WIN32_WINNT=0x0500 WINVER=0x0500 _WIN32_IE=0x0501 NTDDI_VERSION=0x05000400 KMDF_MAJOR_VERSION=01 KMDF_MINOR_VERSION=005 WIN32_LEAN_AND_MEAN=1 CONDITION_HANDLING=1 DEVL=1 NDEBUG __BUILDMACHINE__=WinDDK _DLL STD_CALL FPO=0 MSC_NOOPT
123 # Some notes about the defines:
124 # NTDDI_VERSION indicates the target NT version, looks kind of important to get right.
125 # _WIN32_WINNT, WINVER and _WIN32_IE are used by a bunch of headers for selecting features.
126 # WIN32_LEAN_AND_MEAN is used by api\WINDOWS.H to drop a bunch of includes.
127 # WIN32 is just used for some ifdef'ing by a handful headers.
128 # __BUILDMACHINE__ is used by api\common.ver (for resources it seems).
129 # STD_CALL is used by ddk\stdcall.inc (masm).
130 # DEVL governs the IF_NTOS_DEBUG() macro in ddk\wdm.h.
131 # NDEBUG is used by crt\assert.h dictated by the standards.
132 # CONDITION_HANDLING, FPO, KMDF_MAJOR_VERSION, KMDF_MINOR_VERSION, MSC_NOOPT and NT_INST are not referenced in any headers.