VirtualBox

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

Last change on this file since 106454 was 106454, checked in by vboxsync, 4 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: 6.8 KB
Line 
1# $Id: Makefile.kmk 106454 2024-10-17 13:59:36Z vboxsync $
2## @file
3# Makefile for the Windows guest miniport 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
31#
32# VBoxVideo - Windows Guest Additions XPDM Miniport Video Driver
33#
34# Note. This has to run on NT4! (*_NT4 => *_W2K3 when targeting 64-bit.)
35#
36ifdef VBOX_WITH_XPDM
37 SYSMODS += VBoxVideo
38 VBoxVideo_TEMPLATE = VBoxGuestR0Drv
39 VBoxVideo_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_NT4)
40 VBoxVideo_DEFS = VBOX_XPDM_MINIPORT VBOX_WITH_8BPP_MODES VBOX_USING_$(VBOX_WINDDK_GST_NT4)
41 VBoxVideo_DEFS += LOG_TO_BACKDOOR #LOG_ENABLED
42 VBoxVideo_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
43 ifdef VBOX_WITH_VIDEOHWACCEL
44 VBoxVideo_DEFS += VBOX_WITH_VIDEOHWACCEL
45 endif
46 VBoxVideo_INCS = \
47 ../../../include \
48 .. \
49 . \
50 $(VBOX_GRAPHICS_INCS)
51 VBoxVideo_LDFLAGS.x86 = /Entry:DriverEntry@8
52 VBoxVideo_LDFLAGS.amd64 = /Entry:DriverEntry
53 VBoxVideo_SOURCES = \
54 xpdm/VBoxMPDriver.cpp \
55 xpdm/VBoxMP.def \
56 xpdm/VBoxMP.rc \
57 xpdm/VBoxMPVideoPortAPI.cpp \
58 xpdm/VBoxMPInternal.cpp \
59 xpdm/VBoxMPRegistry.cpp \
60 xpdm/VBoxMPIOCTL.cpp \
61 common/VBoxMPUtils.cpp \
62 common/VBoxMPCommon.cpp \
63 common/VBoxMPHGSMI.cpp \
64 common/VBoxMPVidModes.cpp \
65 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp \
66 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp \
67 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIHostCmd.cpp \
68 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
69 VBoxVideo_LIBS = \
70 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/videoprt.lib \
71 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/ntoskrnl.lib \
72 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/hal.lib \
73 $(VBOX_LIB_VBGL_R0) \
74 $(VBOX_LIB_IPRT_GUEST_R0_NT4) \
75 $(VBOX_PATH_ADDITIONS_LIB)/HGSMIGuestR0Lib$(VBOX_SUFF_LIB)
76 ifeq ($(KBUILD_TARGET_ARCH),x86)
77 VBoxVideo_LIBS += \
78 $(PATH_SDK_$(VBOX_WINDDK_GST_NT4)_LIB)/exsup.lib \
79 $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB)/BufferOverflowK.lib # Needed for ___security_cookie.
80 endif
81 VBoxVideo_USES.win = vboximportchecker
82 VBoxVideo_VBOX_IMPORT_CHECKER.win.x86 = nt4/r0
83 VBoxVideo_VBOX_IMPORT_CHECKER.win.amd64 = xp64/r0
84endif
85
86ifdef VBOX_WITH_WDDM
87 #
88 # VBoxWddm - Windows Guest Additions WDDM Miniport Video Driver
89 #
90 SYSMODS += VBoxWddm
91 VBoxWddm_TEMPLATE = VBoxGuestR0Drv
92 VBoxWddm_SDKS = $(VBOX_WINDDK_GST_W8)
93 VBoxWddm_DEFS += VBOX_WDDM_MINIPORT VBOX_WITH_WDDM VBOX_WITH_HGCM
94 # WIN9X_COMPAT_SPINLOCK inlines KeInitializeSpinLock in W8 DDK (Windows 7 or older ntoskrnl does not export it).
95 VBoxWddm_DEFS += WIN9X_COMPAT_SPINLOCK
96 VBoxWddm_DEFS += VBOX_WITH_8BPP_MODES
97 ifdef VBOX_WITH_VIDEOHWACCEL
98 VBoxWddm_DEFS += VBOX_WITH_VIDEOHWACCEL
99 endif
100 ifdef VBOXWDDM_WITH_VBVA
101 VBoxWddm_DEFS += VBOXWDDM_WITH_VBVA
102 VBoxWddm_DEFS += VBOXWDDM_RENDER_FROM_SHADOW
103 ifdef VBOXVDMA_WITH_VBVA
104 VBoxWddm_DEFS += VBOXVDMA_WITH_VBVA
105 endif
106 endif
107 VBoxWddm_DEFS += LOG_TO_BACKDOOR
108 VBoxWddm_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
109 VBoxWddm_INCS += \
110 ../../../include \
111 .. \
112 . \
113 $(VBOX_GRAPHICS_INCS)
114
115 VBoxWddm_LDFLAGS.x86 += /Entry:DriverEntry@8
116 VBoxWddm_LDFLAGS.amd64 += /Entry:DriverEntry
117 VBoxWddm_LDFLAGS.arm64 += /Entry:DriverEntry
118
119 VBoxWddm_SOURCES = \
120 wddm/VBoxMPWddm.cpp \
121 wddm/VBoxMPLegacy.cpp \
122 wddm/VBoxMPVidPn.cpp \
123 wddm/VBoxMPVdma.cpp \
124 wddm/VBoxMPShgsmi.cpp \
125 wddm/VBoxMPCm.cpp \
126 wddm/VBoxMPSa.cpp \
127 wddm/VBoxMPMisc.cpp \
128 wddm/VBoxWddm.rc \
129 wddm/VBoxMPRegistry.cpp \
130 wddm/VBoxMPVModes.cpp \
131 common/VBoxMPUtils.cpp \
132 common/VBoxMPCommon.cpp \
133 common/VBoxMPHGSMI.cpp \
134 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp \
135 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp \
136 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIHostCmd.cpp \
137 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp \
138 $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
139
140 ifdef VBOXWDDM_WITH_VBVA
141 VBoxWddm_SOURCES += \
142 wddm/VBoxMPVbva.cpp
143 endif
144 ifdef VBOX_WITH_VIDEOHWACCEL
145 VBoxWddm_SOURCES += \
146 wddm/VBoxMPVhwa.cpp
147 endif
148
149 VBoxWddm_LIBS = \
150 $(PATH_SDK_$(VBOX_WINDDK_GST_W8)_LIB)/ntoskrnl.lib \
151 $(PATH_SDK_$(VBOX_WINDDK_GST_W8)_LIB)/hal.lib \
152 $(PATH_SDK_$(VBOX_WINDDK_GST_W8)_LIB)/displib.lib \
153 $(VBOX_LIB_VBGL_R0) \
154 $(VBOX_LIB_IPRT_GUEST_R0) \
155 $(VBOX_PATH_ADDITIONS_LIB)/HGSMIGuestR0Lib$(VBOX_SUFF_LIB)
156
157 VBoxWddm_LIBS.x86 = \
158 $(PATH_SDK_$(VBOX_WINDDK_GST_W8)_LIB)/BufferOverflowK.lib \
159 $(PATH_SDK_$(VBOX_WINDDK_GST_W8)_LIB)/memcmp.lib
160 VBoxWddm_LIBS.amd64 = \
161 $(PATH_SDK_$(VBOX_WINDDK_GST_W8)_LIB)/BufferOverflowK.lib
162 VBoxWddm_LIBS.arm64 = \
163 $(PATH_SDK_$(VBOX_WINDDK_GST_W8)_LIB)/BufferOverflowFastFailK.lib
164
165 ifdef VBOX_WITH_VMSVGA
166 VBoxWddm_DEFS += VBOX_WITH_VMSVGA
167 VBoxWddm_DEFS += __STDC_VERSION__=0 # for mesa include/c99_compat.h
168 VBoxWddm_DEFS += WIN9X_COMPAT_SPINLOCK # to avoid multiple KeInitializeSpinLock on amd64
169 VBoxWddm_INCS += \
170 $(PATH_ROOT)/src/VBox/Additions/3D/win/include \
171 $(PATH_ROOT)/src/VBox/Devices/Graphics/vmsvga_include
172 VBoxWddm_SOURCES += \
173 wddm/gallium/Svga.cpp \
174 wddm/gallium/SvgaCmd.cpp \
175 wddm/gallium/SvgaFifo.cpp \
176 wddm/gallium/SvgaHostObjects.cpp \
177 wddm/gallium/SvgaHw.cpp \
178 wddm/gallium/VBoxMPGaFence.cpp \
179 wddm/gallium/VBoxMPGaUtils.cpp \
180 wddm/gallium/VBoxMPGaWddm.cpp
181 endif
182
183 ifdef VBOX_WITH_VMSVGA3D_DX
184 VBoxWddm_DEFS += VBOX_WITH_VMSVGA3D_DX
185 VBoxWddm_SOURCES += \
186 wddm/gallium/SvgaRender.cpp \
187 wddm/gallium/VBoxMPDX.cpp
188 endif
189
190endif # VBOX_WITH_WDDM
191
192#
193# Signing requires both miniport and display drivers so it'll be dealt with in the parent makefile.
194#
195if defined(VBOX_SIGNING_MODE) && defined(VBOX_SIGN_ADDITIONS)
196 ifdef VBOX_WITH_XPDM
197 VBoxVideo_INSTTYPE = none
198 VBoxVideo_DEBUG_INSTTYPE = both
199 endif
200 ifdef VBOX_WITH_WDDM
201 VBoxWddm_INSTTYPE = none
202 VBoxWddm_DEBUG_INSTTYPE = both
203 endif
204endif
205
206include $(FILE_KBUILD_SUB_FOOTER)
207
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