VirtualBox

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

Last change on this file was 98416, checked in by vboxsync, 16 months ago

Additions/*.kmk: Automatic scm cleanups. bugref:10348

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

© 2023 Oracle
ContactPrivacy policyTerms of Use