VirtualBox

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

Last change on this file since 106129 was 106129, checked in by vboxsync, 2 months ago

Devices/Network: Fix windows slow packet throughput by kicking NAT thread more regularly. bugref:10268

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