VirtualBox

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

Last change on this file since 104448 was 103902, checked in by vboxsync, 7 months ago

VSCSI: Fixed a problem with potentially unset cbSector in READ CD command. Added more logging.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 56.1 KB
Line 
1# $Id: Makefile.kmk 103902 2024-03-18 17:11:22Z 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 Storage/Debug.cpp \
111 build/VBoxDDUDeps.cpp
112
113 ifdef VBOX_WITH_VSCSI_SSC
114 VBoxDDU_SOURCES += Storage/VSCSI/VSCSILunSsc.cpp
115 VBoxDDU_DEFS += VBOX_WITH_VSCSI_SSC
116 endif
117 VBoxDDU_LIBS = \
118 $(LIB_RUNTIME) \
119 $(PATH_STAGE_LIB)/StorageLib$(VBOX_SUFF_LIB)
120 VBoxDDU_LIBS.freebsd += \
121 geom
122 VBoxDDU_LIBS.solaris += \
123 efi
124 if defined(VBOX_WITH_USB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
125 VBoxDDU_SDKS.win += VBoxWinNewDevLib
126 VBoxDDU_LIBS += \
127 $(PATH_STAGE_LIB)/USBLib$(VBOX_SUFF_LIB)
128 VBoxDDU_LIBS.win += \
129 $(PATH_STAGE_LIB)/VBoxDrvCfgDll$(VBOX_SUFF_LIB)
130 endif
131 VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
132 if defined(VBOX_WITH_USB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
133 VBoxDDU_LDFLAGS.darwin += -framework IOKit
134 endif
135
136 VBoxDDU_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
137 $(call VBOX_SET_VER_INFO_DLL,VBoxDDU,VirtualBox VMM Devices and Drivers Utilities)
138
139
140endif # VBOX_ONLY_EXTPACKS
141if !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != "" # Goes on almost to the end of the file.
142
143
144 #
145 # VBoxDD (shared object)
146 #
147 if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
148 #
149 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
150 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
151 #
152 # Template used for gcc older than 4.6. (Strips away compiler options.)
153 #
154 TEMPLATE_VBoxDDOldGCC := VBoxDDOldGCC
155 TEMPLATE_VBoxDDOldGCC_EXTENDS := VBoxR3DllWarnNoPic
156 TEMPLATE_VBoxDDOldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxDDOldGCC_EXTENDS)_CXXFLAGS))
157
158 VBoxDD_TEMPLATE = VBoxDDOldGCC
159 else
160 VBoxDD_TEMPLATE = VBoxR3DllWarnNoPic
161 endif
162 VBoxDD_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBoxNtDll
163 Storage/DrvHostDVD.cpp_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK)
164 VBoxDD_INCS = \
165 build \
166 $(VBOX_GRAPHICS_INCS)
167
168 ifndef VBOX_WITH_LIBSLIRP
169 VBoxDD_INCS += Network/slirp
170 endif
171 VBoxDD_DEFS = \
172 VBOX_HGCM_HOST_CODE \
173 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
174 $(if $(VBOX_BIOS_DMI_FALLBACK),VBOX_BIOS_DMI_FALLBACK,) \
175 VBOX_WITH_DMI_CHASSIS \
176 VBOX_WITH_DMI_OEMSTRINGS \
177 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
178 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
179 $(if $(VBOX_WITH_INTNET_SERVICE_IN_R3),VBOX_WITH_INTNET_SERVICE_IN_R3,)
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 ifdef VBOX_WITHOUT_KEYBOARD_HID_CC_DC_PASSTHROUGH
531 VBoxDD_DEFS += VBOX_DISABLE_HID_CC_DC_PASSTHROUGH
532 endif # VBOX_WITHOUT_KEYBOARD_HID_CC_DC_PASSTHROUGH
533
534 # --- Networking bits. ---
535
536 ifdef VBOX_WITH_INIP
537 ifndef LWIP_SOURCES
538 include $(PATH_SUB_CURRENT)/Network/lwip-new/Config.kmk
539 endif
540 VBoxDD_DEFS += VBOX_WITH_INIP
541 VBoxDD_SOURCES += \
542 Network/DevINIP.cpp \
543 $(addprefix Network/lwip-new/,$(LWIP_SOURCES))
544 VBoxDD_INCS += \
545 Network \
546 $(addprefix Network/lwip-new/,$(LWIP_INCS))
547 endif # VBOX_WITH_INIP
548
549 ifdef VBOX_WITH_E1000
550 VBoxDD_DEFS += VBOX_WITH_E1000
551 VBoxDD_SOURCES += \
552 Network/DevE1000.cpp \
553 Network/DevE1000Phy.cpp \
554 Network/DevEEPROM.cpp
555 endif
556
557 ifdef VBOX_WITH_VIRTIO
558 VBoxDD_DEFS += VBOX_WITH_VIRTIO
559 VBoxDD_SOURCES += \
560 VirtIO/VirtioCore.cpp \
561 Network/DevVirtioNet.cpp
562 endif
563
564
565 ifdef VBOX_WITH_UDPTUNNEL
566 VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
567 VBoxDD_SOURCES += \
568 Network/DrvUDPTunnel.cpp
569 endif
570
571 ifdef VBOX_WITH_VDE
572 VBoxDD_DEFS += VBOX_WITH_VDE
573 VBoxDD_SOURCES += \
574 Network/DrvVDE.cpp \
575 Network/VDEPlug.cpp
576 endif
577
578 ifdef VBOX_WITH_NETSHAPER
579 VBoxDD_DEFS += VBOX_WITH_NETSHAPER
580 VBoxDD_SOURCES += \
581 Network/DrvNetShaper.cpp
582 endif
583
584 ifdef VBOX_WITH_VMNET
585 VBoxDD_DEFS.darwin += VBOX_WITH_VMNET
586 VBoxDD_SOURCES.darwin += \
587 Network/DrvVMNet.m
588 VBoxDD_LDFLAGS.darwin += -framework vmnet
589 endif
590
591 if defined(VBOX_WITH_CLOUD_NET) && defined(VBOX_WITH_LIBSSH)
592 VBoxDD_SDKS += VBoxLibSsh VBoxZlib VBoxOpenSsl
593 VBoxDD_DEFS += VBOX_WITH_CLOUD_NET
594 VBoxDD_SOURCES += \
595 Network/DrvCloudTunnel.cpp
596
597 VBoxDD_SOURCES += \
598 $(VBoxDD_0_OUTDIR)/VBoxLibSshLazyLoad.asm
599 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/VBoxLibSshLazyLoad.asm
600 $$(VBoxDD_0_OUTDIR)/VBoxLibSshLazyLoad.asm: $(PATH_SUB_CURRENT)/Network/VBoxLibSsh.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
601 $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxDD,$(filter %.def, $^),$@)
602 $(QUIET)$(RM) -f -- "$@"
603 $(VBOX_DEF_2_LAZY_LOAD) --explicit-load-function --library VBoxLibSsh --output "$@" $(filter %.def, $^)
604 endif
605
606 # --- Storage bits. ---
607
608 ifdef VBOX_WITH_AHCI
609 VBoxDD_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
610 VBoxDD_SOURCES += \
611 Storage/DevAHCI.cpp
612 endif
613
614 ifdef VBOX_WITH_BUSLOGIC
615 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
616 VBoxDD_SOURCES += \
617 Storage/DevBusLogic.cpp
618 endif
619
620 ifdef VBOX_WITH_LSILOGIC
621 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
622 VBoxDD_SOURCES += \
623 Storage/DevLsiLogicSCSI.cpp
624 endif
625
626 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
627 VBoxDD_DEFS += VBOX_WITH_NVME_IMPL
628 VBoxDD_SOURCES += \
629 Storage/DevNVMe.cpp
630 endif
631
632 if defined(VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_SCSI)
633 VBoxDD_DEFS += VBOX_WITH_VIRTIO_SCSI
634 VBoxDD_SOURCES += \
635 Storage/DevVirtioSCSI.cpp
636 endif
637
638 if defined(VBOX_WITH_TPM)
639 VBoxDD_DEFS += VBOX_WITH_TPM
640 VBoxDD_SOURCES += \
641 Security/DevTpm.cpp \
642 Security/DrvTpmEmu.cpp
643
644 VBoxDD_SOURCES.linux += \
645 Security/DrvTpmHost.cpp
646
647 VBoxDD_SOURCES.win += \
648 Security/DrvTpmHost.cpp
649
650 if defined(VBOX_WITH_LIBTPMS)
651 VBoxDD_SDKS += VBoxLibTpms
652 VBoxDD_DEFS += VBOX_WITH_LIBTPMS
653 VBoxDD_SOURCES += \
654 Security/DrvTpmEmuTpms.cpp
655 endif
656 endif
657
658 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
659 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
660 endif
661
662 ifdef VBOX_WITH_SCSI
663 VBoxDD_DEFS += VBOX_WITH_SCSI
664 VBoxDD_SOURCES += \
665 Storage/DrvSCSI.cpp
666 endif
667
668 ifdef VBOX_WITH_ISCSI
669 $(eval $(call def_vbox_lwip_flags, \
670 VBoxDD, Storage/DrvVD.cpp, Network/lwip-new))
671 endif
672
673 ifdef VBOX_WITH_DRV_DISK_INTEGRITY
674 VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
675 VBoxDD_SOURCES += \
676 Storage/DrvDiskIntegrity.cpp \
677 Storage/DrvRamDisk.cpp
678 endif
679
680 ifdef VBOX_WITH_EFI
681 VBoxDD_DEFS += VBOX_WITH_EFI
682 VBoxDD_SOURCES += EFI/DevEFI.cpp
683 endif
684
685 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
686 VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
687 VBoxDD_SOURCES += \
688 Bus/DevPciRaw.cpp \
689 Bus/DrvPciRaw.cpp
690 endif
691
692 ifdef VBOX_WITH_MSI_DEVICES
693 VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
694 endif
695
696 ifdef VBOX_WITH_DYNAMIC_DSDT
697 VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
698 endif
699
700 # --- Audio bits (see also VBOX_AUDIO_DEFS in ./Config.kmk). ---
701
702 VBoxDD_DEFS += $(VBOX_AUDIO_DEFS)
703 VBoxDD_SOURCES += \
704 Audio/DevIchAc97.cpp \
705 Audio/DevSB16.cpp \
706 Audio/DevHda.cpp \
707 Audio/DevHdaCodec.cpp \
708 Audio/DevHdaStream.cpp \
709 Audio/AudioHlp.cpp \
710 Audio/AudioMixBuffer.cpp \
711 Audio/AudioMixer.cpp \
712 Audio/DrvAudio.cpp \
713 Audio/DrvHostAudioNull.cpp
714
715 if defined(VBOX_WITH_AUDIO_DEBUG) || defined(VBOX_WITH_AUDIO_VALIDATIONKIT)
716 VBoxDD_SOURCES += \
717 Audio/AudioTest.cpp \
718 Audio/AudioTestService.cpp \
719 Audio/AudioTestServiceTcp.cpp \
720 Audio/AudioTestServiceProtocol.cpp
721 endif
722
723 ifdef VBOX_WITH_AUDIO_DEBUG
724 VBoxDD_DEFS += VBOX_WITH_AUDIO_DEBUG
725 VBoxDD_SOURCES += \
726 Audio/DrvHostAudioDebug.cpp
727 endif
728
729 ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
730 VBoxDD_DEFS += VBOX_WITH_AUDIO_VALIDATIONKIT
731 VBoxDD_SOURCES += \
732 Audio/DrvHostAudioValidationKit.cpp
733 endif
734
735 ifeq ($(KBUILD_TARGET),darwin)
736 VBoxDD_SOURCES += \
737 Audio/DrvHostAudioCoreAudio.cpp \
738 Audio/DrvHostAudioCoreAudioAuth.mm
739 endif
740
741 ifeq ($(KBUILD_TARGET),win)
742 VBoxDD_SOURCES += \
743 Audio/DrvHostAudioDSound.cpp \
744 Audio/DrvHostAudioWasApi.cpp
745 ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
746 VBoxDD_DEFS += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
747 VBoxDD_SOURCES += \
748 Audio/DrvHostAudioDSoundMMNotifClient.cpp
749 endif
750 endif
751
752 ifdef VBOX_WITH_AUDIO_OSS
753 VBoxDD_DEFS += VBOX_WITH_AUDIO_OSS
754 VBoxDD_SOURCES += \
755 Audio/DrvHostAudioOss.cpp
756 endif
757
758 ifdef VBOX_WITH_AUDIO_ALSA
759 VBoxDD_DEFS += VBOX_WITH_AUDIO_ALSA
760 VBoxDD_SOURCES += \
761 Audio/DrvHostAudioAlsa.cpp \
762 Audio/DrvHostAudioAlsaStubs.cpp
763 endif
764
765 ifdef VBOX_WITH_AUDIO_PULSE
766 VBoxDD_DEFS += VBOX_WITH_AUDIO_PULSE
767 VBoxDD_SOURCES += \
768 Audio/DrvHostAudioPulseAudio.cpp \
769 Audio/DrvHostAudioPulseAudioStubs.cpp
770 endif
771
772 ifdef VBOX_WITH_LIBSLIRP
773 VBoxDD_LIBS += $(PATH_STAGE_LIB)/VBox-libslirp$(VBOX_SUFF_LIB)
774 VBoxDD_LIBS.darwin += resolv
775 VBoxDD_DEFS += VBOX_WITH_LIBSLIRP
776 VBoxDD_SOURCES += \
777 Network/DrvNATlibslirp.cpp
778 Network/DrvNATlibslirp.cpp_INCS += \
779 $(PATH_ROOT)/src/libs/libslirp-4.7.0/src \
780 $(PATH_OUT)/obj/VBox-libslirp
781 endif
782
783 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
784 ifndef VBOX_WITH_LIBSLIRP
785 VBOX_SLIRP_SOURCES = \
786 Network/DrvNAT.cpp \
787 Network/slirp/bootp.c \
788 Network/slirp/debug.c \
789 Network/slirp/ip_icmp.c \
790 Network/slirp/ip_input.c \
791 Network/slirp/ip_output.c \
792 Network/slirp/misc.c \
793 Network/slirp/sbuf.c \
794 Network/slirp/slirp.c \
795 Network/slirp/slirp_dns.c \
796 Network/slirp/socket.c \
797 Network/slirp/tcp_input.c \
798 Network/slirp/tcp_output.c \
799 Network/slirp/tcp_subr.c \
800 Network/slirp/tcp_timer.c \
801 Network/slirp/udp.c \
802 Network/slirp/hostres.c \
803 Network/slirp/dnsproxy/hash.c \
804 Network/slirp/tftp.c \
805 Network/slirp/dnsproxy/dnsproxy.c
806
807 ifeq ($(KBUILD_TARGET),win)
808 VBOX_SLIRP_SOURCES += Network/slirp/ip_icmpwin.c
809 else ifneq ($(KBUILD_TARGET),darwin)
810 # helper for debugging unprivileged
811 # Network/slirp/ip_icmp.c_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
812 # VBOX_SLIRP_SOURCES += ../NetworkServices/NAT/getrawsock.c
813 endif
814
815 ifneq ($(KBUILD_TARGET),win)
816 VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
817 endif
818
819 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
820 VBOX_SLIRP_BSD_SOURCES += \
821 Network/slirp/bsd/kern/kern_mbuf.c \
822 Network/slirp/bsd/kern/uipc_mbuf.c \
823 Network/slirp/bsd/kern/uipc_mbuf2.c \
824 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
825 VBOX_SLIRP_ALIAS_SOURCES = \
826 Network/slirp/libalias/alias.c \
827 Network/slirp/libalias/alias_db.c \
828 Network/slirp/libalias/alias_mod.c \
829 Network/slirp/libalias/alias_proxy.c \
830 Network/slirp/libalias/alias_ftp.c \
831 Network/slirp/libalias/alias_nbt.c \
832 Network/slirp/libalias/alias_util.c
833
834 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
835 # $(file)_DEFS or clean the code disabled with this definition.
836 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER = 1
837
838 # dump memory related operations.
839 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
840
841 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
842 define def_vbox_slirp_cflags
843 $(file)_DEFS += \
844 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
845 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
846 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
847 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
848 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
849 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
850 $(file)_INCS += \
851 $(1)/slirp/bsd/sys \
852 $(1)/slirp/bsd/sys/sys \
853 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
854 $(1)/slirp/bsd/netinet \
855 $(1)/slirp \
856 $(1)/slirp/libalias
857 ifeq ($(KBUILD_TARGET),win)
858 $(file)_CFLAGS = -wd4018
859 else
860 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
861 endif
862 endef
863
864 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
865
866 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
867 define def_vbox_slirp_alias_cflags
868 $(file)_DEFS += VBOX_SLIRP_ALIAS \
869 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
870 $(file)_INCS += \
871 $(1)/slirp/libalias \
872 $(1)/slirp \
873 $(1)/slirp/dnsproxy
874 ifneq ($(KBUILD_TARGET),win)
875 $(file)_CFLAGS += -Wno-shadow
876 endif
877 endef
878 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
879 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
880
881 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
882 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
883 define def_vbox_slirp_bsd_cflags
884 $(file)_DEFS += VBOX_SLIRP_BSD
885 $(file)_INCS += $(1)/slirp/dnsproxy
886 endef
887 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
888 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
889 endif
890
891
892 # --- OS specific driver hacks. ---
893
894 ifeq ($(KBUILD_TARGET),freebsd)
895 VBoxDD_SOURCES.freebsd += Network/DrvTAP.cpp
896 endif # freebsd
897
898 VBoxDD_SOURCES.linux += \
899 Network/DrvTAP.cpp \
900 Parallel/DrvHostParallel.cpp
901
902 ifeq ($(KBUILD_TARGET),solaris)
903 ifdef VBOX_WITH_SUID_WRAPPER
904 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
905 endif
906 endif
907
908 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
909 VBoxDD_SOURCES.win += \
910 Parallel/DrvHostParallel.cpp
911
912 ifdef VBOX_WITH_VIRTUALKD
913 VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
914 VBoxDD_SOURCES.win += \
915 Misc/DevVirtualKD.cpp
916 endif
917
918 if defined(VBOX_WITH_NETFLT)
919 VBoxDD_DEFS += VBOX_WITH_NETFLT
920 if defined(VBOX_NETFLT_ONDEMAND_BIND)
921 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
922 endif
923 endif
924
925 # --- ARMv8 bits. ---
926 if defined(VBOX_WITH_VIRT_ARMV8)
927 VBoxDD_DEFS += VBOX_WITH_VIRT_ARMV8
928 VBoxDD_SOURCES += \
929 Bus/DevPciGenericEcam.cpp \
930 EFI/DevEFI-armv8.cpp \
931 Gpio/DevPL061.cpp \
932 Gpio/DrvGpioButton.cpp \
933 Misc/DevFlashCFI.cpp \
934 Misc/DevPL031.cpp \
935 Misc/DevPlatform.cpp \
936 Serial/DevPL011.cpp
937 endif
938
939 # --- Final bits, mostly libraries for order dependant linkers. ---
940
941 VBoxDD_LIBS += \
942 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
943 $(LIB_RUNTIME)
944 ifeq ($(KBUILD_TARGET),win)
945 VBoxDD_LIBS += \
946 $(LIB_DDU) \
947 $(PATH_STAGE_LIB)/VBoxDD2.lib
948 else
949 VBoxDD_LIBS += \
950 $(VBoxDDU_1_STAGE_TARGET) \
951 $(VBoxDD2_1_STAGE_TARGET)
952 endif
953
954 ifdef VBOX_WITH_NETFLT
955 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfigDll$(VBOX_SUFF_LIB)
956 endif
957
958 ifeq ($(KBUILD_TARGET),solaris)
959 VBoxDD_LIBS += adm
960 ifdef VBOX_WITH_SUID_WRAPPER
961 VBoxDD_LIBS += secdb
962 endif
963 ifdef VBOX_WITH_USB
964 VBoxDD_LIBS += aio
965 endif
966 endif
967
968
969 ifdef VBOX_WITH_DYNAMIC_DSDT
970 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
971 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
972
973 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
974 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
975 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
976
977 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
978
979 else # !VBOX_WITH_DYNAMIC_DSDT
980 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
981 VBoxDD_CLEAN += \
982 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
983 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
984 $(VBoxDD_0_OUTDIR)/vboxaml.aml.tmp \
985 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
986 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml \
987 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml.tmp \
988 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
989 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml \
990 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.tmp \
991 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.pre \
992 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,) \
993 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml,) \
994 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml.tmp,)
995 PC/ACPI/VBoxAcpi.cpp_DEPS = \
996 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
997 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
998 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
999 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,)
1000
1001 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
1002 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1003 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
1004 $(QUIET)$(MV) -f $@ $@.tmp
1005 $(QUIET)$(SED) -e "s/vboxaml_aml_code/AmlCode/g" \
1006 --output $@ $@.tmp
1007 $(QUIET)$(RM) -f $@.tmp
1008
1009 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
1010
1011 $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
1012 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1013 $(QUIET)$(RM) -f $@ $@.tmp
1014 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
1015 $(QUIET)$(MV) -f $@ $@.tmp
1016 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_standard_aml_code/AmlCodeSsdtStandard/g" \
1017 --output $@ $@.tmp
1018 $(QUIET)$(RM) -f $@.tmp
1019
1020
1021 vboxssdt_standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex
1022
1023 $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
1024 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1025 $(QUIET)$(RM) -f $@ $@.tmp $@.pre
1026 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o $@.pre $<
1027 $(QUIET)$(SED) -e "s/<NL>/\n/g" \
1028 --output $@.pre1 $@.pre
1029 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $@.pre1
1030 $(QUIET)$(MV) -f $@ $@.tmp
1031 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_cpuhotplug_aml_code/AmlCodeSsdtCpuHotPlug/g" \
1032 --output $@ $@.tmp
1033 $(QUIET)$(RM) -f $@.tmp $@.pre $@.pre1
1034
1035
1036 vboxssdt_cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex
1037
1038 if defined(VBOX_WITH_TPM)
1039 $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex: $(PATH_SUB_CURRENT)/PC/vbox-tpm.dsl | $$(dir $$@)
1040 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1041 $(QUIET)$(RM) -f $@ $@.tmp
1042 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
1043 $(QUIET)$(MV) -f $@ $@.tmp
1044 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_tpm_aml_code/AmlCodeSsdtTpm/g" \
1045 --output $@ $@.tmp
1046 $(QUIET)$(RM) -f $@.tmp
1047
1048 vboxssdt_tpm.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex
1049 endif # !VBOX_WITH_TPM
1050
1051 endif # !VBOX_WITH_DYNAMIC_DSDT
1052 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
1053
1054 # For finding PCIInternal.h from VBox/pci.h.
1055 Bus/DevPCI.cpp_INCS = Bus
1056 Bus/DevPciIch9.cpp_INCS = Bus
1057 Bus/MsiCommon.cpp_INCS = Bus
1058 Bus/MsixCommon.cpp_INCS = Bus
1059 Bus/DevPciRaw.cpp_INCS = Bus
1060
1061 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
1062 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR) $(VBOX_GRAPHICS_INCS)
1063 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
1064
1065 $(call VBOX_SET_VER_INFO_DLL,VBoxDD,VirtualBox VMM Devices and Drivers) # (last!)
1066
1067
1068 ifdef VBOX_WITH_RAW_MODE
1069 #
1070 # VBoxDDRC (sysmod)
1071 #
1072 VBoxDDRC_TEMPLATE = VBoxRc
1073 ifeq ($(KBUILD_TARGET_ARCH),x86)
1074 VBoxDDRC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
1075 endif
1076 VBoxDDRC_DEFS = \
1077 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1078 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1079 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,)
1080 VBoxDDRC_INCS = build $(VBOX_GRAPHICS_INCS)
1081 VBoxDDRC_SOURCES = \
1082 Bus/DevPCI.cpp \
1083 Bus/DevPciIch9.cpp \
1084 Bus/MsiCommon.cpp \
1085 Bus/MsixCommon.cpp \
1086 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1087 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1088 EFI/DevSmc.cpp \
1089 Graphics/DevVGA.cpp \
1090 Input/DevPS2.cpp \
1091 Input/DevPS2K.cpp \
1092 Input/DevPS2M.cpp \
1093 PC/DevACPI.cpp \
1094 PC/DevIoApic.cpp \
1095 PC/DevPit-i8254.cpp \
1096 PC/DevPIC.cpp \
1097 PC/DevRTC.cpp \
1098 PC/DevDMA.cpp \
1099 PC/DevHPET.cpp \
1100 Storage/DevATA.cpp \
1101 Network/DevPCNet.cpp \
1102 Network/DevDP8390.cpp \
1103 Network/Dev3C501.cpp \
1104 Serial/DevSerial.cpp \
1105 Serial/DevOxPcie958.cpp \
1106 Serial/UartCore.cpp \
1107 Parallel/DevParallel.cpp \
1108 VMMDev/VMMDev.cpp \
1109 VMMDev/VMMDevTesting.cpp
1110
1111 VBoxDDRC_DEFS += $(VBOX_AUDIO_DEFS)
1112 VBoxDDRC_SOURCES += \
1113 Audio/DevHda.cpp \
1114 Audio/DevIchAc97.cpp
1115
1116 VBoxDDRC_DEFS += \
1117 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1118 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1119 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1120
1121 ifdef VBOX_WITH_E1000
1122 VBoxDDRC_DEFS += VBOX_WITH_E1000
1123 VBoxDDRC_SOURCES += \
1124 Network/DevE1000.cpp \
1125 Network/DevE1000Phy.cpp
1126 endif
1127
1128 ifdef VBOX_WITH_VIRTIO
1129 VBoxDDRC_DEFS += VBOX_WITH_VIRTIO
1130 VBoxDDRC_SOURCES += \
1131 VirtIO/VirtioCore.cpp \
1132 Network/DevVirtioNet.cpp
1133 endif
1134
1135 ifdef VBOX_WITH_HGSMI
1136 VBoxDDRC_DEFS += VBOX_WITH_HGSMI
1137 endif
1138 ifdef VBOX_WITH_WDDM
1139 VBoxDDRC_DEFS += VBOX_WITH_WDDM
1140 endif
1141 ifdef VBOX_WITH_VDMA
1142 VBoxDDRC_DEFS += VBOX_WITH_VDMA
1143 endif
1144 ifdef VBOXWDDM_WITH_VBVA
1145 VBoxDDRC_DEFS += VBOXWDDM_WITH_VBVA
1146 endif
1147 ifdef VBOX_WITH_VMSVGA
1148 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA
1149 VBoxDDRC_SOURCES += \
1150 Graphics/DevVGA-SVGA.cpp
1151 endif
1152 ifdef VBOX_WITH_VMSVGA3D
1153 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA3D
1154 endif
1155
1156 ifdef VBOX_WITH_VUSB
1157 VBoxDDRC_DEFS += VBOX_WITH_VUSB
1158 VBoxDDRC_SOURCES += \
1159 USB/DevOHCI.cpp
1160 endif
1161
1162 ifdef VBOX_WITH_USB
1163 VBoxDDRC_DEFS += VBOX_WITH_USB
1164 if defined(VBOX_WITH_EHCI_IMPL)
1165 VBoxDDRC_DEFS += VBOX_WITH_EHCI_IMPL
1166 VBoxDDRC_SOURCES += \
1167 USB/DevEHCI.cpp
1168 endif
1169 if defined(VBOX_WITH_XHCI_IMPL)
1170 VBoxDDRC_DEFS += VBOX_WITH_XHCI_IMPL
1171 VBoxDDRC_SOURCES += \
1172 USB/DevXHCI.cpp
1173 endif
1174 endif
1175
1176 ifdef VBOX_WITH_VIDEOHWACCEL
1177 VBoxDDRC_DEFS += VBOX_WITH_VIDEOHWACCEL
1178 endif
1179
1180 ifdef VBOX_WITH_AHCI
1181 VBoxDDRC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
1182 VBoxDDRC_SOURCES += \
1183 Storage/DevAHCI.cpp
1184 endif
1185
1186 ifdef VBOX_WITH_BUSLOGIC
1187 VBoxDDRC_DEFS += VBOX_WITH_BUSLOGIC
1188 VBoxDDRC_SOURCES += \
1189 Storage/DevBusLogic.cpp
1190 endif
1191
1192 ifdef VBOX_WITH_LSILOGIC
1193 VBoxDDRC_DEFS += VBOX_WITH_LSILOGIC
1194 VBoxDDRC_SOURCES += \
1195 Storage/DevLsiLogicSCSI.cpp
1196 endif
1197
1198 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1199 VBoxDDGC_DEFS += VBOX_WITH_NVME_IMPL
1200 VBoxDDGC_SOURCES += \
1201 Storage/DevNVMe.cpp
1202 endif
1203
1204 if1of ($(VBOX_LDR_FMT32), pe lx)
1205 VBoxDDRC_LIBS = \
1206 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1207 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1208 endif
1209 $(call VBOX_SET_VER_INFO_RC,VBoxDDRC,VirtualBox VMM Devices and Drivers$(COMMA) raw-mode) # last!
1210 endif # VBOX_WITH_RAW_MODE
1211
1212
1213 #
1214 # VBoxDD2 (shared object)
1215 #
1216 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
1217 VBoxDD2_DEFS = \
1218 IN_VBOXDD2 \
1219 $(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,) \
1220 $(if $(VBOX_WITH_VIRT_ARMV8),VBOX_WITH_VIRT_ARMV8,)
1221 VBoxDD2_INCS := \
1222 build \
1223 $(PATH_SUB_CURRENT)
1224 VBoxDD2_SOURCES = \
1225 build/VBoxDD2.cpp
1226 VBoxDD2_LIBS = \
1227 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1228 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1229 $(if $(VBOX_WITH_PXE_ROM), \
1230 $(if $(VBOX_WITH_INTEL_PXE), \
1231 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB), \
1232 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1233 $(LIB_RUNTIME)
1234 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1235 VBoxDD2_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
1236 if defined(VBOX_WITH_EFI) && !defined(VBOX_WITH_EFIFW_PACKING)
1237 VBoxDD_DEFS += VBOX_WITH_EFI_IN_DD2
1238 VBoxDD2_DEFS += VBOX_WITH_EFI
1239 VBoxDD2_SOURCES.x86 += EFI/DevEFI-binaries.asm
1240 VBoxDD2_SOURCES.amd64 += EFI/DevEFI-binaries.asm
1241 EFI/DevEFI-binaries.asm_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1242 EFI/DevEFI-binaries.asm_DEPS = \
1243 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1244 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1245
1246 VBoxDD2_SOURCES.arm64 += EFI/DevEFI-binaries.S
1247 EFI/DevEFI-binaries.S_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1248 EFI/DevEFI-binaries.S_DEPS = \
1249 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1250 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1251 ifdef VBOX_WITH_VIRT_ARMV8
1252 EFI/DevEFI-binaries.S_DEPS += \
1253 $(PATH_STAGE)/$(INST_BIN)VBoxEFIAArch32.fd \
1254 $(PATH_STAGE)/$(INST_BIN)VBoxEFIAArch64.fd
1255 endif
1256 endif
1257
1258 $(call VBOX_SET_VER_INFO_DLL,VBoxDD2,VirtualBox VMM Devices and Drivers 2) # (last!)
1259
1260 #
1261 # VBoxDDR0 (sysmod)
1262 #
1263 if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
1264 #
1265 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
1266 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
1267 #
1268 # Template used for gcc older than 4.6. (Strips away compiler options.)
1269 #
1270 TEMPLATE_VBoxDDR0OldGCC := VBoxDDR0OldGCC
1271 TEMPLATE_VBoxDDR0OldGCC_EXTENDS := VBoxR0
1272 TEMPLATE_VBoxDDR0OldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxDDR0OldGCC_EXTENDS)_CXXFLAGS))
1273
1274 VBoxDDR0_TEMPLATE = VBoxDDR0OldGCC
1275 else
1276 VBoxDDR0_TEMPLATE = VBoxR0
1277 endif
1278 VBoxDDR0_DEFS = \
1279 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1280 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1281 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
1282 IN_RT_R0 # - WTF is IN_RT_R0 doing here?
1283 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1284 VBoxDDR0_INCS = build $(VBOX_GRAPHICS_INCS)
1285 VBoxDDR0_INCS += $(VBOX_PATH_VMSVGA_DEVICE_INC)
1286 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1287 VBoxDDR0_SOURCES = \
1288 build/VBoxDDR0.cpp \
1289 Bus/DevPCI.cpp \
1290 Bus/DevPciIch9.cpp \
1291 Bus/MsiCommon.cpp \
1292 Bus/MsixCommon.cpp \
1293 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1294 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1295 EFI/DevSmc.cpp \
1296 EFI/DevFlash.cpp \
1297 EFI/FlashCore.cpp \
1298 Graphics/DevVGA.cpp \
1299 Input/DevPS2.cpp \
1300 Input/DevPS2K.cpp \
1301 Input/DevPS2M.cpp \
1302 PC/DevACPI.cpp \
1303 PC/DevIoApic.cpp \
1304 PC/DevPit-i8254.cpp \
1305 PC/DevPIC.cpp \
1306 PC/DevRTC.cpp \
1307 PC/DevDMA.cpp \
1308 PC/DevHPET.cpp \
1309 Storage/DevATA.cpp \
1310 Network/DevPCNet.cpp \
1311 Network/DevDP8390.cpp \
1312 Network/Dev3C501.cpp \
1313 Serial/DevSerial.cpp \
1314 Serial/DevOxPcie958.cpp \
1315 Serial/UartCore.cpp \
1316 Parallel/DevParallel.cpp \
1317 GIMDev/GIMDev.cpp \
1318 VMMDev/VMMDev.cpp \
1319 VMMDev/VMMDevTesting.cpp \
1320 Network/DrvDedicatedNic.cpp \
1321 $(if-expr 0,Network/DrvIntNet.cpp,) # no ring-0 driver support at the moment
1322
1323 ifdef VBOX_WITH_DTRACE_R0
1324 VBoxDDR0_USES += dtrace
1325 VBoxDDR0_SOURCES += build/VBoxDD.d
1326 endif
1327
1328 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1329
1330 VBoxDDR0_DEFS += \
1331 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
1332 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
1333 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
1334 $(if $(VBOXWDDM_WITH_VBVA),VBOXWDDM_WITH_VBVA,) \
1335 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1336 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1337 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1338
1339 VBoxDDR0_DEFS += $(VBOX_AUDIO_DEFS)
1340 VBoxDDR0_SOURCES += \
1341 Audio/DevHda.cpp \
1342 Audio/DevHdaStream.cpp \
1343 Audio/DevIchAc97.cpp
1344
1345 ifdef VBOX_WITH_E1000
1346 VBoxDDR0_DEFS += VBOX_WITH_E1000
1347 VBoxDDR0_SOURCES += \
1348 Network/DevE1000.cpp \
1349 Network/DevE1000Phy.cpp
1350 endif
1351
1352 ifdef VBOX_WITH_VIRTIO
1353 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1354 VBoxDDR0_SOURCES += \
1355 VirtIO/VirtioCore.cpp \
1356 Network/DevVirtioNet.cpp
1357 endif
1358
1359 if 0 #def VBOX_WITH_NETSHAPER - no ring-0 driver support at the moment.
1360 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1361 VBoxDDR0_SOURCES += \
1362 Network/DrvNetShaper.cpp
1363 endif
1364
1365 ifdef VBOX_WITH_VMSVGA
1366 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1367 VBoxDDR0_SOURCES += \
1368 Graphics/DevVGA-SVGA.cpp
1369 endif
1370 ifdef VBOX_WITH_VMSVGA3D
1371 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1372 endif
1373
1374 ifdef VBOX_WITH_VUSB
1375 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1376 VBoxDDR0_SOURCES += \
1377 USB/DevOHCI.cpp
1378 endif
1379 ifdef VBOX_WITH_USB
1380 VBoxDDR0_DEFS += VBOX_WITH_USB
1381 if defined(VBOX_WITH_EHCI_IMPL)
1382 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1383 VBoxDDR0_SOURCES += \
1384 USB/DevEHCI.cpp
1385 endif
1386 if defined(VBOX_WITH_XHCI_IMPL)
1387 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1388 VBoxDDR0_SOURCES += \
1389 USB/DevXHCI.cpp
1390 endif
1391 endif
1392
1393 ifdef VBOX_WITH_EFI
1394 VBoxDDR0_DEFS += VBOX_WITH_EFI
1395 VBoxDDR0_SOURCES += EFI/DevEFI.cpp
1396 endif
1397
1398 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1399 VBoxDDR0_SOURCES += \
1400 Bus/DevPciRaw.cpp
1401 endif
1402
1403 ifdef VBOX_WITH_AHCI
1404 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1405 VBoxDDR0_SOURCES += \
1406 Storage/DevAHCI.cpp
1407 endif
1408
1409 ifdef VBOX_WITH_BUSLOGIC
1410 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1411 VBoxDDR0_SOURCES += \
1412 Storage/DevBusLogic.cpp
1413 endif
1414
1415 ifdef VBOX_WITH_LSILOGIC
1416 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1417 VBoxDDR0_SOURCES += \
1418 Storage/DevLsiLogicSCSI.cpp
1419 endif
1420
1421 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1422 VBoxDDR0_DEFS += VBOX_WITH_NVME_IMPL
1423 VBoxDDR0_SOURCES += \
1424 Storage/DevNVMe.cpp
1425 endif
1426
1427 if defined (VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_SCSI)
1428 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO_SCSI
1429 VBoxDDR0_SOURCES += \
1430 Storage/DevVirtioSCSI.cpp
1431 endif
1432
1433 if defined(VBOX_WITH_TPM)
1434 VBoxDDR0_DEFS += VBOX_WITH_TPM
1435 VBoxDDR0_SOURCES += \
1436 Security/DevTpm.cpp
1437 endif
1438
1439 ifdef VBOX_WITH_HGSMI
1440 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1441 endif
1442 ifdef VBOX_WITH_VIDEOHWACCEL
1443 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1444 endif
1445
1446 if1of ($(VBOX_LDR_FMT), pe lx)
1447 VBoxDDR0_LIBS = \
1448 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
1449 endif
1450 VBoxDDR0_LIBS += \
1451 $(VBOX_LIB_SUPR0)
1452
1453 $(call VBOX_SET_VER_INFO_R0,VBoxDDR0,VirtualBox VMM Devices and Drivers$(COMMA) ring-0) # (last!)
1454
1455 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS
1456 # Wrapper kmod for VBoxDDR0.r0
1457 INSTALLS.linux += vbox_vboxddr0-src
1458 vbox_vboxddr0-src_INST = bin/src/vbox_vboxddr0/
1459 vbox_vboxddr0-src_SYMLINKS = \
1460 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1461 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1462 vbox_vboxddr0-src_SOURCES = \
1463 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxddr0.gmk=>Makefile \
1464 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.r0=>VBoxDDR0.r0 \
1465 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.debug=>VBoxDDR0.debug
1466 endif
1467
1468 #
1469 # Ring-0 Services (library, linked into VMMR0.r0)
1470 #
1471 ServicesR0_TEMPLATE = VBoxR0
1472 ServicesR0_DEFS = VBOX_IN_VMM IN_INTNET_R0 IN_RT_R0 $(VMM_COMMON_DEFS) \
1473 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1474 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1475 ServicesR0_SOURCES = \
1476 Network/SrvIntNetR0.cpp
1477 # $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1478 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1479
1480
1481 #
1482 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1483 #
1484 ifdef VBOX_WITH_TESTCASES
1485 PROGRAMS += tstIntNetR0
1486 tstIntNetR0_TEMPLATE = VBoxR3TstExe
1487 tstIntNetR0_DEFS = IN_INTNET_R0
1488 tstIntNetR0_SOURCES = \
1489 Network/testcase/tstIntNetR0.cpp
1490 ifneq ($(KBUILD_TARGET),win)
1491 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1492 endif
1493 endif
1494
1495
1496 #
1497 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1498 #
1499 ifdef VBOX_WITH_TESTCASES
1500 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1501 PROGRAMS += tstIntNetHardened-1
1502 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1503 tstIntNetHardened-1_NAME = tstIntNet-1
1504 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1505 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR="tstIntNet-1"
1506 else
1507 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1508 endif
1509 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
1510
1511 DLLS += tstIntNet-1
1512 tstIntNet-1_TEMPLATE = VBoxR3HardenedTstDll
1513 else
1514 PROGRAMS += tstIntNet-1
1515 tstIntNet-1_TEMPLATE = VBoxR3TstExe
1516 endif
1517 tstIntNet-1_SOURCES = \
1518 Network/testcase/tstIntNet-1.cpp \
1519 Network/Pcap.cpp
1520 endif
1521
1522
1523 #
1524 # EEPROM device unit test requires cppunit
1525 #
1526 if defined(VBOX_WITH_E1000) && defined(VBOX_WITH_TESTCASES)
1527 PROGRAMS += tstDevEEPROM
1528 tstDevEEPROM_TEMPLATE = VBoxR3TstExe
1529 tstDevEEPROM_SOURCES = \
1530 Network/testcase/tstDevEEPROM.cpp \
1531 Network/DevEEPROM.cpp
1532
1533 PROGRAMS += tstDevPhy
1534 tstDevPhy_TEMPLATE = VBoxR3TstExe
1535 tstDevPhy_DEFS = PHY_UNIT_TEST
1536 tstDevPhy_SOURCES = \
1537 Network/testcase/tstDevPhy.cpp \
1538 Network/DevE1000Phy.cpp
1539 endif
1540
1541 #
1542 # Apple SMC Utility.
1543 #
1544 ifdef VBOX_WITH_TESTCASES
1545 PROGRAMS.darwin += VBoxSmcUtil-darwin
1546 VBoxSmcUtil-darwin_TEMPLATE = VBoxR3TstExe
1547 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1548 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1549 endif
1550
1551 #
1552 # PDM device testcase framework.
1553 #
1554 ifdef VBOX_WITH_TESTCASES_TSTDEV
1555 PROGRAMS += tstDevice
1556 tstDevice_TEMPLATE = VBoxR3TstExe
1557 tstDevice_DEFS += IN_SUP_R3
1558 tstDevice_SOURCES = \
1559 testcase/tstDevice.cpp \
1560 testcase/tstDeviceR0.cpp \
1561 testcase/tstDeviceCfg.cpp \
1562 testcase/tstDevicePdmDevHlp.cpp \
1563 testcase/tstDevicePdmDevHlpR0.cpp \
1564 testcase/tstDevicePdmThread.cpp \
1565 testcase/tstDeviceSsmFuzz.cpp \
1566 testcase/tstDeviceSsmLoadDbg.cpp \
1567 testcase/tstDeviceIoFuzz.cpp
1568 endif
1569
1570endif # !VBOX_ONLY_EXTPACKS && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1571
1572
1573if defined(VBOX_WITH_EXTPACK) && defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1574 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL)
1575 DLLS += VBoxPciRawR3
1576 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1577 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1578 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawR3,PUEL Extension Pack - PCI Passthrough Device)
1579
1580 DLLS += VBoxPciRawDrv
1581 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1582 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1583 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawDrv,PUEL Extension Pack - PCI Passthrough Driver)
1584
1585 $(if-expr defined(VBOX_WITH_VBOXR0_AS_DLL),DLLS,SYSMODS) += VBoxPciRawR0
1586 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1587 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1588 $(call VBOX_SET_VER_INFO_R0,VBoxPciRawR0,PUEL Extension Pack - PCI Passthrough Driver$(COMMA) ring-0)
1589
1590 Bus/DevPciRaw.cpp_INCS = Bus
1591 endif
1592
1593 #
1594 # The NVMe Extension Pack Modules.
1595 #
1596 if defined(VBOX_WITH_NVME_IMPL)
1597 DLLS += VBoxNvmeR3
1598 VBoxNvmeR3_TEMPLATE = VBoxR3ExtPackPuel
1599 VBoxNvmeR3_SOURCES = \
1600 Storage/DevNVMe.cpp
1601 $(call VBOX_SET_VER_INFO_DLL,VBoxNvmeR3,PUEL Extension Pack - NVMe Device)
1602
1603 ifdef VBOX_WITH_R0_MODULES
1604 ifdef VBOX_WITH_VBOXR0_AS_DLL
1605 DLLS += VBoxNvmeR0
1606 else
1607 SYSMODS += VBoxNvmeR0
1608 endif
1609 VBoxNvmeR0_TEMPLATE = VBoxR0ExtPackPuel
1610 VBoxNvmeR0_SOURCES = \
1611 Storage/DevNVMe.cpp
1612 $(call VBOX_SET_VER_INFO_R0,VBoxNvmeR0,PUEL Extension Pack - NVMe Device$(COMMA) ring-0)
1613 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # Wrapper kmod for VBoxEhciR0.r0
1614 INSTALLS.linux += vbox_vboxnvmer0-src
1615 vbox_vboxnvmer0-src_INST = bin/src/vbox_vboxnvmer0/
1616 vbox_vboxnvmer0-src_SYMLINKS = \
1617 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1618 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1619 vbox_vboxnvmer0-src_SOURCES = \
1620 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxnvmer0.gmk=>Makefile \
1621 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.r0=>VBoxNvmeR0.r0 \
1622 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.debug=>VBoxNvmeR0.debug
1623 endif
1624 endif
1625
1626 ifdef VBOX_WITH_RAW_MODE
1627 SYSMODS += VBoxNvmeRC
1628 VBoxNvmeRC_TEMPLATE = VBoxRcExtPackPuel
1629 VBoxNvmeRC_SOURCES = \
1630 Storage/DevNVMe.cpp
1631 $(call VBOX_SET_VER_INFO_RC,VBoxNvmeRC,PUEL Extension Pack - NVMe Device$(COMMA) raw-mode)
1632 endif
1633
1634 # Hacky but MSI support *must* be enabled
1635 ifdef VBOX_WITH_MSI_DEVICES
1636 VBoxNvmeR3_DEFS += VBOX_WITH_MSI_DEVICES
1637 VBoxNvmeR0_DEFS += VBOX_WITH_MSI_DEVICES
1638 VBoxNvmeRC_DEFS += VBOX_WITH_MSI_DEVICES
1639 endif
1640
1641 endif
1642
1643
1644 #
1645 # The Intel PXE ROM.
1646 #
1647 INSTALLS += VBoxExtPackPuelInsRoms
1648 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1649 ifdef PXE_EXPERIMENTAL_BUILD_SETUP
1650 VBoxExtPackPuelInsRoms_SOURCES = $(PATH_OUT)/obj/NetBiosBin/NetBiosBin.rom=>PXE-Intel.rom
1651 else
1652 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1653 endif
1654endif # VBOX_WITH_EXTPACK_PUEL && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1655
1656
1657if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1658 #
1659 # Template used for VBoxSVGA3D. (Strips away compiler options.)
1660 #
1661 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1662 TEMPLATE_VBoxSVGA3D_EXTENDS := VBoxR3Dll
1663 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1664 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
1665 # -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'
1666 TEMPLATE_VBoxSVGA3D_CFLAGS.win = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS.win) \
1667 -wd4777
1668 endif
1669 ifeq ($(KBUILD_TARGET),darwin)
1670 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1671 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1672 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1673 else
1674 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1675 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1676 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1677 endif
1678 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_LDFLAGS.darwin) \
1679 -framework AppKit -framework OpenGL -framework IOKit
1680
1681
1682 #
1683 # The shader library used by the SVGA3D implementation.
1684 #
1685 DLLS += VBoxSVGA3D
1686 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1687 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1688 VBoxSVGA3D_DEFS = \
1689 __WINESRC__ \
1690 _REENTRANT \
1691 WINE_NOWINSOCK \
1692 VBOX_WITH_VMSVGA \
1693 VBOX_WITH_VMSVGA3D \
1694 _USE_MATH_DEFINES \
1695 VBOX_USING_WINDDK_W7_OR_LATER \
1696 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1697 IN_vmsvgashader_STATIC \
1698 IN_VMSVGA3D \
1699 VBOX_WINE_WITH_IPRT
1700 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1701 VBoxSVGA3D_DEFS += \
1702 WINE_UNICODE_API= \
1703 DLLDIR="" \
1704 BINDIR="" \
1705 LIB_TO_BINDIR="" \
1706 LIB_TO_DLLDIR="" \
1707 BIN_TO_DLLDIR="" \
1708 LIB_TO_DATADIR="" \
1709 BIN_TO_DATADIR=""
1710 else
1711 VBoxSVGA3D_DEFS += \
1712 WINE_UNICODE_API="" \
1713 DLLDIR=\"\" \
1714 BINDIR=\"\" \
1715 LIB_TO_BINDIR=\"\" \
1716 LIB_TO_DLLDIR=\"\" \
1717 BIN_TO_DLLDIR=\"\" \
1718 LIB_TO_DATADIR=\"\" \
1719 BIN_TO_DATADIR=\"\"
1720 endif
1721 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1722 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1723 endif
1724 VBoxSVGA3D_DEFS.x86 += __i386__
1725 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1726 VBoxSVGA3D_DEFS.win += \
1727 USE_WIN32_OPENGL \
1728 VBOX_WINE_WITHOUT_LIBWINE
1729 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1730 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1731 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1732 else
1733 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1734 endif
1735
1736 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1737 VBoxSVGA3D_DEFS.darwin += \
1738 __builtin_ms_va_list=va_list \
1739 __stdcall= \
1740 ms_abi=
1741 VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS)
1742 VBoxSVGA3D_INCS.win := \
1743 Graphics/shaderlib/libWineStub/include
1744 VBoxSVGA3D_INCS.linux := \
1745 Graphics/shaderlib/wine/include
1746 VBoxSVGA3D_INCS.darwin := \
1747 Graphics/ \
1748 Graphics/shaderlib/wine/include
1749 VBoxSVGA3D_SOURCES := \
1750 Graphics/shaderlib/glsl_shader.c \
1751 Graphics/shaderlib/shader.c \
1752 Graphics/shaderlib/shader_sm1.c \
1753 Graphics/shaderlib/shader_sm4.c \
1754 Graphics/shaderlib/shaderapi.c \
1755 Graphics/shaderlib/utils.c \
1756 Graphics/shaderlib/stateblock.c \
1757 Graphics/shaderlib/directx.c \
1758 Graphics/shaderlib/libWineStub/debug.c
1759 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1760 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1761 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1762 VBoxSVGA3D_LIBS += GL
1763 endif
1764 VBoxSVGA3D_LDFLAGS.darwin += \
1765 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1766 $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
1767 # -wd4100: unreferenced format parameter
1768 # -wd4204: nonstandard extension used : non-constant initializer
1769 # -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
1770 # -wd4305: 'function' : truncation from 'double' to 'GLclampf'
1771 VBoxSVGA3D_CFLAGS.win = -wd4100 -wd4204 -wd4245 -wd4305
1772 ifneq ($(KBUILD_TARGET),win)
1773 VBoxSVGA3D_CFLAGS += -Wno-unused-parameter -Wno-unused-function
1774 endif
1775
1776 #
1777 # The Objective C code needs to be separate since the shaderlib redefines most
1778 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1779 # functions directly. This module must be compiled for 10.7 or later, thus it
1780 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1781 #
1782 DLLS.darwin += VBoxSVGA3DObjC
1783 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1784 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS) IN_VMSVGA3DCOCOA
1785 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1786 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1787 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1788 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1789 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1790 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1791 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1792 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1793 -framework OpenGL
1794 VBoxSVGA3DObjC_SOURCES.darwin += \
1795 Graphics/DevVGA-SVGA3d-cocoa.m
1796
1797
1798endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1799
1800include $(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