VirtualBox

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

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

Devices/Makefile.kmk: Add DXVK SDK for macOS when enabled, bugref:10013

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