VirtualBox

source: vbox/trunk/src/VBox/Devices/Makefile.kmk@ 101035

Last change on this file since 101035 was 100495, checked in by vboxsync, 17 months ago

Devices/EFI: Use our firmware volume definitions to get rid of the header dependency from the EFI firmware sources, bugref:4643

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 56.0 KB
Line 
1# $Id: Makefile.kmk 100495 2023-07-11 06:43:42Z vboxsync $
2## @file
3# Top-level sub-makefile for the devices, drivers and services.
4#
5
6#
7# Copyright (C) 2006-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# Make sure our Config.kmk is included.
32ifndef VBOX_DEVICES_CONFIG_KMK_INCLUDED
33 include $(PATH_SUB_CURRENT)/Config.kmk
34endif
35
36# Include sub-makefiles.
37if1of ($(KBUILD_TARGET_ARCH), $(VBOX_SUPPORTED_HOST_ARCHS))
38 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
39 include $(PATH_SUB_CURRENT)/Audio/testcase/Makefile.kmk
40 include $(PATH_SUB_CURRENT)/Input/testcase/Makefile.kmk
41 ifdef VBOX_WITH_TESTCASES
42 include $(PATH_SUB_CURRENT)/Samples/Makefile.kmk
43 endif
44 if defined(VBOX_WITH_INTEL_PXE) || defined(VBOX_ONLY_EXTPACKS)
45 include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
46 else if defined(VBOX_WITH_PXE_ROM)
47 if !defined(VBOX_WITHOUT_IPXE)
48 include $(PATH_SUB_CURRENT)/PC/ipxe/Makefile.kmk
49 endif
50 endif
51endif
52if !defined(VBOX_ONLY_EXTPACKS)
53 if1of ($(KBUILD_TARGET_ARCH), $(VBOX_SUPPORTED_HOST_ARCHS))
54 include $(PATH_SUB_CURRENT)/BiosCommonCode/Makefile.kmk
55 include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
56 include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
57 endif
58
59 #
60 # Main targets.
61 #
62 if1of ($(KBUILD_TARGET_ARCH), $(VBOX_SUPPORTED_HOST_ARCHS))
63 DLLS += VBoxDDU VBoxDD VBoxDD2
64 ifdef VBOX_WITH_R0_MODULES
65 LIBRARIES += ServicesR0
66 ifdef VBOX_WITH_VBOXR0_AS_DLL
67 DLLS += VBoxDDR0
68 else
69 SYSMODS += VBoxDDR0
70 endif
71 endif
72 ifdef VBOX_WITH_RAW_MODE
73 SYSMODS += VBoxDDRC
74 endif
75 else
76 DLLS += VBoxDDU
77 endif
78
79
80 #
81 # VBoxDDU (shared object)
82 #
83 VBoxDDU_TEMPLATE = VBoxR3DllWarnNoPic
84 VBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
85 VBoxDDU_INST.darwin = $(INST_DLL) $(INST_TESTCASE)
86 VBoxDDU_DEFS = IN_VBOXDDU
87 if defined(VBOX_WITH_VUSB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
88 VBoxDDU_DEFS += VBOX_WITH_VUSB
89 endif
90 if defined(VBOX_WITH_USB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
91 VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
92 VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
93 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
94 VBoxDDU_DEFS += VBOX_WITH_EHCI_IMPL
95 endif
96 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
97 VBoxDDU_DEFS += VBOX_WITH_XHCI_IMPL
98 endif
99 else
100 VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK)
101 endif
102 VBoxDDU_SOURCES = \
103 Storage/VSCSI/VSCSIDevice.cpp \
104 Storage/VSCSI/VSCSILun.cpp \
105 Storage/VSCSI/VSCSILunSbc.cpp \
106 Storage/VSCSI/VSCSILunMmc.cpp \
107 Storage/VSCSI/VSCSISense.cpp \
108 Storage/VSCSI/VSCSIIoReq.cpp \
109 Storage/VSCSI/VSCSIVpdPagePool.cpp \
110 build/VBoxDDUDeps.cpp
111
112 ifdef VBOX_WITH_VSCSI_SSC
113 VBoxDDU_SOURCES += Storage/VSCSI/VSCSILunSsc.cpp
114 VBoxDDU_DEFS += VBOX_WITH_VSCSI_SSC
115 endif
116 VBoxDDU_LIBS = \
117 $(LIB_RUNTIME) \
118 $(PATH_STAGE_LIB)/StorageLib$(VBOX_SUFF_LIB)
119 VBoxDDU_LIBS.freebsd += \
120 geom
121 VBoxDDU_LIBS.solaris += \
122 efi
123 if defined(VBOX_WITH_USB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
124 VBoxDDU_SDKS.win += VBoxWinNewDevLib
125 VBoxDDU_LIBS += \
126 $(PATH_STAGE_LIB)/USBLib$(VBOX_SUFF_LIB)
127 VBoxDDU_LIBS.win += \
128 $(PATH_STAGE_LIB)/VBoxDrvCfgDll$(VBOX_SUFF_LIB)
129 endif
130 VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
131 if defined(VBOX_WITH_USB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
132 VBoxDDU_LDFLAGS.darwin += -framework IOKit
133 endif
134
135 VBoxDDU_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
136 $(call VBOX_SET_VER_INFO_DLL,VBoxDDU,VirtualBox VMM Devices and Drivers Utilities)
137
138
139endif # VBOX_ONLY_EXTPACKS
140if !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != "" # Goes on almost to the end of the file.
141
142
143 #
144 # VBoxDD (shared object)
145 #
146 if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
147 #
148 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
149 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
150 #
151 # Template used for gcc older than 4.6. (Strips away compiler options.)
152 #
153 TEMPLATE_VBoxDDOldGCC := VBoxDDOldGCC
154 TEMPLATE_VBoxDDOldGCC_EXTENDS := VBoxR3DllWarnNoPic
155 TEMPLATE_VBoxDDOldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxDDOldGCC_EXTENDS)_CXXFLAGS))
156
157 VBoxDD_TEMPLATE = VBoxDDOldGCC
158 else
159 VBoxDD_TEMPLATE = VBoxR3DllWarnNoPic
160 endif
161 VBoxDD_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBoxNtDll
162 Storage/DrvHostDVD.cpp_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK)
163 VBoxDD_INCS = \
164 build \
165 $(VBOX_GRAPHICS_INCS)
166
167 ifndef VBOX_WITH_LIBSLIRP
168 VBoxDD_INCS += Network/slirp
169 endif
170 VBoxDD_DEFS = \
171 VBOX_HGCM_HOST_CODE \
172 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
173 $(if $(VBOX_BIOS_DMI_FALLBACK),VBOX_BIOS_DMI_FALLBACK,) \
174 VBOX_WITH_DMI_CHASSIS \
175 VBOX_WITH_DMI_OEMSTRINGS \
176 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
177 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
178 $(if $(VBOX_WITH_INTNET_SERVICE_IN_R3),VBOX_WITH_INTNET_SERVICE_IN_R3,)
179 VBoxDD_DEFS.win = _WIN32_WINNT=0x0510
180 ifeq ($(KBUILD_TARGET_ARCH),x86)
181 VBoxDD_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
182 endif
183 VBoxDD_SOURCES = \
184 build/VBoxDD.cpp \
185 \
186 Input/DevPS2.cpp \
187 Input/DevPS2K.cpp \
188 Input/DevPS2M.cpp \
189 Input/UsbKbd.cpp \
190 Input/UsbMouse.cpp \
191 Bus/DevPCI.cpp \
192 Bus/DevPciIch9.cpp \
193 Bus/MsiCommon.cpp \
194 Bus/MsixCommon.cpp \
195 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
196 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
197 EFI/DevSmc.cpp \
198 EFI/DevFlash.cpp \
199 EFI/FlashCore.cpp \
200 Graphics/DevVGA.cpp \
201 Storage/DevATA.cpp \
202 PC/DevPit-i8254.cpp \
203 PC/DevPIC.cpp \
204 PC/DevACPI.cpp \
205 PC/ACPI/VBoxAcpi.cpp \
206 PC/DevRTC.cpp \
207 PC/DevPcBios.cpp \
208 PC/DevFwCommon.cpp \
209 PC/DevPcArch.cpp \
210 PC/DevQemuFwCfg.cpp \
211 PC/DevLpc.cpp \
212 GIMDev/GIMDev.cpp \
213 GIMDev/DrvUDP.cpp \
214 VMMDev/VMMDev.cpp \
215 $(if $(VBOX_WITH_HGCM),VMMDev/VMMDevHGCM.cpp,) \
216 VMMDev/VMMDevTesting.cpp \
217 Network/DevPCNet.cpp \
218 Network/DevDP8390.cpp \
219 Network/Dev3C501.cpp \
220 PC/DevDMA.cpp \
221 PC/DevHPET.cpp \
222 PC/DevIoApic.cpp \
223 Storage/DevFdc.cpp \
224 Parallel/DevParallel.cpp \
225 \
226 Input/DrvKeyboardQueue.cpp \
227 Input/DrvMouseQueue.cpp \
228 Network/DrvIntNet.cpp \
229 Network/DrvDedicatedNic.cpp \
230 PC/DrvACPI.cpp \
231 PC/DrvAcpiCpu.cpp \
232 Serial/DevSerial.cpp \
233 Serial/DevOxPcie958.cpp \
234 Serial/UartCore.cpp \
235 Serial/DrvChar.cpp \
236 Serial/DrvHostSerial.cpp \
237 Serial/DrvNamedPipe.cpp \
238 Serial/DrvTCP.cpp \
239 Serial/DrvRawFile.cpp \
240 Storage/Debug.cpp \
241 Storage/DrvVD.cpp \
242 Storage/ATAPIPassthrough.cpp \
243 Storage/IOBufMgmt.cpp \
244 Network/DrvNetSniffer.cpp \
245 Network/Pcap.cpp \
246 Trace/DrvIfsTrace.cpp \
247 Trace/DrvIfsTrace-serial.cpp
248 ifn1of ($(KBUILD_TARGET), os2)
249 VBoxDD_SOURCES += Storage/DrvHostBase.cpp
250 endif
251 ifn1of ($(KBUILD_TARGET), os2)
252 VBoxDD_SOURCES += Storage/DrvHostDVD.cpp
253 endif
254 ifn1of ($(KBUILD_TARGET), darwin freebsd os2 solaris)
255 VBoxDD_SOURCES += Storage/DrvHostFloppy.cpp
256 endif
257
258
259 ifn1of ($(KBUILD_TARGET), darwin)
260 VBoxDD_SOURCES += Storage/HBDMgmt-generic.cpp
261 endif
262
263 VBoxDD_SOURCES.darwin += \
264 Storage/HBDMgmt-darwin.cpp \
265 Storage/DrvHostBase-darwin.cpp
266
267 VBoxDD_SOURCES.freebsd += \
268 Storage/DrvHostBase-freebsd.cpp
269
270 VBoxDD_SOURCES.linux += \
271 Storage/DrvHostBase-linux.cpp
272
273 VBoxDD_SOURCES.solaris += \
274 Storage/DrvHostBase-solaris.cpp
275
276 VBoxDD_SOURCES.win += \
277 Storage/DrvHostBase-win.cpp
278
279 #VBoxDD_SOURCES.win += Storage/HBDMgmt-win.cpp #Disabled until remaining issues are sorted out
280
281 VBoxDD_LIBS = # more later.
282 VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \
283 -framework CoreAudio \
284 -framework AudioUnit \
285 -framework AudioToolbox \
286 -framework IOKit \
287 -framework Carbon \
288 -framework DiskArbitration \
289 -framework SystemConfiguration \
290 -framework AVFoundation \
291 -framework Foundation
292 VBoxDD_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
293
294 # --- Tracing bits. ---
295
296 ifdef VBOX_WITH_DTRACE_R3
297 VBoxDD_DEFS += VBOX_WITH_DTRACE
298 VBoxDD_USES += dtrace
299 VBoxDD_SOURCES += build/VBoxDD.d
300 endif
301
302 # --- Graphics bits. ---
303
304 ifdef VBOXWDDM_TEST_UHGSMI
305 VBoxDD_DEFS += VBOXWDDM_TEST_UHGSMI
306 endif
307 ifdef VBOXWDDM_WITH_VBVA
308 VBoxDD_DEFS += VBOXWDDM_WITH_VBVA
309 endif
310 ifdef VBOX_WITH_VIDEOHWACCEL
311 VBoxDD_DEFS += VBOX_WITH_VIDEOHWACCEL
312 endif
313
314 ifdef VBOX_WITH_HGSMI
315 VBoxDD_DEFS += VBOX_WITH_HGSMI
316 VBoxDD_SOURCES += \
317 Graphics/DevVGA_VBVA.cpp \
318 Graphics/HGSMI/HGSMIHost.cpp
319 VBoxDD_LIBS += \
320 $(PATH_STAGE_LIB)/HGSMIHostR3Lib$(VBOX_SUFF_LIB)
321 endif
322
323 ifdef VBOX_WITH_WDDM
324 VBoxDD_DEFS += VBOX_WITH_WDDM
325 VBoxDD_SOURCES += \
326 Graphics/HGSMI/SHGSMIHost.cpp
327 endif
328
329 ifdef VBOX_WITH_VMSVGA
330 VBoxDD_DEFS += VBOX_WITH_VMSVGA
331 VBoxDD_INCS += $(VBOX_PATH_VMSVGA_DEVICE_INC)
332 VBoxDD_SOURCES += \
333 Graphics/DevVGA-SVGA.cpp \
334 Graphics/DevVGA-SVGA-cmd.cpp
335 endif
336 ifdef VBOX_WITH_VMSVGA3D
337 if1of ($(KBUILD_TARGET), linux win)
338 # Dynamically load 3D library (opengl32, libGL).
339 # This is a temporary solution. In future the 3D backend will be in a separate library.
340 VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1
341 endif
342 VBoxDD_DEFS += VBOX_WITH_VMSVGA3D
343 VBoxDD_SOURCES += \
344 Graphics/DevVGA-SVGA3d.cpp \
345 Graphics/DevVGA-SVGA3d-hlp.cpp \
346 Graphics/DevVGA-SVGA3d-info.cpp \
347 Graphics/DevVGA-SVGA3d-shared.cpp \
348 Graphics/DevVGA-SVGA3d-savedstate.cpp
349 ifdef VBOX_WITH_VMSVGA3D_DX
350 VBoxDD_DEFS += VMSVGA3D_DX
351 VBoxDD_SOURCES += \
352 Graphics/DevVGA-SVGA3d-dx.cpp \
353 Graphics/DevVGA-SVGA3d-dx-savedstate.cpp \
354 Graphics/DevVGA-SVGA3d-dx-shader.cpp
355 if "$(KBUILD_TARGET)" == "win" || defined(VBOX_WITH_DXVK)
356 VBoxDD_SDKS.linux += VBoxDxVk
357 VBoxDD_SDKS.darwin += VBoxDxVk
358 VBoxDD_DEFS += VMSVGA3D_DX_BACKEND
359 VBoxDD_SOURCES += \
360 Graphics/DevVGA-SVGA3d-dx-dx11.cpp
361 # @todo This is probably not the nicest way to do this...
362 VBoxDD_POST_CMDS.darwin += \
363 $(INSTALL) -m 0644 $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_TRG)/moltenvk/v*)))/libMoltenVK.dylib $(PATH_STAGE_BIN)/libMoltenVK.dylib
364
365 # mac2 clang is too old to know the -Wclass-conversion switch in the ignore pragma it seems.
366 Graphics/DevVGA-SVGA3d-dx-dx11.cpp_CXXFLAGS.darwin += -Wno-error
367 endif
368 endif
369 VBoxDD_SOURCES += \
370 Graphics/svgadump/svga_dump.c
371 if "$(KBUILD_TARGET)" == "win" && !defined(VBOX_WITH_VMSVGA3D_USE_OPENGL)
372 VBoxDD_DEFS += VMSVGA3D_DIRECT3D
373 VBoxDD_SOURCES += \
374 Graphics/DevVGA-SVGA3d-win.cpp \
375 Graphics/DevVGA-SVGA3d-win-d3d9.cpp
376 VBoxDD_LIBS.win += d3d9.lib $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
377 VBoxDD_LDFLAGS.win += /DELAYLOAD:d3d9.dll
378 else
379 VBoxDD_DEFS += VMSVGA3D_OPENGL
380 VBoxDD_SOURCES += \
381 Graphics/DevVGA-SVGA3d-ogl.cpp \
382 Graphics/DevVGA-SVGA3d-glHlp.cpp \
383 $(VBoxDD_0_OUTDIR)/VBoxSVGA3DLazyLoad.asm
384 VBoxDD_SOURCES.darwin += \
385 $(VBoxDD_0_OUTDIR)/VBoxSVGA3DObjCLazyLoad.asm
386 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/VBoxSVGA3DLazyLoad.asm
387 $$(VBoxDD_0_OUTDIR)/VBoxSVGA3DLazyLoad.asm: $(PATH_SUB_CURRENT)/Graphics/VBoxSVGA3D.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
388 $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxDD,$(filter %.def, $^),$@)
389 $(QUIET)$(RM) -f -- "$@"
390 $(VBOX_DEF_2_LAZY_LOAD) --explicit-load-function --library VBoxSVGA3D --output "$@" $(filter %.def, $^)
391 $$(VBoxDD_0_OUTDIR)/VBoxSVGA3DObjCLazyLoad.asm: $(PATH_SUB_CURRENT)/Graphics/VBoxSVGA3DObjC.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
392 $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxDD,$(filter %.def, $^),$@)
393 $(QUIET)$(RM) -f -- "$@"
394 $(VBOX_DEF_2_LAZY_LOAD) --explicit-load-function --library VBoxSVGA3DObjC --output "$@" $(filter %.def, $^)
395
396 ifdef VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD
397 VBoxDD_DEFS += VMSVGA3D_DYNAMIC_LOAD
398 VBoxDD_SOURCES += \
399 Graphics/DevVGA-SVGA3d-glLdr.cpp
400 else
401 VBoxDD_LIBS.linux += X11 GL
402 VBoxDD_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
403 endif
404 VBoxDD_LDFLAGS.darwin += -framework OpenGL
405 VBoxDD_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
406 if 0 # Use the OpenGL 3.2 Core profile (see also VBoxSVGA3D_DEFS.darwin and VBoxSVGA3DObjC_DEFS.darwin).
407 VBoxDD_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
408 else
409 VBoxDD_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
410 endif
411 endif
412 if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.6 10.5 10.4)
413 Graphics/DevVGA-SVGA3d.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
414 Graphics/DevVGA-SVGA3d-info.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
415 Graphics/DevVGA-SVGA3d-shared.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
416 Graphics/DevVGA-SVGA3d-savedstate.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
417 Graphics/DevVGA-SVGA3d-ogl.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
418 else if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.14 10.15 10.16 11.0)
419 Graphics/DevVGA-SVGA3d-ogl.cpp_CXXFLAGS.darwin = $(VBOX_GCC_Wno-deprecated-declarations)
420 endif
421 endif
422
423 ifdef VBOX_WITH_VDMA
424 VBoxDD_DEFS += VBOX_WITH_VDMA
425 VBoxDD_SOURCES += \
426 Graphics/DevVGA_VDMA.cpp
427 endif
428
429 ifdef VBOX_WITH_PXE_ROM
430 VBoxDD_DEFS += VBOX_WITH_PXE_ROM
431 endif
432
433 # --- USB bits. ---
434
435 ifdef VBOX_WITH_USB
436 VBoxDD_DEFS += VBOX_WITH_USB
437 VBoxDD_SOURCES += \
438 USB/vrdp/USBProxyDevice-vrdp.cpp \
439 USB/usbip/USBProxyDevice-usbip.cpp
440
441 VBoxDD_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
442 VBoxDD_SOURCES.darwin += \
443 USB/USBProxyDevice.cpp \
444 USB/darwin/USBProxyDevice-darwin.cpp
445 # if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.9) # Hack, shouldn't be needed
446 # USB/darwin/USBProxyDevice-darwin.cpp_SDKS = MACOSX1010
447 # endif
448
449 VBoxDD_DEFS.linux += \
450 VUSB_HAVE_USBPROXY_DEVICE \
451 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
452 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
453 VBoxDD_SOURCES.linux += \
454 USB/USBProxyDevice.cpp \
455 USB/linux/USBProxyDevice-linux.cpp
456
457 VBoxDD_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
458 VBoxDD_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
459 VBoxDD_SOURCES.os2 += \
460 USB/USBProxyDevice.cpp \
461 USB/os2/USBProxyDevice-os2.cpp
462
463 VBoxDD_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
464 VBoxDD_SOURCES.win += \
465 USB/USBProxyDevice.cpp \
466 USB/win/USBProxyDevice-win.cpp
467
468 VBoxDD_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
469 VBoxDD_SOURCES.solaris += \
470 USB/USBProxyDevice.cpp \
471 USB/solaris/USBProxyDevice-solaris.cpp
472
473 VBoxDD_DEFS.freebsd += VUSB_HAVE_USBPROXY_DEVICE
474 VBoxDD_SOURCES.freebsd += \
475 USB/USBProxyDevice.cpp \
476 USB/freebsd/USBProxyDevice-freebsd.cpp
477
478 ifdef VBOX_WITH_SCSI
479 VBoxDD_SOURCES += \
480 Storage/UsbMsd.cpp
481 endif
482
483 if defined(VBOX_WITH_EHCI_IMPL)
484 VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
485 VBoxDD_SOURCES += \
486 USB/DevEHCI.cpp
487 endif
488
489 if defined(VBOX_WITH_XHCI_IMPL)
490 VBoxDD_DEFS += VBOX_WITH_XHCI_IMPL
491 VBoxDD_SOURCES += \
492 USB/DevXHCI.cpp
493 endif
494
495 if defined(VBOX_WITH_USB_VIDEO_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
496 if1of ($(KBUILD_TARGET), linux)
497 VBoxDD_DEFS += VBOX_WITH_USB_VIDEO_IMPL
498 VBoxDD_SOURCES += \
499 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcam.cpp \
500 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcamDesc.cpp \
501 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/jpggen.cpp \
502 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/DrvHostWebcam.cpp \
503 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp
504 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp_INCS = \
505 $(VBOX_JPEG_INCS)
506 VBoxDD_SOURCES.linux += \
507 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/HostWebcam-v4l2.cpp
508 VBoxDD_LIBS += \
509 $(PATH_STAGE_LIB)/VBox-libjpeg$(VBOX_SUFF_LIB)
510 endif
511 endif
512
513 endif # VBOX_WITH_USB
514
515 ifdef VBOX_WITH_VUSB
516 VBoxDD_DEFS += VBOX_WITH_VUSB
517 VBoxDD_SOURCES += \
518 USB/DevOHCI.cpp \
519 USB/DrvVUSBRootHub.cpp \
520 USB/VUSBDevice.cpp \
521 USB/VUSBSniffer.cpp \
522 USB/VUSBSnifferPcapNg.cpp \
523 USB/VUSBSnifferUsbMon.cpp \
524 USB/VUSBSnifferVmx.cpp \
525 USB/VUSBUrb.cpp \
526 USB/VUSBUrbPool.cpp \
527 USB/VUSBUrbTrace.cpp
528 endif
529
530 # --- Networking bits. ---
531
532 ifdef VBOX_WITH_INIP
533 ifndef LWIP_SOURCES
534 include $(PATH_SUB_CURRENT)/Network/lwip-new/Config.kmk
535 endif
536 VBoxDD_DEFS += VBOX_WITH_INIP
537 VBoxDD_SOURCES += \
538 Network/DevINIP.cpp \
539 $(addprefix Network/lwip-new/,$(LWIP_SOURCES))
540 VBoxDD_INCS += \
541 Network \
542 $(addprefix Network/lwip-new/,$(LWIP_INCS))
543 endif # VBOX_WITH_INIP
544
545 ifdef VBOX_WITH_E1000
546 VBoxDD_DEFS += VBOX_WITH_E1000
547 VBoxDD_SOURCES += \
548 Network/DevE1000.cpp \
549 Network/DevE1000Phy.cpp \
550 Network/DevEEPROM.cpp
551 endif
552
553 ifdef VBOX_WITH_VIRTIO
554 VBoxDD_DEFS += VBOX_WITH_VIRTIO
555 VBoxDD_SOURCES += \
556 VirtIO/VirtioCore.cpp \
557 Network/DevVirtioNet.cpp
558 endif
559
560
561 ifdef VBOX_WITH_UDPTUNNEL
562 VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
563 VBoxDD_SOURCES += \
564 Network/DrvUDPTunnel.cpp
565 endif
566
567 ifdef VBOX_WITH_VDE
568 VBoxDD_DEFS += VBOX_WITH_VDE
569 VBoxDD_SOURCES += \
570 Network/DrvVDE.cpp \
571 Network/VDEPlug.cpp
572 endif
573
574 ifdef VBOX_WITH_NETSHAPER
575 VBoxDD_DEFS += VBOX_WITH_NETSHAPER
576 VBoxDD_SOURCES += \
577 Network/DrvNetShaper.cpp
578 endif
579
580 ifdef VBOX_WITH_VMNET
581 VBoxDD_DEFS.darwin += VBOX_WITH_VMNET
582 VBoxDD_SOURCES.darwin += \
583 Network/DrvVMNet.m
584 VBoxDD_LDFLAGS.darwin += -framework vmnet
585 endif
586
587 if defined(VBOX_WITH_CLOUD_NET) && defined(VBOX_WITH_LIBSSH)
588 VBoxDD_SDKS += VBoxLibSsh VBoxZlib VBoxOpenSsl
589 VBoxDD_DEFS += VBOX_WITH_CLOUD_NET
590 VBoxDD_SOURCES += \
591 Network/DrvCloudTunnel.cpp
592
593 VBoxDD_SOURCES += \
594 $(VBoxDD_0_OUTDIR)/VBoxLibSshLazyLoad.asm
595 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/VBoxLibSshLazyLoad.asm
596 $$(VBoxDD_0_OUTDIR)/VBoxLibSshLazyLoad.asm: $(PATH_SUB_CURRENT)/Network/VBoxLibSsh.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
597 $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxDD,$(filter %.def, $^),$@)
598 $(QUIET)$(RM) -f -- "$@"
599 $(VBOX_DEF_2_LAZY_LOAD) --explicit-load-function --library VBoxLibSsh --output "$@" $(filter %.def, $^)
600 endif
601
602 # --- Storage bits. ---
603
604 ifdef VBOX_WITH_AHCI
605 VBoxDD_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
606 VBoxDD_SOURCES += \
607 Storage/DevAHCI.cpp
608 endif
609
610 ifdef VBOX_WITH_BUSLOGIC
611 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
612 VBoxDD_SOURCES += \
613 Storage/DevBusLogic.cpp
614 endif
615
616 ifdef VBOX_WITH_LSILOGIC
617 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
618 VBoxDD_SOURCES += \
619 Storage/DevLsiLogicSCSI.cpp
620 endif
621
622 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
623 VBoxDD_DEFS += VBOX_WITH_NVME_IMPL
624 VBoxDD_SOURCES += \
625 Storage/DevNVMe.cpp
626 endif
627
628 if defined(VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_SCSI)
629 VBoxDD_DEFS += VBOX_WITH_VIRTIO_SCSI
630 VBoxDD_SOURCES += \
631 Storage/DevVirtioSCSI.cpp
632 endif
633
634 if defined(VBOX_WITH_TPM)
635 VBoxDD_DEFS += VBOX_WITH_TPM
636 VBoxDD_SOURCES += \
637 Security/DevTpm.cpp \
638 Security/DrvTpmEmu.cpp
639
640 VBoxDD_SOURCES.linux += \
641 Security/DrvTpmHost.cpp
642
643 VBoxDD_SOURCES.win += \
644 Security/DrvTpmHost.cpp
645
646 if defined(VBOX_WITH_LIBTPMS)
647 VBoxDD_SDKS += VBoxLibTpms
648 VBoxDD_DEFS += VBOX_WITH_LIBTPMS
649 VBoxDD_SOURCES += \
650 Security/DrvTpmEmuTpms.cpp
651 endif
652 endif
653
654 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
655 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
656 endif
657
658 ifdef VBOX_WITH_SCSI
659 VBoxDD_DEFS += VBOX_WITH_SCSI
660 VBoxDD_SOURCES += \
661 Storage/DrvSCSI.cpp
662 endif
663
664 ifdef VBOX_WITH_ISCSI
665 $(eval $(call def_vbox_lwip_flags, \
666 VBoxDD, Storage/DrvVD.cpp, Network/lwip-new))
667 endif
668
669 ifdef VBOX_WITH_DRV_DISK_INTEGRITY
670 VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
671 VBoxDD_SOURCES += \
672 Storage/DrvDiskIntegrity.cpp \
673 Storage/DrvRamDisk.cpp
674 endif
675
676 ifdef VBOX_WITH_EFI
677 VBoxDD_DEFS += VBOX_WITH_EFI
678 VBoxDD_SOURCES += EFI/DevEFI.cpp
679 endif
680
681 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
682 VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
683 VBoxDD_SOURCES += \
684 Bus/DevPciRaw.cpp \
685 Bus/DrvPciRaw.cpp
686 endif
687
688 ifdef VBOX_WITH_MSI_DEVICES
689 VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
690 endif
691
692 ifdef VBOX_WITH_DYNAMIC_DSDT
693 VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
694 endif
695
696 # --- Audio bits (see also VBOX_AUDIO_DEFS in ./Config.kmk). ---
697
698 VBoxDD_DEFS += $(VBOX_AUDIO_DEFS)
699 VBoxDD_SOURCES += \
700 Audio/DevIchAc97.cpp \
701 Audio/DevSB16.cpp \
702 Audio/DevHda.cpp \
703 Audio/DevHdaCodec.cpp \
704 Audio/DevHdaStream.cpp \
705 Audio/AudioHlp.cpp \
706 Audio/AudioMixBuffer.cpp \
707 Audio/AudioMixer.cpp \
708 Audio/DrvAudio.cpp \
709 Audio/DrvHostAudioNull.cpp
710
711 if defined(VBOX_WITH_AUDIO_DEBUG) || defined(VBOX_WITH_AUDIO_VALIDATIONKIT)
712 VBoxDD_SOURCES += \
713 Audio/AudioTest.cpp \
714 Audio/AudioTestService.cpp \
715 Audio/AudioTestServiceTcp.cpp \
716 Audio/AudioTestServiceProtocol.cpp
717 endif
718
719 ifdef VBOX_WITH_AUDIO_DEBUG
720 VBoxDD_DEFS += VBOX_WITH_AUDIO_DEBUG
721 VBoxDD_SOURCES += \
722 Audio/DrvHostAudioDebug.cpp
723 endif
724
725 ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
726 VBoxDD_DEFS += VBOX_WITH_AUDIO_VALIDATIONKIT
727 VBoxDD_SOURCES += \
728 Audio/DrvHostAudioValidationKit.cpp
729 endif
730
731 ifeq ($(KBUILD_TARGET),darwin)
732 VBoxDD_SOURCES += \
733 Audio/DrvHostAudioCoreAudio.cpp \
734 Audio/DrvHostAudioCoreAudioAuth.mm
735 endif
736
737 ifeq ($(KBUILD_TARGET),win)
738 VBoxDD_SOURCES += \
739 Audio/DrvHostAudioDSound.cpp \
740 Audio/DrvHostAudioWasApi.cpp
741 ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
742 VBoxDD_DEFS += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
743 VBoxDD_SOURCES += \
744 Audio/DrvHostAudioDSoundMMNotifClient.cpp
745 endif
746 endif
747
748 ifdef VBOX_WITH_AUDIO_OSS
749 VBoxDD_DEFS += VBOX_WITH_AUDIO_OSS
750 VBoxDD_SOURCES += \
751 Audio/DrvHostAudioOss.cpp
752 endif
753
754 ifdef VBOX_WITH_AUDIO_ALSA
755 VBoxDD_DEFS += VBOX_WITH_AUDIO_ALSA
756 VBoxDD_SOURCES += \
757 Audio/DrvHostAudioAlsa.cpp \
758 Audio/DrvHostAudioAlsaStubs.cpp
759 endif
760
761 ifdef VBOX_WITH_AUDIO_PULSE
762 VBoxDD_DEFS += VBOX_WITH_AUDIO_PULSE
763 VBoxDD_SOURCES += \
764 Audio/DrvHostAudioPulseAudio.cpp \
765 Audio/DrvHostAudioPulseAudioStubs.cpp
766 endif
767
768 ifdef VBOX_WITH_LIBSLIRP
769 VBoxDD_LIBS += $(PATH_STAGE_LIB)/VBox-libslirp$(VBOX_SUFF_LIB)
770 VBoxDD_LIBS.darwin += resolv
771 VBoxDD_DEFS += VBOX_WITH_LIBSLIRP
772 VBoxDD_SOURCES += \
773 Network/DrvNATlibslirp.cpp
774 Network/DrvNATlibslirp.cpp_INCS += \
775 $(PATH_ROOT)/src/libs/libslirp-4.7.0/src \
776 $(PATH_OUT)/obj/VBox-libslirp
777 endif
778
779 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
780 ifndef VBOX_WITH_LIBSLIRP
781 VBOX_SLIRP_SOURCES = \
782 Network/DrvNAT.cpp \
783 Network/slirp/bootp.c \
784 Network/slirp/debug.c \
785 Network/slirp/ip_icmp.c \
786 Network/slirp/ip_input.c \
787 Network/slirp/ip_output.c \
788 Network/slirp/misc.c \
789 Network/slirp/sbuf.c \
790 Network/slirp/slirp.c \
791 Network/slirp/slirp_dns.c \
792 Network/slirp/socket.c \
793 Network/slirp/tcp_input.c \
794 Network/slirp/tcp_output.c \
795 Network/slirp/tcp_subr.c \
796 Network/slirp/tcp_timer.c \
797 Network/slirp/udp.c \
798 Network/slirp/hostres.c \
799 Network/slirp/dnsproxy/hash.c \
800 Network/slirp/tftp.c \
801 Network/slirp/dnsproxy/dnsproxy.c
802
803 ifeq ($(KBUILD_TARGET),win)
804 VBOX_SLIRP_SOURCES += Network/slirp/ip_icmpwin.c
805 else ifneq ($(KBUILD_TARGET),darwin)
806 # helper for debugging unprivileged
807 # Network/slirp/ip_icmp.c_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
808 # VBOX_SLIRP_SOURCES += ../NetworkServices/NAT/getrawsock.c
809 endif
810
811 ifneq ($(KBUILD_TARGET),win)
812 VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
813 endif
814
815 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
816 VBOX_SLIRP_BSD_SOURCES += \
817 Network/slirp/bsd/kern/kern_mbuf.c \
818 Network/slirp/bsd/kern/uipc_mbuf.c \
819 Network/slirp/bsd/kern/uipc_mbuf2.c \
820 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
821 VBOX_SLIRP_ALIAS_SOURCES = \
822 Network/slirp/libalias/alias.c \
823 Network/slirp/libalias/alias_db.c \
824 Network/slirp/libalias/alias_mod.c \
825 Network/slirp/libalias/alias_proxy.c \
826 Network/slirp/libalias/alias_ftp.c \
827 Network/slirp/libalias/alias_nbt.c \
828 Network/slirp/libalias/alias_util.c
829
830 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
831 # $(file)_DEFS or clean the code disabled with this definition.
832 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER = 1
833
834 # dump memory related operations.
835 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
836
837 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
838 define def_vbox_slirp_cflags
839 $(file)_DEFS += \
840 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
841 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
842 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
843 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
844 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
845 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
846 $(file)_INCS += \
847 $(1)/slirp/bsd/sys \
848 $(1)/slirp/bsd/sys/sys \
849 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
850 $(1)/slirp/bsd/netinet \
851 $(1)/slirp \
852 $(1)/slirp/libalias
853 ifeq ($(KBUILD_TARGET),win)
854 $(file)_CFLAGS = -wd4018
855 else
856 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
857 endif
858 endef
859
860 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
861
862 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
863 define def_vbox_slirp_alias_cflags
864 $(file)_DEFS += VBOX_SLIRP_ALIAS \
865 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
866 $(file)_INCS += \
867 $(1)/slirp/libalias \
868 $(1)/slirp \
869 $(1)/slirp/dnsproxy
870 ifneq ($(KBUILD_TARGET),win)
871 $(file)_CFLAGS += -Wno-shadow
872 endif
873 endef
874 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
875 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
876
877 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
878 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
879 define def_vbox_slirp_bsd_cflags
880 $(file)_DEFS += VBOX_SLIRP_BSD
881 $(file)_INCS += $(1)/slirp/dnsproxy
882 endef
883 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
884 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
885 endif
886
887
888 # --- OS specific driver hacks. ---
889
890 ifeq ($(KBUILD_TARGET),freebsd)
891 VBoxDD_SOURCES.freebsd += Network/DrvTAP.cpp
892 endif # freebsd
893
894 VBoxDD_SOURCES.linux += \
895 Network/DrvTAP.cpp \
896 Parallel/DrvHostParallel.cpp
897
898 ifeq ($(KBUILD_TARGET),solaris)
899 ifdef VBOX_WITH_SUID_WRAPPER
900 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
901 endif
902 endif
903
904 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
905 VBoxDD_SOURCES.win += \
906 Parallel/DrvHostParallel.cpp
907
908 ifdef VBOX_WITH_VIRTUALKD
909 VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
910 VBoxDD_SOURCES.win += \
911 Misc/DevVirtualKD.cpp
912 endif
913
914 if defined(VBOX_WITH_NETFLT)
915 VBoxDD_DEFS += VBOX_WITH_NETFLT
916 if defined(VBOX_NETFLT_ONDEMAND_BIND)
917 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
918 endif
919 endif
920
921 # --- ARMv8 bits. ---
922 if defined(VBOX_WITH_VIRT_ARMV8)
923 VBoxDD_DEFS += VBOX_VMM_TARGET_ARMV8
924 VBoxDD_SOURCES += \
925 Bus/DevPciGenericEcam.cpp \
926 EFI/DevEFI-armv8.cpp \
927 Gpio/DevPL061.cpp \
928 Misc/DevFlashCFI.cpp \
929 Misc/DevPL031.cpp \
930 Serial/DevPL011.cpp
931 endif
932
933 # --- Final bits, mostly libraries for order dependant linkers. ---
934
935 VBoxDD_LIBS += \
936 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
937 $(LIB_RUNTIME)
938 ifeq ($(KBUILD_TARGET),win)
939 VBoxDD_LIBS += \
940 $(LIB_DDU) \
941 $(PATH_STAGE_LIB)/VBoxDD2.lib
942 else
943 VBoxDD_LIBS += \
944 $(VBoxDDU_1_STAGE_TARGET) \
945 $(VBoxDD2_1_STAGE_TARGET)
946 endif
947
948 ifdef VBOX_WITH_NETFLT
949 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfigDll$(VBOX_SUFF_LIB)
950 endif
951
952 ifeq ($(KBUILD_TARGET),solaris)
953 VBoxDD_LIBS += adm
954 ifdef VBOX_WITH_SUID_WRAPPER
955 VBoxDD_LIBS += secdb
956 endif
957 ifdef VBOX_WITH_USB
958 VBoxDD_LIBS += aio
959 endif
960 endif
961
962
963 ifdef VBOX_WITH_DYNAMIC_DSDT
964 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
965 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
966
967 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
968 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
969 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
970
971 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
972
973 else # !VBOX_WITH_DYNAMIC_DSDT
974 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
975 VBoxDD_CLEAN += \
976 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
977 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
978 $(VBoxDD_0_OUTDIR)/vboxaml.aml.tmp \
979 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
980 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml \
981 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml.tmp \
982 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
983 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml \
984 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.tmp \
985 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.pre \
986 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,) \
987 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml,) \
988 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml.tmp,)
989 PC/ACPI/VBoxAcpi.cpp_DEPS = \
990 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
991 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
992 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
993 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,)
994
995 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
996 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
997 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
998 $(QUIET)$(MV) -f $@ [email protected]
999 $(QUIET)$(SED) -e "s/vboxaml_aml_code/AmlCode/g" \
1000 --output $@ [email protected]
1001 $(QUIET)$(RM) -f [email protected]
1002
1003 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
1004
1005 $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
1006 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1007 $(QUIET)$(RM) -f $@ [email protected]
1008 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
1009 $(QUIET)$(MV) -f $@ [email protected]
1010 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_standard_aml_code/AmlCodeSsdtStandard/g" \
1011 --output $@ [email protected]
1012 $(QUIET)$(RM) -f [email protected]
1013
1014
1015 vboxssdt_standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex
1016
1017 $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
1018 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1019 $(QUIET)$(RM) -f $@ [email protected] [email protected]
1020 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o [email protected] $<
1021 $(QUIET)$(SED) -e "s/<NL>/\n/g" \
1022 --output [email protected] [email protected]
1023 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ [email protected]
1024 $(QUIET)$(MV) -f $@ [email protected]
1025 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_cpuhotplug_aml_code/AmlCodeSsdtCpuHotPlug/g" \
1026 --output $@ [email protected]
1027 $(QUIET)$(RM) -f [email protected] [email protected] [email protected]
1028
1029
1030 vboxssdt_cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex
1031
1032 if defined(VBOX_WITH_TPM)
1033 $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex: $(PATH_SUB_CURRENT)/PC/vbox-tpm.dsl | $$(dir $$@)
1034 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1035 $(QUIET)$(RM) -f $@ [email protected]
1036 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
1037 $(QUIET)$(MV) -f $@ [email protected]
1038 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_tpm_aml_code/AmlCodeSsdtTpm/g" \
1039 --output $@ [email protected]
1040 $(QUIET)$(RM) -f [email protected]
1041
1042 vboxssdt_tpm.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex
1043 endif # !VBOX_WITH_TPM
1044
1045 endif # !VBOX_WITH_DYNAMIC_DSDT
1046 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
1047
1048 # For finding PCIInternal.h from VBox/pci.h.
1049 Bus/DevPCI.cpp_INCS = Bus
1050 Bus/DevPciIch9.cpp_INCS = Bus
1051 Bus/MsiCommon.cpp_INCS = Bus
1052 Bus/MsixCommon.cpp_INCS = Bus
1053 Bus/DevPciRaw.cpp_INCS = Bus
1054
1055 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
1056 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR) $(VBOX_GRAPHICS_INCS)
1057 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
1058
1059 $(call VBOX_SET_VER_INFO_DLL,VBoxDD,VirtualBox VMM Devices and Drivers) # (last!)
1060
1061
1062 ifdef VBOX_WITH_RAW_MODE
1063 #
1064 # VBoxDDRC (sysmod)
1065 #
1066 VBoxDDRC_TEMPLATE = VBoxRc
1067 ifeq ($(KBUILD_TARGET_ARCH),x86)
1068 VBoxDDRC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
1069 endif
1070 VBoxDDRC_DEFS = \
1071 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1072 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1073 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,)
1074 VBoxDDRC_INCS = build $(VBOX_GRAPHICS_INCS)
1075 VBoxDDRC_SOURCES = \
1076 Bus/DevPCI.cpp \
1077 Bus/DevPciIch9.cpp \
1078 Bus/MsiCommon.cpp \
1079 Bus/MsixCommon.cpp \
1080 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1081 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1082 EFI/DevSmc.cpp \
1083 Graphics/DevVGA.cpp \
1084 Input/DevPS2.cpp \
1085 Input/DevPS2K.cpp \
1086 Input/DevPS2M.cpp \
1087 PC/DevACPI.cpp \
1088 PC/DevIoApic.cpp \
1089 PC/DevPit-i8254.cpp \
1090 PC/DevPIC.cpp \
1091 PC/DevRTC.cpp \
1092 PC/DevDMA.cpp \
1093 PC/DevHPET.cpp \
1094 Storage/DevATA.cpp \
1095 Network/DevPCNet.cpp \
1096 Network/DevDP8390.cpp \
1097 Network/Dev3C501.cpp \
1098 Serial/DevSerial.cpp \
1099 Serial/DevOxPcie958.cpp \
1100 Serial/UartCore.cpp \
1101 Parallel/DevParallel.cpp \
1102 VMMDev/VMMDev.cpp \
1103 VMMDev/VMMDevTesting.cpp
1104
1105 VBoxDDRC_DEFS += $(VBOX_AUDIO_DEFS)
1106 VBoxDDRC_SOURCES += \
1107 Audio/DevHda.cpp \
1108 Audio/DevIchAc97.cpp
1109
1110 VBoxDDRC_DEFS += \
1111 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1112 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1113 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1114
1115 ifdef VBOX_WITH_E1000
1116 VBoxDDRC_DEFS += VBOX_WITH_E1000
1117 VBoxDDRC_SOURCES += \
1118 Network/DevE1000.cpp \
1119 Network/DevE1000Phy.cpp
1120 endif
1121
1122 ifdef VBOX_WITH_VIRTIO
1123 VBoxDDRC_DEFS += VBOX_WITH_VIRTIO
1124 VBoxDDRC_SOURCES += \
1125 VirtIO/VirtioCore.cpp \
1126 Network/DevVirtioNet.cpp
1127 endif
1128
1129 ifdef VBOX_WITH_HGSMI
1130 VBoxDDRC_DEFS += VBOX_WITH_HGSMI
1131 endif
1132 ifdef VBOX_WITH_WDDM
1133 VBoxDDRC_DEFS += VBOX_WITH_WDDM
1134 endif
1135 ifdef VBOX_WITH_VDMA
1136 VBoxDDRC_DEFS += VBOX_WITH_VDMA
1137 endif
1138 ifdef VBOXWDDM_WITH_VBVA
1139 VBoxDDRC_DEFS += VBOXWDDM_WITH_VBVA
1140 endif
1141 ifdef VBOX_WITH_VMSVGA
1142 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA
1143 VBoxDDRC_SOURCES += \
1144 Graphics/DevVGA-SVGA.cpp
1145 endif
1146 ifdef VBOX_WITH_VMSVGA3D
1147 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA3D
1148 endif
1149
1150 ifdef VBOX_WITH_VUSB
1151 VBoxDDRC_DEFS += VBOX_WITH_VUSB
1152 VBoxDDRC_SOURCES += \
1153 USB/DevOHCI.cpp
1154 endif
1155
1156 ifdef VBOX_WITH_USB
1157 VBoxDDRC_DEFS += VBOX_WITH_USB
1158 if defined(VBOX_WITH_EHCI_IMPL)
1159 VBoxDDRC_DEFS += VBOX_WITH_EHCI_IMPL
1160 VBoxDDRC_SOURCES += \
1161 USB/DevEHCI.cpp
1162 endif
1163 if defined(VBOX_WITH_XHCI_IMPL)
1164 VBoxDDRC_DEFS += VBOX_WITH_XHCI_IMPL
1165 VBoxDDRC_SOURCES += \
1166 USB/DevXHCI.cpp
1167 endif
1168 endif
1169
1170 ifdef VBOX_WITH_VIDEOHWACCEL
1171 VBoxDDRC_DEFS += VBOX_WITH_VIDEOHWACCEL
1172 endif
1173
1174 ifdef VBOX_WITH_AHCI
1175 VBoxDDRC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
1176 VBoxDDRC_SOURCES += \
1177 Storage/DevAHCI.cpp
1178 endif
1179
1180 ifdef VBOX_WITH_BUSLOGIC
1181 VBoxDDRC_DEFS += VBOX_WITH_BUSLOGIC
1182 VBoxDDRC_SOURCES += \
1183 Storage/DevBusLogic.cpp
1184 endif
1185
1186 ifdef VBOX_WITH_LSILOGIC
1187 VBoxDDRC_DEFS += VBOX_WITH_LSILOGIC
1188 VBoxDDRC_SOURCES += \
1189 Storage/DevLsiLogicSCSI.cpp
1190 endif
1191
1192 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1193 VBoxDDGC_DEFS += VBOX_WITH_NVME_IMPL
1194 VBoxDDGC_SOURCES += \
1195 Storage/DevNVMe.cpp
1196 endif
1197
1198 if1of ($(VBOX_LDR_FMT32), pe lx)
1199 VBoxDDRC_LIBS = \
1200 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1201 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1202 endif
1203 $(call VBOX_SET_VER_INFO_RC,VBoxDDRC,VirtualBox VMM Devices and Drivers$(COMMA) raw-mode) # last!
1204 endif # VBOX_WITH_RAW_MODE
1205
1206
1207 #
1208 # VBoxDD2 (shared object)
1209 #
1210 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
1211 VBoxDD2_DEFS = \
1212 IN_VBOXDD2 \
1213 $(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,) \
1214 $(if $(VBOX_WITH_VIRT_ARMV8),VBOX_VMM_TARGET_ARMV8,)
1215 VBoxDD2_INCS := \
1216 build \
1217 $(PATH_SUB_CURRENT)
1218 VBoxDD2_SOURCES = \
1219 build/VBoxDD2.cpp
1220 VBoxDD2_LIBS = \
1221 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1222 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1223 $(if $(VBOX_WITH_PXE_ROM), \
1224 $(if $(VBOX_WITH_INTEL_PXE), \
1225 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB), \
1226 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1227 $(LIB_RUNTIME)
1228 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1229 VBoxDD2_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
1230 if defined(VBOX_WITH_EFI) && !defined(VBOX_WITH_EFIFW_PACKING)
1231 VBoxDD_DEFS += VBOX_WITH_EFI_IN_DD2
1232 VBoxDD2_DEFS += VBOX_WITH_EFI
1233 VBoxDD2_SOURCES.x86 += EFI/DevEFI-binaries.asm
1234 VBoxDD2_SOURCES.amd64 += EFI/DevEFI-binaries.asm
1235 EFI/DevEFI-binaries.asm_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1236 EFI/DevEFI-binaries.asm_DEPS = \
1237 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1238 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1239
1240 VBoxDD2_SOURCES.arm64 += EFI/DevEFI-binaries.S
1241 EFI/DevEFI-binaries.S_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1242 EFI/DevEFI-binaries.S_DEPS = \
1243 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1244 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1245 ifdef VBOX_WITH_VIRT_ARMV8
1246 EFI/DevEFI-binaries.S_DEPS += \
1247 $(PATH_STAGE)/$(INST_BIN)VBoxEFIAArch32.fd \
1248 $(PATH_STAGE)/$(INST_BIN)VBoxEFIAArch64.fd
1249 endif
1250 endif
1251
1252 $(call VBOX_SET_VER_INFO_DLL,VBoxDD2,VirtualBox VMM Devices and Drivers 2) # (last!)
1253
1254 #
1255 # VBoxDDR0 (sysmod)
1256 #
1257 if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
1258 #
1259 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
1260 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
1261 #
1262 # Template used for gcc older than 4.6. (Strips away compiler options.)
1263 #
1264 TEMPLATE_VBoxDDR0OldGCC := VBoxDDR0OldGCC
1265 TEMPLATE_VBoxDDR0OldGCC_EXTENDS := VBoxR0
1266 TEMPLATE_VBoxDDR0OldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxDDR0OldGCC_EXTENDS)_CXXFLAGS))
1267
1268 VBoxDDR0_TEMPLATE = VBoxDDR0OldGCC
1269 else
1270 VBoxDDR0_TEMPLATE = VBoxR0
1271 endif
1272 VBoxDDR0_DEFS = \
1273 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1274 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1275 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
1276 IN_RT_R0 # - WTF is IN_RT_R0 doing here?
1277 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1278 VBoxDDR0_INCS = build $(VBOX_GRAPHICS_INCS)
1279 VBoxDDR0_INCS += $(VBOX_PATH_VMSVGA_DEVICE_INC)
1280 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1281 VBoxDDR0_SOURCES = \
1282 build/VBoxDDR0.cpp \
1283 Bus/DevPCI.cpp \
1284 Bus/DevPciIch9.cpp \
1285 Bus/MsiCommon.cpp \
1286 Bus/MsixCommon.cpp \
1287 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1288 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1289 EFI/DevSmc.cpp \
1290 EFI/DevFlash.cpp \
1291 EFI/FlashCore.cpp \
1292 Graphics/DevVGA.cpp \
1293 Input/DevPS2.cpp \
1294 Input/DevPS2K.cpp \
1295 Input/DevPS2M.cpp \
1296 PC/DevACPI.cpp \
1297 PC/DevIoApic.cpp \
1298 PC/DevPit-i8254.cpp \
1299 PC/DevPIC.cpp \
1300 PC/DevRTC.cpp \
1301 PC/DevDMA.cpp \
1302 PC/DevHPET.cpp \
1303 Storage/DevATA.cpp \
1304 Network/DevPCNet.cpp \
1305 Network/DevDP8390.cpp \
1306 Network/Dev3C501.cpp \
1307 Serial/DevSerial.cpp \
1308 Serial/DevOxPcie958.cpp \
1309 Serial/UartCore.cpp \
1310 Parallel/DevParallel.cpp \
1311 GIMDev/GIMDev.cpp \
1312 VMMDev/VMMDev.cpp \
1313 VMMDev/VMMDevTesting.cpp \
1314 Network/DrvDedicatedNic.cpp \
1315 $(if-expr 0,Network/DrvIntNet.cpp,) # no ring-0 driver support at the moment
1316
1317 ifdef VBOX_WITH_DTRACE_R0
1318 VBoxDDR0_USES += dtrace
1319 VBoxDDR0_SOURCES += build/VBoxDD.d
1320 endif
1321
1322 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1323
1324 VBoxDDR0_DEFS += \
1325 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
1326 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
1327 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
1328 $(if $(VBOXWDDM_WITH_VBVA),VBOXWDDM_WITH_VBVA,) \
1329 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1330 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1331 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1332
1333 VBoxDDR0_DEFS += $(VBOX_AUDIO_DEFS)
1334 VBoxDDR0_SOURCES += \
1335 Audio/DevHda.cpp \
1336 Audio/DevHdaStream.cpp \
1337 Audio/DevIchAc97.cpp
1338
1339 ifdef VBOX_WITH_E1000
1340 VBoxDDR0_DEFS += VBOX_WITH_E1000
1341 VBoxDDR0_SOURCES += \
1342 Network/DevE1000.cpp \
1343 Network/DevE1000Phy.cpp
1344 endif
1345
1346 ifdef VBOX_WITH_VIRTIO
1347 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1348 VBoxDDR0_SOURCES += \
1349 VirtIO/VirtioCore.cpp \
1350 Network/DevVirtioNet.cpp
1351 endif
1352
1353 if 0 #def VBOX_WITH_NETSHAPER - no ring-0 driver support at the moment.
1354 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1355 VBoxDDR0_SOURCES += \
1356 Network/DrvNetShaper.cpp
1357 endif
1358
1359 ifdef VBOX_WITH_VMSVGA
1360 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1361 VBoxDDR0_SOURCES += \
1362 Graphics/DevVGA-SVGA.cpp
1363 endif
1364 ifdef VBOX_WITH_VMSVGA3D
1365 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1366 endif
1367
1368 ifdef VBOX_WITH_VUSB
1369 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1370 VBoxDDR0_SOURCES += \
1371 USB/DevOHCI.cpp
1372 endif
1373 ifdef VBOX_WITH_USB
1374 VBoxDDR0_DEFS += VBOX_WITH_USB
1375 if defined(VBOX_WITH_EHCI_IMPL)
1376 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1377 VBoxDDR0_SOURCES += \
1378 USB/DevEHCI.cpp
1379 endif
1380 if defined(VBOX_WITH_XHCI_IMPL)
1381 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1382 VBoxDDR0_SOURCES += \
1383 USB/DevXHCI.cpp
1384 endif
1385 endif
1386
1387 ifdef VBOX_WITH_EFI
1388 VBoxDDR0_DEFS += VBOX_WITH_EFI
1389 VBoxDDR0_SOURCES += EFI/DevEFI.cpp
1390 endif
1391
1392 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1393 VBoxDDR0_SOURCES += \
1394 Bus/DevPciRaw.cpp
1395 endif
1396
1397 ifdef VBOX_WITH_AHCI
1398 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1399 VBoxDDR0_SOURCES += \
1400 Storage/DevAHCI.cpp
1401 endif
1402
1403 ifdef VBOX_WITH_BUSLOGIC
1404 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1405 VBoxDDR0_SOURCES += \
1406 Storage/DevBusLogic.cpp
1407 endif
1408
1409 ifdef VBOX_WITH_LSILOGIC
1410 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1411 VBoxDDR0_SOURCES += \
1412 Storage/DevLsiLogicSCSI.cpp
1413 endif
1414
1415 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1416 VBoxDDR0_DEFS += VBOX_WITH_NVME_IMPL
1417 VBoxDDR0_SOURCES += \
1418 Storage/DevNVMe.cpp
1419 endif
1420
1421 if defined (VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_SCSI)
1422 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO_SCSI
1423 VBoxDDR0_SOURCES += \
1424 Storage/DevVirtioSCSI.cpp
1425 endif
1426
1427 if defined(VBOX_WITH_TPM)
1428 VBoxDDR0_DEFS += VBOX_WITH_TPM
1429 VBoxDDR0_SOURCES += \
1430 Security/DevTpm.cpp
1431 endif
1432
1433 ifdef VBOX_WITH_HGSMI
1434 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1435 endif
1436 ifdef VBOX_WITH_VIDEOHWACCEL
1437 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1438 endif
1439
1440 if1of ($(VBOX_LDR_FMT), pe lx)
1441 VBoxDDR0_LIBS = \
1442 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
1443 endif
1444 VBoxDDR0_LIBS += \
1445 $(VBOX_LIB_SUPR0)
1446
1447 $(call VBOX_SET_VER_INFO_R0,VBoxDDR0,VirtualBox VMM Devices and Drivers$(COMMA) ring-0) # (last!)
1448
1449 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS
1450 # Wrapper kmod for VBoxDDR0.r0
1451 INSTALLS.linux += vbox_vboxddr0-src
1452 vbox_vboxddr0-src_INST = bin/src/vbox_vboxddr0/
1453 vbox_vboxddr0-src_SYMLINKS = \
1454 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1455 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1456 vbox_vboxddr0-src_SOURCES = \
1457 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxddr0.gmk=>Makefile \
1458 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.r0=>VBoxDDR0.r0 \
1459 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.debug=>VBoxDDR0.debug
1460 endif
1461
1462 #
1463 # Ring-0 Services (library, linked into VMMR0.r0)
1464 #
1465 ServicesR0_TEMPLATE = VBoxR0
1466 ServicesR0_DEFS = VBOX_IN_VMM IN_INTNET_R0 IN_RT_R0 $(VMM_COMMON_DEFS) \
1467 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1468 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1469 ServicesR0_SOURCES = \
1470 Network/SrvIntNetR0.cpp
1471 # $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1472 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1473
1474
1475 #
1476 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1477 #
1478 ifdef VBOX_WITH_TESTCASES
1479 PROGRAMS += tstIntNetR0
1480 tstIntNetR0_TEMPLATE = VBoxR3TstExe
1481 tstIntNetR0_DEFS = IN_INTNET_R0
1482 tstIntNetR0_SOURCES = \
1483 Network/testcase/tstIntNetR0.cpp
1484 ifneq ($(KBUILD_TARGET),win)
1485 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1486 endif
1487 endif
1488
1489
1490 #
1491 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1492 #
1493 ifdef VBOX_WITH_TESTCASES
1494 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1495 PROGRAMS += tstIntNetHardened-1
1496 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1497 tstIntNetHardened-1_NAME = tstIntNet-1
1498 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1499 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR="tstIntNet-1"
1500 else
1501 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1502 endif
1503 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
1504
1505 DLLS += tstIntNet-1
1506 tstIntNet-1_TEMPLATE = VBoxR3HardenedTstDll
1507 else
1508 PROGRAMS += tstIntNet-1
1509 tstIntNet-1_TEMPLATE = VBoxR3TstExe
1510 endif
1511 tstIntNet-1_SOURCES = \
1512 Network/testcase/tstIntNet-1.cpp \
1513 Network/Pcap.cpp
1514 endif
1515
1516
1517 #
1518 # EEPROM device unit test requires cppunit
1519 #
1520 if defined(VBOX_WITH_E1000) && defined(VBOX_WITH_TESTCASES)
1521 PROGRAMS += tstDevEEPROM
1522 tstDevEEPROM_TEMPLATE = VBoxR3TstExe
1523 tstDevEEPROM_SOURCES = \
1524 Network/testcase/tstDevEEPROM.cpp \
1525 Network/DevEEPROM.cpp
1526
1527 PROGRAMS += tstDevPhy
1528 tstDevPhy_TEMPLATE = VBoxR3TstExe
1529 tstDevPhy_DEFS = PHY_UNIT_TEST
1530 tstDevPhy_SOURCES = \
1531 Network/testcase/tstDevPhy.cpp \
1532 Network/DevE1000Phy.cpp
1533 endif
1534
1535 #
1536 # Apple SMC Utility.
1537 #
1538 ifdef VBOX_WITH_TESTCASES
1539 PROGRAMS.darwin += VBoxSmcUtil-darwin
1540 VBoxSmcUtil-darwin_TEMPLATE = VBoxR3TstExe
1541 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1542 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1543 endif
1544
1545 #
1546 # PDM device testcase framework.
1547 #
1548 ifdef VBOX_WITH_TESTCASES_TSTDEV
1549 PROGRAMS += tstDevice
1550 tstDevice_TEMPLATE = VBoxR3TstExe
1551 tstDevice_DEFS += IN_SUP_R3
1552 tstDevice_SOURCES = \
1553 testcase/tstDevice.cpp \
1554 testcase/tstDeviceR0.cpp \
1555 testcase/tstDeviceCfg.cpp \
1556 testcase/tstDevicePdmDevHlp.cpp \
1557 testcase/tstDevicePdmDevHlpR0.cpp \
1558 testcase/tstDevicePdmThread.cpp \
1559 testcase/tstDeviceSsmFuzz.cpp \
1560 testcase/tstDeviceSsmLoadDbg.cpp \
1561 testcase/tstDeviceIoFuzz.cpp
1562 endif
1563
1564endif # !VBOX_ONLY_EXTPACKS && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1565
1566
1567if defined(VBOX_WITH_EXTPACK) && defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1568 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL)
1569 DLLS += VBoxPciRawR3
1570 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1571 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1572 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawR3,PUEL Extension Pack - PCI Passthrough Device)
1573
1574 DLLS += VBoxPciRawDrv
1575 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1576 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1577 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawDrv,PUEL Extension Pack - PCI Passthrough Driver)
1578
1579 $(if-expr defined(VBOX_WITH_VBOXR0_AS_DLL),DLLS,SYSMODS) += VBoxPciRawR0
1580 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1581 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1582 $(call VBOX_SET_VER_INFO_R0,VBoxPciRawR0,PUEL Extension Pack - PCI Passthrough Driver$(COMMA) ring-0)
1583
1584 Bus/DevPciRaw.cpp_INCS = Bus
1585 endif
1586
1587 #
1588 # The NVMe Extension Pack Modules.
1589 #
1590 if defined(VBOX_WITH_NVME_IMPL)
1591 DLLS += VBoxNvmeR3
1592 VBoxNvmeR3_TEMPLATE = VBoxR3ExtPackPuel
1593 VBoxNvmeR3_SOURCES = \
1594 Storage/DevNVMe.cpp
1595 $(call VBOX_SET_VER_INFO_DLL,VBoxNvmeR3,PUEL Extension Pack - NVMe Device)
1596
1597 ifdef VBOX_WITH_R0_MODULES
1598 ifdef VBOX_WITH_VBOXR0_AS_DLL
1599 DLLS += VBoxNvmeR0
1600 else
1601 SYSMODS += VBoxNvmeR0
1602 endif
1603 VBoxNvmeR0_TEMPLATE = VBoxR0ExtPackPuel
1604 VBoxNvmeR0_SOURCES = \
1605 Storage/DevNVMe.cpp
1606 $(call VBOX_SET_VER_INFO_R0,VBoxNvmeR0,PUEL Extension Pack - NVMe Device$(COMMA) ring-0)
1607 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # Wrapper kmod for VBoxEhciR0.r0
1608 INSTALLS.linux += vbox_vboxnvmer0-src
1609 vbox_vboxnvmer0-src_INST = bin/src/vbox_vboxnvmer0/
1610 vbox_vboxnvmer0-src_SYMLINKS = \
1611 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1612 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1613 vbox_vboxnvmer0-src_SOURCES = \
1614 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxnvmer0.gmk=>Makefile \
1615 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.r0=>VBoxNvmeR0.r0 \
1616 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.debug=>VBoxNvmeR0.debug
1617 endif
1618 endif
1619
1620 ifdef VBOX_WITH_RAW_MODE
1621 SYSMODS += VBoxNvmeRC
1622 VBoxNvmeRC_TEMPLATE = VBoxRcExtPackPuel
1623 VBoxNvmeRC_SOURCES = \
1624 Storage/DevNVMe.cpp
1625 $(call VBOX_SET_VER_INFO_RC,VBoxNvmeRC,PUEL Extension Pack - NVMe Device$(COMMA) raw-mode)
1626 endif
1627
1628 # Hacky but MSI support *must* be enabled
1629 ifdef VBOX_WITH_MSI_DEVICES
1630 VBoxNvmeR3_DEFS += VBOX_WITH_MSI_DEVICES
1631 VBoxNvmeR0_DEFS += VBOX_WITH_MSI_DEVICES
1632 VBoxNvmeRC_DEFS += VBOX_WITH_MSI_DEVICES
1633 endif
1634
1635 endif
1636
1637
1638 #
1639 # The Intel PXE ROM.
1640 #
1641 INSTALLS += VBoxExtPackPuelInsRoms
1642 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1643 ifdef PXE_EXPERIMENTAL_BUILD_SETUP
1644 VBoxExtPackPuelInsRoms_SOURCES = $(PATH_OUT)/obj/NetBiosBin/NetBiosBin.rom=>PXE-Intel.rom
1645 else
1646 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1647 endif
1648endif # VBOX_WITH_EXTPACK_PUEL && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1649
1650
1651if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1652 #
1653 # Template used for VBoxSVGA3D. (Strips away compiler options.)
1654 #
1655 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1656 TEMPLATE_VBoxSVGA3D_EXTENDS := VBoxR3Dll
1657 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1658 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
1659 # -wd4777: glsl_shader.c(1542): warning C4777: 'sprintf' : format string '%u' requires an argument of type 'unsigned int', but variadic argument 2 has type 'DWORD'
1660 TEMPLATE_VBoxSVGA3D_CFLAGS.win = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS.win) \
1661 -wd4777
1662 endif
1663 ifeq ($(KBUILD_TARGET),darwin)
1664 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1665 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1666 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1667 else
1668 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1669 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1670 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1671 endif
1672 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_LDFLAGS.darwin) \
1673 -framework AppKit -framework OpenGL -framework IOKit
1674
1675
1676 #
1677 # The shader library used by the SVGA3D implementation.
1678 #
1679 DLLS += VBoxSVGA3D
1680 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1681 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1682 VBoxSVGA3D_DEFS = \
1683 __WINESRC__ \
1684 _REENTRANT \
1685 WINE_NOWINSOCK \
1686 VBOX_WITH_VMSVGA \
1687 VBOX_WITH_VMSVGA3D \
1688 _USE_MATH_DEFINES \
1689 VBOX_USING_WINDDK_W7_OR_LATER \
1690 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1691 IN_vmsvgashader_STATIC \
1692 IN_VMSVGA3D \
1693 VBOX_WINE_WITH_IPRT
1694 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1695 VBoxSVGA3D_DEFS += \
1696 WINE_UNICODE_API= \
1697 DLLDIR="" \
1698 BINDIR="" \
1699 LIB_TO_BINDIR="" \
1700 LIB_TO_DLLDIR="" \
1701 BIN_TO_DLLDIR="" \
1702 LIB_TO_DATADIR="" \
1703 BIN_TO_DATADIR=""
1704 else
1705 VBoxSVGA3D_DEFS += \
1706 WINE_UNICODE_API="" \
1707 DLLDIR=\"\" \
1708 BINDIR=\"\" \
1709 LIB_TO_BINDIR=\"\" \
1710 LIB_TO_DLLDIR=\"\" \
1711 BIN_TO_DLLDIR=\"\" \
1712 LIB_TO_DATADIR=\"\" \
1713 BIN_TO_DATADIR=\"\"
1714 endif
1715 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1716 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1717 endif
1718 VBoxSVGA3D_DEFS.x86 += __i386__
1719 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1720 VBoxSVGA3D_DEFS.win += \
1721 USE_WIN32_OPENGL \
1722 VBOX_WINE_WITHOUT_LIBWINE
1723 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1724 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1725 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1726 else
1727 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1728 endif
1729
1730 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1731 VBoxSVGA3D_DEFS.darwin += \
1732 __builtin_ms_va_list=va_list \
1733 __stdcall= \
1734 ms_abi=
1735 VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS)
1736 VBoxSVGA3D_INCS.win := \
1737 Graphics/shaderlib/libWineStub/include
1738 VBoxSVGA3D_INCS.linux := \
1739 Graphics/shaderlib/wine/include
1740 VBoxSVGA3D_INCS.darwin := \
1741 Graphics/ \
1742 Graphics/shaderlib/wine/include
1743 VBoxSVGA3D_SOURCES := \
1744 Graphics/shaderlib/glsl_shader.c \
1745 Graphics/shaderlib/shader.c \
1746 Graphics/shaderlib/shader_sm1.c \
1747 Graphics/shaderlib/shader_sm4.c \
1748 Graphics/shaderlib/shaderapi.c \
1749 Graphics/shaderlib/utils.c \
1750 Graphics/shaderlib/stateblock.c \
1751 Graphics/shaderlib/directx.c \
1752 Graphics/shaderlib/libWineStub/debug.c
1753 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1754 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1755 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1756 VBoxSVGA3D_LIBS += GL
1757 endif
1758 VBoxSVGA3D_LDFLAGS.darwin += \
1759 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1760 $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
1761 # -wd4100: unreferenced format parameter
1762 # -wd4204: nonstandard extension used : non-constant initializer
1763 # -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
1764 # -wd4305: 'function' : truncation from 'double' to 'GLclampf'
1765 VBoxSVGA3D_CFLAGS.win = -wd4100 -wd4204 -wd4245 -wd4305
1766 ifneq ($(KBUILD_TARGET),win)
1767 VBoxSVGA3D_CFLAGS += -Wno-unused-parameter -Wno-unused-function
1768 endif
1769
1770 #
1771 # The Objective C code needs to be separate since the shaderlib redefines most
1772 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1773 # functions directly. This module must be compiled for 10.7 or later, thus it
1774 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1775 #
1776 DLLS.darwin += VBoxSVGA3DObjC
1777 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1778 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS) IN_VMSVGA3DCOCOA
1779 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1780 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1781 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1782 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1783 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1784 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1785 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1786 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1787 -framework OpenGL
1788 VBoxSVGA3DObjC_SOURCES.darwin += \
1789 Graphics/DevVGA-SVGA3d-cocoa.m
1790
1791
1792endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1793
1794include $(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