VirtualBox

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

Last change on this file since 96407 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

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