VirtualBox

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

Last change on this file since 104894 was 104894, checked in by vboxsync, 5 months ago

Devices/Trace: Add support for tracing the ITPMCONNECTOR interface and start with a decoder plugin for dissecting TPM command/respons buffers, bugref:10701

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