VirtualBox

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

Last change on this file since 99456 was 99432, checked in by vboxsync, 20 months ago

Devices/Network: hopefully final scm fixes. bugref:10268

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