VirtualBox

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

Last change on this file since 106454 was 106454, checked in by vboxsync, 3 months ago

Additions/WINNT/Graphics: Don't build and sign the XPDM video driver if VBOX_WITH_XPDM is not set, bugref:10734

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