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 |
|
---|
18 | SUB_DEPTH = ../../../../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | ifdef VBOX_WITH_MESA3D
|
---|
22 | ifndef VBOX_MESA3D_CONFIG_KMK_INCLUDED
|
---|
23 | include $(PATH_ROOT)/src/VBox/Additions/3D/Config.kmk
|
---|
24 | endif
|
---|
25 | endif
|
---|
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 | #
|
---|
32 | SYSMODS += VBoxDisp
|
---|
33 | VBoxDisp_TEMPLATE = VBOXGUESTR0
|
---|
34 | VBoxDisp_SYSSUFF = .dll
|
---|
35 | VBoxDisp_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_NT4)
|
---|
36 | VBoxDisp_DEFS.x86 = _WIN32_WINNT=0x0501
|
---|
37 | VBoxDisp_DEFS = VBOX_WITH_DDRAW
|
---|
38 | VBoxDisp_DEFS += LOG_TO_BACKDOOR #LOG_ENABLED
|
---|
39 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
40 | VBoxDisp_DEFS += VBOX_WITH_VIDEOHWACCEL
|
---|
41 | endif
|
---|
42 | #VBoxDisp_DEFS += VBOX_VBVA_ADJUST_RECT
|
---|
43 | VBoxDisp_INCS = \
|
---|
44 | ../../../include \
|
---|
45 | .. \
|
---|
46 | $(VBOX_GRAPHICS_INCS)
|
---|
47 | VBoxDisp_LDFLAGS.x86 = /Entry:DrvEnableDriver@12
|
---|
48 | VBoxDisp_LDFLAGS.amd64 = /Entry:DrvEnableDriver
|
---|
49 | VBoxDisp_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
|
---|
68 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
69 | VBoxDisp_SOURCES += \
|
---|
70 | xpdm/VBoxDispVHWA.cpp \
|
---|
71 | xpdm/VBoxDispDDrawVHWA.cpp
|
---|
72 | endif
|
---|
73 |
|
---|
74 |
|
---|
75 | VBoxDisp_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.
|
---|
79 | ifneq ($(VBOX_VCC_CC_GUARD_CF),)
|
---|
80 | VBoxDisp_LIBS += \
|
---|
81 | $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/BufferOverflowGDI.lib # for ___security_cookie
|
---|
82 | endif
|
---|
83 | VBoxDisp_USES.win += vboximportchecker
|
---|
84 | VBoxDisp_VBOX_IMPORT_CHECKER.win.x86 = nt4/r0
|
---|
85 | VBoxDisp_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.
|
---|
89 | ifdef 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
|
---|
100 | endif
|
---|
101 |
|
---|
102 | ifdef VBOX_WITH_WDDM
|
---|
103 | #
|
---|
104 | # VBoxDispD3D - Windows Guest Additions WDDM R3 Display Driver
|
---|
105 | #
|
---|
106 | DLLS += VBoxDispD3D
|
---|
107 | VBoxDispD3D_TEMPLATE = VBoxGuestR3DllMinVista
|
---|
108 | VBoxDispD3D_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
109 | VBoxDispD3D_DEFS = UNICODE _UNICODE VBOX_WITH_WDDM VBOXWDDMDISP LOG_TO_BACKDOOR LOG_TO_BACKDOOR_DRV VBOX_WITH_HGCM
|
---|
110 | ifdef DEBUG_misha
|
---|
111 | VBoxDispD3D_DEFS += LOG_ENABLED
|
---|
112 | endif
|
---|
113 | ifdef VBOXWDDM_WITH_VBVA
|
---|
114 | VBoxDispD3D_DEFS += VBOXWDDM_WITH_VBVA
|
---|
115 | endif
|
---|
116 | ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
117 | VBoxDispD3D_DEFS += VBOX_WITH_VIDEOHWACCEL
|
---|
118 | endif
|
---|
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'"
|
---|
121 | VBoxDispD3D_DEFS += __STDC_VERSION__=0
|
---|
122 | VBoxDispD3D_INCS = \
|
---|
123 | ../../../include \
|
---|
124 | .. \
|
---|
125 | $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/shared \
|
---|
126 | $(VBOX_GRAPHICS_INCS)
|
---|
127 | VBoxDispD3D_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
|
---|
134 | VBoxDispD3D_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 |
|
---|
141 | ifdef VBOX_WITH_VMSVGA
|
---|
142 | VBoxDispD3D_DEFS += VBOX_WITH_VMSVGA
|
---|
143 | VBoxDispD3D_INCS += \
|
---|
144 | $(PATH_ROOT)/src/VBox/Additions/3D/win/include \
|
---|
145 | $(PATH_ROOT)/src/VBox/Devices/Graphics/vmsvga_include
|
---|
146 | endif
|
---|
147 |
|
---|
148 | ifdef VBOX_WITH_MESA3D
|
---|
149 | VBoxDispD3D_DEFS += VBOX_WITH_MESA3D
|
---|
150 | VBoxDispD3D_INCS += \
|
---|
151 | $(VBOX_PATH_MESA)/src/gallium/include \
|
---|
152 | $(VBOX_PATH_MESA)/src \
|
---|
153 | $(VBOX_PATH_MESA)/include/c99 \
|
---|
154 | $(VBOX_PATH_MESA)/include
|
---|
155 | VBoxDispD3D_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
|
---|
166 | VBoxDispD3D_DEFS += VBOX_WITH_VMSVGA3D_DX9
|
---|
167 | endif
|
---|
168 |
|
---|
169 | ifdef VBOX_WITH_MESA3D_D3DTEST
|
---|
170 | VBoxDispD3D_DEFS += VBOX_WITH_MESA3D_D3DTEST
|
---|
171 | VBoxDispD3D_SOURCES += \
|
---|
172 | wddm/gallium/test/d3dhlp.cpp \
|
---|
173 | wddm/gallium/test/d3d9render.cpp \
|
---|
174 | wddm/gallium/GaDrvTest.cpp
|
---|
175 | endif
|
---|
176 | endif
|
---|
177 |
|
---|
178 | #
|
---|
179 | # 64-bit systems needs a 32-bit version of VBoxDispD3D.
|
---|
180 | #
|
---|
181 | DLLS.amd64 += VBoxDispD3D-x86
|
---|
182 | VBoxDispD3D-x86_EXTENDS = VBoxDispD3D
|
---|
183 | VBoxDispD3D-x86_BLD_TRG_ARCH = x86
|
---|
184 | VBoxDispD3D-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)
|
---|
190 | VBoxDispD3D-x86_DEFS = $(VBoxDispD3D_DEFS) VBOX_WDDM_WOW64
|
---|
191 |
|
---|
192 | #
|
---|
193 | # VGPU10 driver VBoxDX
|
---|
194 | #
|
---|
195 | ifdef VBOX_WITH_VMSVGA3D_DX
|
---|
196 | DLLS += VBoxDX
|
---|
197 | VBoxDX_TEMPLATE = VBoxGuestR3DllMinVista
|
---|
198 | VBoxDX_DEFS = UNICODE _UNICODE VBOX_WITH_VMSVGA VBOX_WITH_VMSVGA3D_DX
|
---|
199 | VBoxDX_DEFS += D3D_UMD_INTERFACE_VERSION=D3D_UMD_INTERFACE_VERSION_WIN8
|
---|
200 | VBoxDX_DEFS += DXGKDDI_INTERFACE_VERSION=DXGKDDI_INTERFACE_VERSION_WIN8
|
---|
201 | VBoxDX_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)
|
---|
208 | VBoxDX_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
|
---|
214 | VBoxDX_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
|
---|
220 | DLLS.amd64 += VBoxDX-x86
|
---|
221 | VBoxDX-x86_EXTENDS = VBoxDX
|
---|
222 | VBoxDX-x86_BLD_TRG_ARCH = x86
|
---|
223 | VBoxDX-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)
|
---|
228 | VBoxDX-x86_DEFS = $(VBoxDX_DEFS) VBOX_WDDM_WOW64
|
---|
229 | endif # VBOX_WITH_VMSVGA3D_DX
|
---|
230 |
|
---|
231 | include $(PATH_SUB_CURRENT)/wddm/shared/Makefile.kmk
|
---|
232 |
|
---|
233 | endif #ifdef VBOX_WITH_WDDM
|
---|
234 |
|
---|
235 | ifdef VBOXVIDEOWINDBG
|
---|
236 | DLLS += vbvdbg
|
---|
237 | vbvdbg_TEMPLATE = VBOXR3STATIC
|
---|
238 | vbvdbg_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
239 | vbvdbg_DEFS = UNICODE _UNICODE
|
---|
240 | vbvdbg_SOURCES = \
|
---|
241 | wddm/dbg/VBoxVideoWinDbg.cpp \
|
---|
242 | wddm/dbg/VBoxVideoWinDbg.def
|
---|
243 |
|
---|
244 | PROGRAMS += tstMvWnd
|
---|
245 | tstMvWnd_TEMPLATE = VBOXR3EXE
|
---|
246 | tstMvWnd_DEFS = UNICODE _UNICODE
|
---|
247 | tstMvWnd_SOURCES = \
|
---|
248 | wddm/dbg/tstMvWnd.cpp
|
---|
249 | tstMvWnd_LIBS = $(VBOX_LIB_IPRT_GUEST_R3)
|
---|
250 | tstMvWnd_LDFLAGS.win = /SUBSYSTEM:windows
|
---|
251 |
|
---|
252 | PROGRAMS += DumpD3DCaps9
|
---|
253 | DumpD3DCaps9_TEMPLATE = VBOXR3EXE
|
---|
254 | DumpD3DCaps9_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
255 | DumpD3DCaps9_DEFS = UNICODE _UNICODE
|
---|
256 | DumpD3DCaps9_SOURCES = \
|
---|
257 | wddm/dbg/DumpD3DCaps9.cpp
|
---|
258 | DumpD3DCaps9_LIBS = d3d9.lib
|
---|
259 | DumpD3DCaps9_LDFLAGS.win = /SUBSYSTEM:CONSOLE
|
---|
260 |
|
---|
261 | PROGRAMS += D3DFeatureLevel
|
---|
262 | D3DFeatureLevel_TEMPLATE = VBOXR3STATIC
|
---|
263 | D3DFeatureLevel_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH)
|
---|
264 | D3DFeatureLevel_SOURCES = \
|
---|
265 | wddm/dbg/D3DFeatureLevel.cpp
|
---|
266 | D3DFeatureLevel_LIBS = $(VBOX_LIB_IPRT_GUEST_R3) d3d11.lib
|
---|
267 | D3DFeatureLevel_LDFLAGS.win = /SUBSYSTEM:CONSOLE
|
---|
268 |
|
---|
269 | endif #VBOXVIDEOWINDBG
|
---|
270 |
|
---|
271 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|