VirtualBox

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

Last change on this file since 101539 was 101321, checked in by vboxsync, 15 months ago

Devices: Add a generic platform device for registering ROM files and loading arbitrary resources into guest memory, bugref:10528 [forgotten file]

  • 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 101321 2023-09-29 15:46:01Z 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 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_VMM_TARGET_ARMV8
928 VBoxDD_SOURCES += \
929 Bus/DevPciGenericEcam.cpp \
930 EFI/DevEFI-armv8.cpp \
931 Gpio/DevPL061.cpp \
932 Misc/DevFlashCFI.cpp \
933 Misc/DevPL031.cpp \
934 Misc/DevPlatform.cpp \
935 Serial/DevPL011.cpp
936 endif
937
938 # --- Final bits, mostly libraries for order dependant linkers. ---
939
940 VBoxDD_LIBS += \
941 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
942 $(LIB_RUNTIME)
943 ifeq ($(KBUILD_TARGET),win)
944 VBoxDD_LIBS += \
945 $(LIB_DDU) \
946 $(PATH_STAGE_LIB)/VBoxDD2.lib
947 else
948 VBoxDD_LIBS += \
949 $(VBoxDDU_1_STAGE_TARGET) \
950 $(VBoxDD2_1_STAGE_TARGET)
951 endif
952
953 ifdef VBOX_WITH_NETFLT
954 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfigDll$(VBOX_SUFF_LIB)
955 endif
956
957 ifeq ($(KBUILD_TARGET),solaris)
958 VBoxDD_LIBS += adm
959 ifdef VBOX_WITH_SUID_WRAPPER
960 VBoxDD_LIBS += secdb
961 endif
962 ifdef VBOX_WITH_USB
963 VBoxDD_LIBS += aio
964 endif
965 endif
966
967
968 ifdef VBOX_WITH_DYNAMIC_DSDT
969 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
970 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
971
972 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
973 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
974 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
975
976 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
977
978 else # !VBOX_WITH_DYNAMIC_DSDT
979 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
980 VBoxDD_CLEAN += \
981 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
982 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
983 $(VBoxDD_0_OUTDIR)/vboxaml.aml.tmp \
984 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
985 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml \
986 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml.tmp \
987 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
988 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml \
989 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.tmp \
990 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.pre \
991 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,) \
992 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml,) \
993 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml.tmp,)
994 PC/ACPI/VBoxAcpi.cpp_DEPS = \
995 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
996 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
997 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
998 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,)
999
1000 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
1001 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1002 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
1003 $(QUIET)$(MV) -f $@ $@.tmp
1004 $(QUIET)$(SED) -e "s/vboxaml_aml_code/AmlCode/g" \
1005 --output $@ $@.tmp
1006 $(QUIET)$(RM) -f $@.tmp
1007
1008 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
1009
1010 $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
1011 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1012 $(QUIET)$(RM) -f $@ $@.tmp
1013 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
1014 $(QUIET)$(MV) -f $@ $@.tmp
1015 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_standard_aml_code/AmlCodeSsdtStandard/g" \
1016 --output $@ $@.tmp
1017 $(QUIET)$(RM) -f $@.tmp
1018
1019
1020 vboxssdt_standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex
1021
1022 $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
1023 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1024 $(QUIET)$(RM) -f $@ $@.tmp $@.pre
1025 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o $@.pre $<
1026 $(QUIET)$(SED) -e "s/<NL>/\n/g" \
1027 --output $@.pre1 $@.pre
1028 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $@.pre1
1029 $(QUIET)$(MV) -f $@ $@.tmp
1030 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_cpuhotplug_aml_code/AmlCodeSsdtCpuHotPlug/g" \
1031 --output $@ $@.tmp
1032 $(QUIET)$(RM) -f $@.tmp $@.pre $@.pre1
1033
1034
1035 vboxssdt_cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex
1036
1037 if defined(VBOX_WITH_TPM)
1038 $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex: $(PATH_SUB_CURRENT)/PC/vbox-tpm.dsl | $$(dir $$@)
1039 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
1040 $(QUIET)$(RM) -f $@ $@.tmp
1041 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
1042 $(QUIET)$(MV) -f $@ $@.tmp
1043 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_tpm_aml_code/AmlCodeSsdtTpm/g" \
1044 --output $@ $@.tmp
1045 $(QUIET)$(RM) -f $@.tmp
1046
1047 vboxssdt_tpm.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex
1048 endif # !VBOX_WITH_TPM
1049
1050 endif # !VBOX_WITH_DYNAMIC_DSDT
1051 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
1052
1053 # For finding PCIInternal.h from VBox/pci.h.
1054 Bus/DevPCI.cpp_INCS = Bus
1055 Bus/DevPciIch9.cpp_INCS = Bus
1056 Bus/MsiCommon.cpp_INCS = Bus
1057 Bus/MsixCommon.cpp_INCS = Bus
1058 Bus/DevPciRaw.cpp_INCS = Bus
1059
1060 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
1061 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR) $(VBOX_GRAPHICS_INCS)
1062 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
1063
1064 $(call VBOX_SET_VER_INFO_DLL,VBoxDD,VirtualBox VMM Devices and Drivers) # (last!)
1065
1066
1067 ifdef VBOX_WITH_RAW_MODE
1068 #
1069 # VBoxDDRC (sysmod)
1070 #
1071 VBoxDDRC_TEMPLATE = VBoxRc
1072 ifeq ($(KBUILD_TARGET_ARCH),x86)
1073 VBoxDDRC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
1074 endif
1075 VBoxDDRC_DEFS = \
1076 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1077 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1078 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,)
1079 VBoxDDRC_INCS = build $(VBOX_GRAPHICS_INCS)
1080 VBoxDDRC_SOURCES = \
1081 Bus/DevPCI.cpp \
1082 Bus/DevPciIch9.cpp \
1083 Bus/MsiCommon.cpp \
1084 Bus/MsixCommon.cpp \
1085 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1086 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1087 EFI/DevSmc.cpp \
1088 Graphics/DevVGA.cpp \
1089 Input/DevPS2.cpp \
1090 Input/DevPS2K.cpp \
1091 Input/DevPS2M.cpp \
1092 PC/DevACPI.cpp \
1093 PC/DevIoApic.cpp \
1094 PC/DevPit-i8254.cpp \
1095 PC/DevPIC.cpp \
1096 PC/DevRTC.cpp \
1097 PC/DevDMA.cpp \
1098 PC/DevHPET.cpp \
1099 Storage/DevATA.cpp \
1100 Network/DevPCNet.cpp \
1101 Network/DevDP8390.cpp \
1102 Network/Dev3C501.cpp \
1103 Serial/DevSerial.cpp \
1104 Serial/DevOxPcie958.cpp \
1105 Serial/UartCore.cpp \
1106 Parallel/DevParallel.cpp \
1107 VMMDev/VMMDev.cpp \
1108 VMMDev/VMMDevTesting.cpp
1109
1110 VBoxDDRC_DEFS += $(VBOX_AUDIO_DEFS)
1111 VBoxDDRC_SOURCES += \
1112 Audio/DevHda.cpp \
1113 Audio/DevIchAc97.cpp
1114
1115 VBoxDDRC_DEFS += \
1116 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1117 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1118 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1119
1120 ifdef VBOX_WITH_E1000
1121 VBoxDDRC_DEFS += VBOX_WITH_E1000
1122 VBoxDDRC_SOURCES += \
1123 Network/DevE1000.cpp \
1124 Network/DevE1000Phy.cpp
1125 endif
1126
1127 ifdef VBOX_WITH_VIRTIO
1128 VBoxDDRC_DEFS += VBOX_WITH_VIRTIO
1129 VBoxDDRC_SOURCES += \
1130 VirtIO/VirtioCore.cpp \
1131 Network/DevVirtioNet.cpp
1132 endif
1133
1134 ifdef VBOX_WITH_HGSMI
1135 VBoxDDRC_DEFS += VBOX_WITH_HGSMI
1136 endif
1137 ifdef VBOX_WITH_WDDM
1138 VBoxDDRC_DEFS += VBOX_WITH_WDDM
1139 endif
1140 ifdef VBOX_WITH_VDMA
1141 VBoxDDRC_DEFS += VBOX_WITH_VDMA
1142 endif
1143 ifdef VBOXWDDM_WITH_VBVA
1144 VBoxDDRC_DEFS += VBOXWDDM_WITH_VBVA
1145 endif
1146 ifdef VBOX_WITH_VMSVGA
1147 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA
1148 VBoxDDRC_SOURCES += \
1149 Graphics/DevVGA-SVGA.cpp
1150 endif
1151 ifdef VBOX_WITH_VMSVGA3D
1152 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA3D
1153 endif
1154
1155 ifdef VBOX_WITH_VUSB
1156 VBoxDDRC_DEFS += VBOX_WITH_VUSB
1157 VBoxDDRC_SOURCES += \
1158 USB/DevOHCI.cpp
1159 endif
1160
1161 ifdef VBOX_WITH_USB
1162 VBoxDDRC_DEFS += VBOX_WITH_USB
1163 if defined(VBOX_WITH_EHCI_IMPL)
1164 VBoxDDRC_DEFS += VBOX_WITH_EHCI_IMPL
1165 VBoxDDRC_SOURCES += \
1166 USB/DevEHCI.cpp
1167 endif
1168 if defined(VBOX_WITH_XHCI_IMPL)
1169 VBoxDDRC_DEFS += VBOX_WITH_XHCI_IMPL
1170 VBoxDDRC_SOURCES += \
1171 USB/DevXHCI.cpp
1172 endif
1173 endif
1174
1175 ifdef VBOX_WITH_VIDEOHWACCEL
1176 VBoxDDRC_DEFS += VBOX_WITH_VIDEOHWACCEL
1177 endif
1178
1179 ifdef VBOX_WITH_AHCI
1180 VBoxDDRC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
1181 VBoxDDRC_SOURCES += \
1182 Storage/DevAHCI.cpp
1183 endif
1184
1185 ifdef VBOX_WITH_BUSLOGIC
1186 VBoxDDRC_DEFS += VBOX_WITH_BUSLOGIC
1187 VBoxDDRC_SOURCES += \
1188 Storage/DevBusLogic.cpp
1189 endif
1190
1191 ifdef VBOX_WITH_LSILOGIC
1192 VBoxDDRC_DEFS += VBOX_WITH_LSILOGIC
1193 VBoxDDRC_SOURCES += \
1194 Storage/DevLsiLogicSCSI.cpp
1195 endif
1196
1197 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1198 VBoxDDGC_DEFS += VBOX_WITH_NVME_IMPL
1199 VBoxDDGC_SOURCES += \
1200 Storage/DevNVMe.cpp
1201 endif
1202
1203 if1of ($(VBOX_LDR_FMT32), pe lx)
1204 VBoxDDRC_LIBS = \
1205 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1206 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1207 endif
1208 $(call VBOX_SET_VER_INFO_RC,VBoxDDRC,VirtualBox VMM Devices and Drivers$(COMMA) raw-mode) # last!
1209 endif # VBOX_WITH_RAW_MODE
1210
1211
1212 #
1213 # VBoxDD2 (shared object)
1214 #
1215 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
1216 VBoxDD2_DEFS = \
1217 IN_VBOXDD2 \
1218 $(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,) \
1219 $(if $(VBOX_WITH_VIRT_ARMV8),VBOX_VMM_TARGET_ARMV8,)
1220 VBoxDD2_INCS := \
1221 build \
1222 $(PATH_SUB_CURRENT)
1223 VBoxDD2_SOURCES = \
1224 build/VBoxDD2.cpp
1225 VBoxDD2_LIBS = \
1226 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1227 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1228 $(if $(VBOX_WITH_PXE_ROM), \
1229 $(if $(VBOX_WITH_INTEL_PXE), \
1230 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB), \
1231 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1232 $(LIB_RUNTIME)
1233 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1234 VBoxDD2_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
1235 if defined(VBOX_WITH_EFI) && !defined(VBOX_WITH_EFIFW_PACKING)
1236 VBoxDD_DEFS += VBOX_WITH_EFI_IN_DD2
1237 VBoxDD2_DEFS += VBOX_WITH_EFI
1238 VBoxDD2_SOURCES.x86 += EFI/DevEFI-binaries.asm
1239 VBoxDD2_SOURCES.amd64 += EFI/DevEFI-binaries.asm
1240 EFI/DevEFI-binaries.asm_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1241 EFI/DevEFI-binaries.asm_DEPS = \
1242 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1243 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1244
1245 VBoxDD2_SOURCES.arm64 += EFI/DevEFI-binaries.S
1246 EFI/DevEFI-binaries.S_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1247 EFI/DevEFI-binaries.S_DEPS = \
1248 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1249 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1250 ifdef VBOX_WITH_VIRT_ARMV8
1251 EFI/DevEFI-binaries.S_DEPS += \
1252 $(PATH_STAGE)/$(INST_BIN)VBoxEFIAArch32.fd \
1253 $(PATH_STAGE)/$(INST_BIN)VBoxEFIAArch64.fd
1254 endif
1255 endif
1256
1257 $(call VBOX_SET_VER_INFO_DLL,VBoxDD2,VirtualBox VMM Devices and Drivers 2) # (last!)
1258
1259 #
1260 # VBoxDDR0 (sysmod)
1261 #
1262 if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
1263 #
1264 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
1265 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
1266 #
1267 # Template used for gcc older than 4.6. (Strips away compiler options.)
1268 #
1269 TEMPLATE_VBoxDDR0OldGCC := VBoxDDR0OldGCC
1270 TEMPLATE_VBoxDDR0OldGCC_EXTENDS := VBoxR0
1271 TEMPLATE_VBoxDDR0OldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxDDR0OldGCC_EXTENDS)_CXXFLAGS))
1272
1273 VBoxDDR0_TEMPLATE = VBoxDDR0OldGCC
1274 else
1275 VBoxDDR0_TEMPLATE = VBoxR0
1276 endif
1277 VBoxDDR0_DEFS = \
1278 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1279 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1280 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
1281 IN_RT_R0 # - WTF is IN_RT_R0 doing here?
1282 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1283 VBoxDDR0_INCS = build $(VBOX_GRAPHICS_INCS)
1284 VBoxDDR0_INCS += $(VBOX_PATH_VMSVGA_DEVICE_INC)
1285 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1286 VBoxDDR0_SOURCES = \
1287 build/VBoxDDR0.cpp \
1288 Bus/DevPCI.cpp \
1289 Bus/DevPciIch9.cpp \
1290 Bus/MsiCommon.cpp \
1291 Bus/MsixCommon.cpp \
1292 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1293 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1294 EFI/DevSmc.cpp \
1295 EFI/DevFlash.cpp \
1296 EFI/FlashCore.cpp \
1297 Graphics/DevVGA.cpp \
1298 Input/DevPS2.cpp \
1299 Input/DevPS2K.cpp \
1300 Input/DevPS2M.cpp \
1301 PC/DevACPI.cpp \
1302 PC/DevIoApic.cpp \
1303 PC/DevPit-i8254.cpp \
1304 PC/DevPIC.cpp \
1305 PC/DevRTC.cpp \
1306 PC/DevDMA.cpp \
1307 PC/DevHPET.cpp \
1308 Storage/DevATA.cpp \
1309 Network/DevPCNet.cpp \
1310 Network/DevDP8390.cpp \
1311 Network/Dev3C501.cpp \
1312 Serial/DevSerial.cpp \
1313 Serial/DevOxPcie958.cpp \
1314 Serial/UartCore.cpp \
1315 Parallel/DevParallel.cpp \
1316 GIMDev/GIMDev.cpp \
1317 VMMDev/VMMDev.cpp \
1318 VMMDev/VMMDevTesting.cpp \
1319 Network/DrvDedicatedNic.cpp \
1320 $(if-expr 0,Network/DrvIntNet.cpp,) # no ring-0 driver support at the moment
1321
1322 ifdef VBOX_WITH_DTRACE_R0
1323 VBoxDDR0_USES += dtrace
1324 VBoxDDR0_SOURCES += build/VBoxDD.d
1325 endif
1326
1327 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1328
1329 VBoxDDR0_DEFS += \
1330 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
1331 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
1332 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
1333 $(if $(VBOXWDDM_WITH_VBVA),VBOXWDDM_WITH_VBVA,) \
1334 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1335 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1336 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1337
1338 VBoxDDR0_DEFS += $(VBOX_AUDIO_DEFS)
1339 VBoxDDR0_SOURCES += \
1340 Audio/DevHda.cpp \
1341 Audio/DevHdaStream.cpp \
1342 Audio/DevIchAc97.cpp
1343
1344 ifdef VBOX_WITH_E1000
1345 VBoxDDR0_DEFS += VBOX_WITH_E1000
1346 VBoxDDR0_SOURCES += \
1347 Network/DevE1000.cpp \
1348 Network/DevE1000Phy.cpp
1349 endif
1350
1351 ifdef VBOX_WITH_VIRTIO
1352 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1353 VBoxDDR0_SOURCES += \
1354 VirtIO/VirtioCore.cpp \
1355 Network/DevVirtioNet.cpp
1356 endif
1357
1358 if 0 #def VBOX_WITH_NETSHAPER - no ring-0 driver support at the moment.
1359 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1360 VBoxDDR0_SOURCES += \
1361 Network/DrvNetShaper.cpp
1362 endif
1363
1364 ifdef VBOX_WITH_VMSVGA
1365 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1366 VBoxDDR0_SOURCES += \
1367 Graphics/DevVGA-SVGA.cpp
1368 endif
1369 ifdef VBOX_WITH_VMSVGA3D
1370 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1371 endif
1372
1373 ifdef VBOX_WITH_VUSB
1374 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1375 VBoxDDR0_SOURCES += \
1376 USB/DevOHCI.cpp
1377 endif
1378 ifdef VBOX_WITH_USB
1379 VBoxDDR0_DEFS += VBOX_WITH_USB
1380 if defined(VBOX_WITH_EHCI_IMPL)
1381 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1382 VBoxDDR0_SOURCES += \
1383 USB/DevEHCI.cpp
1384 endif
1385 if defined(VBOX_WITH_XHCI_IMPL)
1386 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1387 VBoxDDR0_SOURCES += \
1388 USB/DevXHCI.cpp
1389 endif
1390 endif
1391
1392 ifdef VBOX_WITH_EFI
1393 VBoxDDR0_DEFS += VBOX_WITH_EFI
1394 VBoxDDR0_SOURCES += EFI/DevEFI.cpp
1395 endif
1396
1397 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1398 VBoxDDR0_SOURCES += \
1399 Bus/DevPciRaw.cpp
1400 endif
1401
1402 ifdef VBOX_WITH_AHCI
1403 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1404 VBoxDDR0_SOURCES += \
1405 Storage/DevAHCI.cpp
1406 endif
1407
1408 ifdef VBOX_WITH_BUSLOGIC
1409 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1410 VBoxDDR0_SOURCES += \
1411 Storage/DevBusLogic.cpp
1412 endif
1413
1414 ifdef VBOX_WITH_LSILOGIC
1415 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1416 VBoxDDR0_SOURCES += \
1417 Storage/DevLsiLogicSCSI.cpp
1418 endif
1419
1420 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1421 VBoxDDR0_DEFS += VBOX_WITH_NVME_IMPL
1422 VBoxDDR0_SOURCES += \
1423 Storage/DevNVMe.cpp
1424 endif
1425
1426 if defined (VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_SCSI)
1427 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO_SCSI
1428 VBoxDDR0_SOURCES += \
1429 Storage/DevVirtioSCSI.cpp
1430 endif
1431
1432 if defined(VBOX_WITH_TPM)
1433 VBoxDDR0_DEFS += VBOX_WITH_TPM
1434 VBoxDDR0_SOURCES += \
1435 Security/DevTpm.cpp
1436 endif
1437
1438 ifdef VBOX_WITH_HGSMI
1439 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1440 endif
1441 ifdef VBOX_WITH_VIDEOHWACCEL
1442 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1443 endif
1444
1445 if1of ($(VBOX_LDR_FMT), pe lx)
1446 VBoxDDR0_LIBS = \
1447 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
1448 endif
1449 VBoxDDR0_LIBS += \
1450 $(VBOX_LIB_SUPR0)
1451
1452 $(call VBOX_SET_VER_INFO_R0,VBoxDDR0,VirtualBox VMM Devices and Drivers$(COMMA) ring-0) # (last!)
1453
1454 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS
1455 # Wrapper kmod for VBoxDDR0.r0
1456 INSTALLS.linux += vbox_vboxddr0-src
1457 vbox_vboxddr0-src_INST = bin/src/vbox_vboxddr0/
1458 vbox_vboxddr0-src_SYMLINKS = \
1459 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1460 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1461 vbox_vboxddr0-src_SOURCES = \
1462 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxddr0.gmk=>Makefile \
1463 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.r0=>VBoxDDR0.r0 \
1464 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.debug=>VBoxDDR0.debug
1465 endif
1466
1467 #
1468 # Ring-0 Services (library, linked into VMMR0.r0)
1469 #
1470 ServicesR0_TEMPLATE = VBoxR0
1471 ServicesR0_DEFS = VBOX_IN_VMM IN_INTNET_R0 IN_RT_R0 $(VMM_COMMON_DEFS) \
1472 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1473 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1474 ServicesR0_SOURCES = \
1475 Network/SrvIntNetR0.cpp
1476 # $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1477 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1478
1479
1480 #
1481 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1482 #
1483 ifdef VBOX_WITH_TESTCASES
1484 PROGRAMS += tstIntNetR0
1485 tstIntNetR0_TEMPLATE = VBoxR3TstExe
1486 tstIntNetR0_DEFS = IN_INTNET_R0
1487 tstIntNetR0_SOURCES = \
1488 Network/testcase/tstIntNetR0.cpp
1489 ifneq ($(KBUILD_TARGET),win)
1490 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1491 endif
1492 endif
1493
1494
1495 #
1496 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1497 #
1498 ifdef VBOX_WITH_TESTCASES
1499 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1500 PROGRAMS += tstIntNetHardened-1
1501 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1502 tstIntNetHardened-1_NAME = tstIntNet-1
1503 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1504 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR="tstIntNet-1"
1505 else
1506 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1507 endif
1508 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
1509
1510 DLLS += tstIntNet-1
1511 tstIntNet-1_TEMPLATE = VBoxR3HardenedTstDll
1512 else
1513 PROGRAMS += tstIntNet-1
1514 tstIntNet-1_TEMPLATE = VBoxR3TstExe
1515 endif
1516 tstIntNet-1_SOURCES = \
1517 Network/testcase/tstIntNet-1.cpp \
1518 Network/Pcap.cpp
1519 endif
1520
1521
1522 #
1523 # EEPROM device unit test requires cppunit
1524 #
1525 if defined(VBOX_WITH_E1000) && defined(VBOX_WITH_TESTCASES)
1526 PROGRAMS += tstDevEEPROM
1527 tstDevEEPROM_TEMPLATE = VBoxR3TstExe
1528 tstDevEEPROM_SOURCES = \
1529 Network/testcase/tstDevEEPROM.cpp \
1530 Network/DevEEPROM.cpp
1531
1532 PROGRAMS += tstDevPhy
1533 tstDevPhy_TEMPLATE = VBoxR3TstExe
1534 tstDevPhy_DEFS = PHY_UNIT_TEST
1535 tstDevPhy_SOURCES = \
1536 Network/testcase/tstDevPhy.cpp \
1537 Network/DevE1000Phy.cpp
1538 endif
1539
1540 #
1541 # Apple SMC Utility.
1542 #
1543 ifdef VBOX_WITH_TESTCASES
1544 PROGRAMS.darwin += VBoxSmcUtil-darwin
1545 VBoxSmcUtil-darwin_TEMPLATE = VBoxR3TstExe
1546 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1547 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1548 endif
1549
1550 #
1551 # PDM device testcase framework.
1552 #
1553 ifdef VBOX_WITH_TESTCASES_TSTDEV
1554 PROGRAMS += tstDevice
1555 tstDevice_TEMPLATE = VBoxR3TstExe
1556 tstDevice_DEFS += IN_SUP_R3
1557 tstDevice_SOURCES = \
1558 testcase/tstDevice.cpp \
1559 testcase/tstDeviceR0.cpp \
1560 testcase/tstDeviceCfg.cpp \
1561 testcase/tstDevicePdmDevHlp.cpp \
1562 testcase/tstDevicePdmDevHlpR0.cpp \
1563 testcase/tstDevicePdmThread.cpp \
1564 testcase/tstDeviceSsmFuzz.cpp \
1565 testcase/tstDeviceSsmLoadDbg.cpp \
1566 testcase/tstDeviceIoFuzz.cpp
1567 endif
1568
1569endif # !VBOX_ONLY_EXTPACKS && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1570
1571
1572if defined(VBOX_WITH_EXTPACK) && defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1573 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL)
1574 DLLS += VBoxPciRawR3
1575 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1576 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1577 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawR3,PUEL Extension Pack - PCI Passthrough Device)
1578
1579 DLLS += VBoxPciRawDrv
1580 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1581 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1582 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawDrv,PUEL Extension Pack - PCI Passthrough Driver)
1583
1584 $(if-expr defined(VBOX_WITH_VBOXR0_AS_DLL),DLLS,SYSMODS) += VBoxPciRawR0
1585 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1586 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1587 $(call VBOX_SET_VER_INFO_R0,VBoxPciRawR0,PUEL Extension Pack - PCI Passthrough Driver$(COMMA) ring-0)
1588
1589 Bus/DevPciRaw.cpp_INCS = Bus
1590 endif
1591
1592 #
1593 # The NVMe Extension Pack Modules.
1594 #
1595 if defined(VBOX_WITH_NVME_IMPL)
1596 DLLS += VBoxNvmeR3
1597 VBoxNvmeR3_TEMPLATE = VBoxR3ExtPackPuel
1598 VBoxNvmeR3_SOURCES = \
1599 Storage/DevNVMe.cpp
1600 $(call VBOX_SET_VER_INFO_DLL,VBoxNvmeR3,PUEL Extension Pack - NVMe Device)
1601
1602 ifdef VBOX_WITH_R0_MODULES
1603 ifdef VBOX_WITH_VBOXR0_AS_DLL
1604 DLLS += VBoxNvmeR0
1605 else
1606 SYSMODS += VBoxNvmeR0
1607 endif
1608 VBoxNvmeR0_TEMPLATE = VBoxR0ExtPackPuel
1609 VBoxNvmeR0_SOURCES = \
1610 Storage/DevNVMe.cpp
1611 $(call VBOX_SET_VER_INFO_R0,VBoxNvmeR0,PUEL Extension Pack - NVMe Device$(COMMA) ring-0)
1612 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # Wrapper kmod for VBoxEhciR0.r0
1613 INSTALLS.linux += vbox_vboxnvmer0-src
1614 vbox_vboxnvmer0-src_INST = bin/src/vbox_vboxnvmer0/
1615 vbox_vboxnvmer0-src_SYMLINKS = \
1616 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1617 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1618 vbox_vboxnvmer0-src_SOURCES = \
1619 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxnvmer0.gmk=>Makefile \
1620 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.r0=>VBoxNvmeR0.r0 \
1621 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.debug=>VBoxNvmeR0.debug
1622 endif
1623 endif
1624
1625 ifdef VBOX_WITH_RAW_MODE
1626 SYSMODS += VBoxNvmeRC
1627 VBoxNvmeRC_TEMPLATE = VBoxRcExtPackPuel
1628 VBoxNvmeRC_SOURCES = \
1629 Storage/DevNVMe.cpp
1630 $(call VBOX_SET_VER_INFO_RC,VBoxNvmeRC,PUEL Extension Pack - NVMe Device$(COMMA) raw-mode)
1631 endif
1632
1633 # Hacky but MSI support *must* be enabled
1634 ifdef VBOX_WITH_MSI_DEVICES
1635 VBoxNvmeR3_DEFS += VBOX_WITH_MSI_DEVICES
1636 VBoxNvmeR0_DEFS += VBOX_WITH_MSI_DEVICES
1637 VBoxNvmeRC_DEFS += VBOX_WITH_MSI_DEVICES
1638 endif
1639
1640 endif
1641
1642
1643 #
1644 # The Intel PXE ROM.
1645 #
1646 INSTALLS += VBoxExtPackPuelInsRoms
1647 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1648 ifdef PXE_EXPERIMENTAL_BUILD_SETUP
1649 VBoxExtPackPuelInsRoms_SOURCES = $(PATH_OUT)/obj/NetBiosBin/NetBiosBin.rom=>PXE-Intel.rom
1650 else
1651 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1652 endif
1653endif # VBOX_WITH_EXTPACK_PUEL && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1654
1655
1656if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1657 #
1658 # Template used for VBoxSVGA3D. (Strips away compiler options.)
1659 #
1660 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1661 TEMPLATE_VBoxSVGA3D_EXTENDS := VBoxR3Dll
1662 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1663 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
1664 # -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'
1665 TEMPLATE_VBoxSVGA3D_CFLAGS.win = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS.win) \
1666 -wd4777
1667 endif
1668 ifeq ($(KBUILD_TARGET),darwin)
1669 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1670 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1671 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1672 else
1673 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1674 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1675 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1676 endif
1677 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_LDFLAGS.darwin) \
1678 -framework AppKit -framework OpenGL -framework IOKit
1679
1680
1681 #
1682 # The shader library used by the SVGA3D implementation.
1683 #
1684 DLLS += VBoxSVGA3D
1685 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1686 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1687 VBoxSVGA3D_DEFS = \
1688 __WINESRC__ \
1689 _REENTRANT \
1690 WINE_NOWINSOCK \
1691 VBOX_WITH_VMSVGA \
1692 VBOX_WITH_VMSVGA3D \
1693 _USE_MATH_DEFINES \
1694 VBOX_USING_WINDDK_W7_OR_LATER \
1695 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1696 IN_vmsvgashader_STATIC \
1697 IN_VMSVGA3D \
1698 VBOX_WINE_WITH_IPRT
1699 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1700 VBoxSVGA3D_DEFS += \
1701 WINE_UNICODE_API= \
1702 DLLDIR="" \
1703 BINDIR="" \
1704 LIB_TO_BINDIR="" \
1705 LIB_TO_DLLDIR="" \
1706 BIN_TO_DLLDIR="" \
1707 LIB_TO_DATADIR="" \
1708 BIN_TO_DATADIR=""
1709 else
1710 VBoxSVGA3D_DEFS += \
1711 WINE_UNICODE_API="" \
1712 DLLDIR=\"\" \
1713 BINDIR=\"\" \
1714 LIB_TO_BINDIR=\"\" \
1715 LIB_TO_DLLDIR=\"\" \
1716 BIN_TO_DLLDIR=\"\" \
1717 LIB_TO_DATADIR=\"\" \
1718 BIN_TO_DATADIR=\"\"
1719 endif
1720 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1721 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1722 endif
1723 VBoxSVGA3D_DEFS.x86 += __i386__
1724 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1725 VBoxSVGA3D_DEFS.win += \
1726 USE_WIN32_OPENGL \
1727 VBOX_WINE_WITHOUT_LIBWINE
1728 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1729 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1730 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1731 else
1732 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1733 endif
1734
1735 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1736 VBoxSVGA3D_DEFS.darwin += \
1737 __builtin_ms_va_list=va_list \
1738 __stdcall= \
1739 ms_abi=
1740 VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS)
1741 VBoxSVGA3D_INCS.win := \
1742 Graphics/shaderlib/libWineStub/include
1743 VBoxSVGA3D_INCS.linux := \
1744 Graphics/shaderlib/wine/include
1745 VBoxSVGA3D_INCS.darwin := \
1746 Graphics/ \
1747 Graphics/shaderlib/wine/include
1748 VBoxSVGA3D_SOURCES := \
1749 Graphics/shaderlib/glsl_shader.c \
1750 Graphics/shaderlib/shader.c \
1751 Graphics/shaderlib/shader_sm1.c \
1752 Graphics/shaderlib/shader_sm4.c \
1753 Graphics/shaderlib/shaderapi.c \
1754 Graphics/shaderlib/utils.c \
1755 Graphics/shaderlib/stateblock.c \
1756 Graphics/shaderlib/directx.c \
1757 Graphics/shaderlib/libWineStub/debug.c
1758 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1759 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1760 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1761 VBoxSVGA3D_LIBS += GL
1762 endif
1763 VBoxSVGA3D_LDFLAGS.darwin += \
1764 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1765 $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
1766 # -wd4100: unreferenced format parameter
1767 # -wd4204: nonstandard extension used : non-constant initializer
1768 # -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
1769 # -wd4305: 'function' : truncation from 'double' to 'GLclampf'
1770 VBoxSVGA3D_CFLAGS.win = -wd4100 -wd4204 -wd4245 -wd4305
1771 ifneq ($(KBUILD_TARGET),win)
1772 VBoxSVGA3D_CFLAGS += -Wno-unused-parameter -Wno-unused-function
1773 endif
1774
1775 #
1776 # The Objective C code needs to be separate since the shaderlib redefines most
1777 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1778 # functions directly. This module must be compiled for 10.7 or later, thus it
1779 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1780 #
1781 DLLS.darwin += VBoxSVGA3DObjC
1782 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1783 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS) IN_VMSVGA3DCOCOA
1784 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1785 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1786 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1787 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1788 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1789 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1790 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1791 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1792 -framework OpenGL
1793 VBoxSVGA3DObjC_SOURCES.darwin += \
1794 Graphics/DevVGA-SVGA3d-cocoa.m
1795
1796
1797endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1798
1799include $(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