VirtualBox

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

Last change on this file since 83967 was 83941, checked in by vboxsync, 5 years ago

AMD IOMMU: bugref:9654 Hook into PCIPhys[Read|Write] for intercepting and translating device accesses through the IOMMU.

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