VirtualBox

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

Last change on this file since 100129 was 100129, checked in by vboxsync, 18 months ago

Devices/Network: scm fixes. bugref:10268

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

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