VirtualBox

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

Last change on this file was 106945, checked in by vboxsync, 2 weeks ago

SUPDrv,/Config.kmk,/Makefile.kmk: Implemented the simplified process validation for the VBOX_WITH_MINIMAL_HARDENING mode. jiraref:VBP-1449

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