VirtualBox

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

Last change on this file since 95253 was 95253, checked in by vboxsync, 3 years ago

WDDM: Makefile tweak for undefined VBOX_WITH_MESA3D. bugref:9845

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