VirtualBox

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

Last change on this file since 106854 was 106716, checked in by vboxsync, 3 months ago

/Config.kmk,Devices: Temporarily disable VBOX_WITH_WDDM on win.arm64 till we can sort out the hardware interface changes for arm64. This unforutnately requires some hacks to keep VBoxDD.dll building since the code no longer builds w/o VBOX_WITH_VDMA and VBOX_WITH_WDDM. jiraref:VBP-1253

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