VirtualBox

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

Last change on this file since 103415 was 103405, checked in by vboxsync, 10 months ago

Devices/Makefile.kmk: Use the default windows target version when building VBoxDD, since 5.1 has been unsupported for a while now (current default is 10.0). bugref:10268

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette