VirtualBox

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

Last change on this file since 105535 was 105535, checked in by vboxsync, 4 months ago

libs/libslirp: scm fix. bugref:10268

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