VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/Makefile.kmk@ 102145

Last change on this file since 102145 was 102145, checked in by vboxsync, 13 months ago

WDDM: user mode driver update: bugref:10529

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.0 KB
Line 
1# $Id: Makefile.kmk 102145 2023-11-17 21:47:01Z vboxsync $
2## @file
3# Makefile for the Windows guest display driver.
4#
5
6#
7# Copyright (C) 2011-2023 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31ifdef VBOX_WITH_MESA3D
32 ifndef VBOX_MESA3D_CONFIG_KMK_INCLUDED
33 include $(PATH_ROOT)/src/VBox/Additions/3D/Config.kmk
34 endif
35endif
36
37#
38# VBoxDisp - Windows Guest Additions XPDM Display Driver
39#
40# Note. This has to run on NT4! (*_NT4 => *_W2K3 when targeting 64-bit.)
41#
42SYSMODS += VBoxDisp
43VBoxDisp_TEMPLATE = VBoxGuestR0Drv
44VBoxDisp_SYSSUFF = .dll
45VBoxDisp_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_NT4)
46VBoxDisp_DEFS.x86 = _WIN32_WINNT=0x0501
47VBoxDisp_DEFS = VBOX_WITH_DDRAW
48VBoxDisp_DEFS += LOG_TO_BACKDOOR #LOG_ENABLED
49ifdef VBOX_WITH_VIDEOHWACCEL
50 VBoxDisp_DEFS += VBOX_WITH_VIDEOHWACCEL
51endif
52#VBoxDisp_DEFS += VBOX_VBVA_ADJUST_RECT
53VBoxDisp_INCS = \
54 ../../../include \
55 .. \
56 $(VBOX_GRAPHICS_INCS)
57VBoxDisp_LDFLAGS.x86 = /Entry:DrvEnableDriver@12
58VBoxDisp_LDFLAGS.amd64 = /Entry:DrvEnableDriver
59VBoxDisp_SOURCES = \
60 xpdm/VBoxDispDriver.cpp \
61 xpdm/VBoxDispMini.cpp \
62 xpdm/VBoxDispMouse.cpp \
63 xpdm/VBoxDispPalette.cpp \
64 xpdm/VBoxDispVBVA.cpp \
65 xpdm/VBoxDispDrawCmd.cpp \
66 xpdm/VBoxDispVRDP.cpp \
67 xpdm/VBoxDispVrdpBmp.cpp \
68 xpdm/VBoxDispVrdpTxt.cpp \
69 xpdm/VBoxDispDriverDDraw.cpp \
70 xpdm/VBoxDispDDraw.cpp \
71 xpdm/VBoxDisp.def \
72 xpdm/VBoxDisp.rc \
73 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp \
74 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp \
75 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIHostCmd.cpp \
76 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp \
77 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
78ifdef VBOX_WITH_VIDEOHWACCEL
79 VBoxDisp_SOURCES += \
80 xpdm/VBoxDispVHWA.cpp \
81 xpdm/VBoxDispDDrawVHWA.cpp
82endif
83
84
85VBoxDisp_LIBS = \
86 $(VBOX_LIB_IPRT_GUEST_R0_NT4) \
87 $(VBOX_PATH_ADDITIONS_LIB)/HGSMIGuestR0Lib$(VBOX_SUFF_LIB) \
88 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/win32k.lib # Linker needs newer win32k.lib (for x86 at least); incompatible loadcfg.obj in the WDK 7.1 one.
89ifneq ($(VBOX_VCC_CC_GUARD_CF),)
90 VBoxDisp_LIBS += \
91 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/BufferOverflowGDI.lib # for ___security_cookie
92endif
93VBoxDisp_USES.win += vboximportchecker
94VBoxDisp_VBOX_IMPORT_CHECKER.win.x86 = nt4/r0
95VBoxDisp_VBOX_IMPORT_CHECKER.win.amd64 = xp64/r0
96
97# Signing requires both miniport and display drivers so it'll be dealt with in the parent makefile.
98if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS)
99 VBoxDisp_INSTTYPE := none
100 VBoxDisp_DEBUG_INSTTYPE := both
101 ifdef VBOX_WITH_WDDM
102 VBoxDispD3D_INSTTYPE := none
103 VBoxDispD3D_DEBUG_INSTTYPE := both
104 ifdef VBOX_WITH_WDDM_DX
105 VBoxDX_INSTTYPE := none
106 VBoxDX_DEBUG_INSTTYPE := both
107 endif
108 endif
109endif
110
111ifdef VBOX_WITH_WDDM
112 #
113 # VBoxDispD3D - Windows Guest Additions WDDM R3 Display Driver
114 #
115 DLLS += VBoxDispD3D
116 VBoxDispD3D_TEMPLATE = VBoxGuestR3DllMinVista
117 VBoxDispD3D_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
118 VBoxDispD3D_DEFS = UNICODE _UNICODE VBOX_WITH_WDDM VBOXWDDMDISP LOG_TO_BACKDOOR LOG_TO_BACKDOOR_DRV VBOX_WITH_HGCM
119 ifdef DEBUG_misha
120 VBoxDispD3D_DEFS += LOG_ENABLED
121 endif
122 ifdef VBOXWDDM_WITH_VBVA
123 VBoxDispD3D_DEFS += VBOXWDDM_WITH_VBVA
124 endif
125 ifdef VBOX_WITH_VIDEOHWACCEL
126 VBoxDispD3D_DEFS += VBOX_WITH_VIDEOHWACCEL
127 endif
128 # Avoid "src\VBox\Additions\3D\mesa\mesa-21.3.8\include\c99_compat.h(99): warning C4668: '__STDC_VERSION__'
129 # is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'"
130 VBoxDispD3D_DEFS += __STDC_VERSION__=0
131 VBoxDispD3D_INCS = \
132 ../../../include \
133 .. \
134 $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/shared \
135 $(VBOX_GRAPHICS_INCS)
136 VBoxDispD3D_SOURCES = \
137 wddm/VBoxDispD3D.cpp \
138 wddm/VBoxDispD3DIf.cpp \
139 wddm/VBoxDispDbg.cpp \
140 wddm/VBoxD3DIf.cpp \
141 wddm/VBoxDispD3D.rc \
142 wddm/VBoxDispD3D.def
143 VBoxDispD3D_LIBS = \
144 $(VBOX_LIB_IPRT_GUEST_R3) \
145 $(VBOX_LIB_VBGL_R3) \
146 Psapi.lib \
147 $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
148 $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmKmt$(VBOX_SUFF_LIB)
149
150 ifdef VBOX_WITH_VMSVGA
151 VBoxDispD3D_DEFS += VBOX_WITH_VMSVGA
152 VBoxDispD3D_INCS += \
153 $(PATH_ROOT)/src/VBox/Additions/3D/win/include \
154 $(PATH_ROOT)/src/VBox/Devices/Graphics/vmsvga_include
155 endif
156
157 ifdef VBOX_WITH_MESA3D
158 VBoxDispD3D_DEFS += VBOX_WITH_MESA3D
159 VBoxDispD3D_INCS += \
160 $(VBOX_PATH_MESA)/src/gallium/include \
161 $(VBOX_PATH_MESA)/src \
162 $(VBOX_PATH_MESA)/include/c99 \
163 $(VBOX_PATH_MESA)/include
164 VBoxDispD3D_SOURCES += \
165 wddm/gallium/GaDxva.cpp \
166 wddm/gallium/GaDrvEnvWddm.cpp \
167 wddm/gallium/GaWddm.cpp \
168 wddm/gallium/GaDdi.cpp \
169 wddm/gallium/Present.cpp \
170 wddm/gallium/VBoxGallium.cpp \
171 wddm/gallium/VBoxGaD3DDevice9Ex.cpp \
172 wddm/gallium/VBoxD3DAdapter9.c
173
174 ifdef VBOX_WITH_VMSVGA3D_DX
175 VBoxDispD3D_DEFS += VBOX_WITH_VMSVGA3D_DX9
176 endif
177
178 ifdef VBOX_WITH_MESA3D_D3DTEST
179 VBoxDispD3D_DEFS += VBOX_WITH_MESA3D_D3DTEST
180 VBoxDispD3D_SOURCES += \
181 wddm/gallium/test/d3dhlp.cpp \
182 wddm/gallium/test/d3d9render.cpp \
183 wddm/gallium/GaDrvTest.cpp
184 endif
185 endif
186
187 #
188 # 64-bit systems needs a 32-bit version of VBoxDispD3D.
189 #
190 DLLS.amd64 += VBoxDispD3D-x86
191 VBoxDispD3D-x86_EXTENDS = VBoxDispD3D
192 VBoxDispD3D-x86_BLD_TRG_ARCH = x86
193 VBoxDispD3D-x86_LIBS = \
194 $(VBOX_LIB_IPRT_GUEST_R3_X86) \
195 $(VBOX_LIB_VBGL_R3_X86) \
196 Psapi.lib \
197 $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
198 $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmKmt-x86$(VBOX_SUFF_LIB)
199 VBoxDispD3D-x86_DEFS = $(VBoxDispD3D_DEFS) VBOX_WDDM_WOW64
200
201 #
202 # VGPU10 driver VBoxDX
203 #
204 ifdef VBOX_WITH_VMSVGA3D_DX
205 DLLS += VBoxDX
206 VBoxDX_TEMPLATE = VBoxGuestR3DllMinVista
207 VBoxDX_DEFS = UNICODE _UNICODE VBOX_WITH_VMSVGA VBOX_WITH_VMSVGA3D_DX
208 VBoxDX_DEFS += D3D_UMD_INTERFACE_VERSION=D3D_UMD_INTERFACE_VERSION_WIN8
209 VBoxDX_DEFS += DXGKDDI_INTERFACE_VERSION=DXGKDDI_INTERFACE_VERSION_WIN8
210 VBoxDX_INCS = \
211 $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/shared \
212 $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/common/wddm \
213 $(PATH_ROOT)/src/VBox/Additions/3D/win/include \
214 $(PATH_ROOT)/src/VBox/Additions/3D/win/VBoxWddmUmHlp \
215 $(PATH_ROOT)/src/VBox/Devices/Graphics/vmsvga_include \
216 $(VBOX_GRAPHICS_INCS)
217 VBoxDX_SOURCES = \
218 wddm/dx/VBoxDXDDI.cpp \
219 wddm/dx/VBoxDXDDIVideo.cpp \
220 wddm/dx/VBoxDX.cpp \
221 wddm/dx/VBoxDXVideo.cpp \
222 wddm/dx/VBoxDXCmd.cpp \
223 wddm/dx/VBoxDX.rc \
224 wddm/dx/VBoxDX.def
225 VBoxDX_LIBS = \
226 $(VBOX_LIB_IPRT_GUEST_R3) \
227 Psapi.lib \
228 $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmHlp$(VBOX_SUFF_LIB)
229
230 # 64-bit systems need a 32-bit version of VBoxDX
231 DLLS.amd64 += VBoxDX-x86
232 VBoxDX-x86_EXTENDS = VBoxDX
233 VBoxDX-x86_BLD_TRG_ARCH = x86
234 VBoxDX-x86_LIBS = \
235 $(VBOX_LIB_IPRT_GUEST_R3_X86) \
236 $(VBOX_LIB_VBGL_R3_X86) \
237 Psapi.lib \
238 $(VBOX_PATH_ADDITIONS_LIB)/VBoxWddmUmHlp-x86$(VBOX_SUFF_LIB)
239 VBoxDX-x86_DEFS = $(VBoxDX_DEFS) VBOX_WDDM_WOW64
240 endif # VBOX_WITH_VMSVGA3D_DX
241
242 include $(PATH_SUB_CURRENT)/wddm/shared/Makefile.kmk
243
244endif #ifdef VBOX_WITH_WDDM
245
246
247ifdef VBOX_WITH_VBOXVIDEOWINDBG
248 #
249 # A windbg extension and a few test programs.
250 #
251
252 DLLS += vbvdbg
253 vbvdbg_TEMPLATE = VBoxR3StaticDll
254 vbvdbg_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
255 vbvdbg_DEFS = UNICODE _UNICODE
256 vbvdbg_SOURCES = \
257 wddm/dbg/VBoxVideoWinDbg.cpp \
258 wddm/dbg/VBoxVideoWinDbg.def
259
260 PROGRAMS += tstMvWnd
261 tstMvWnd_TEMPLATE = VBoxR3Static
262 tstMvWnd_DEFS = UNICODE _UNICODE
263 tstMvWnd_SOURCES = wddm/dbg/tstMvWnd.cpp
264 #tstMvWnd_LIBS = $(VBOX_LIB_IPRT_GUEST_R3) - Use guest template if this is wanted! duh!
265 #tstMvWnd_LDFLAGS = /SUBSYSTEM:windows
266
267 PROGRAMS += DumpD3DCaps9
268 DumpD3DCaps9_TEMPLATE = VBoxR3Exe
269 DumpD3DCaps9_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
270 DumpD3DCaps9_DEFS = UNICODE _UNICODE
271 DumpD3DCaps9_SOURCES = wddm/dbg/DumpD3DCaps9.cpp
272 DumpD3DCaps9_LIBS = d3d9.lib
273
274 PROGRAMS += D3DFeatureLevel
275 D3DFeatureLevel_TEMPLATE = VBoxR3Static
276 D3DFeatureLevel_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
277 D3DFeatureLevel_SOURCES = wddm/dbg/D3DFeatureLevel.cpp
278 D3DFeatureLevel_LIBS = d3d11.lib
279 #D3DFeatureLevel_LIBS = $(VBOX_LIB_IPRT_GUEST_R3) d3d11.lib - Use guest template if this is wanted! duh!
280 #D3DFeatureLevel_LDFLAGS.win = /SUBSYSTEM:CONSOLE
281
282endif # VBOX_WITH_VBOXVIDEOWINDBG
283
284include $(FILE_KBUILD_SUB_FOOTER)
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette