VirtualBox

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

Last change on this file since 106401 was 106345, checked in by vboxsync, 8 weeks ago

Devices/Network: Beginnings of a USB/NCM network interface emulation for Windows/ARM guests (they don't support any of our emulated NICs), bugref:10779

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