VirtualBox

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

Last change on this file since 85657 was 85657, checked in by vboxsync, 4 years ago

Devices/Audio/DrvHostCoreAudio: Properly request authorization for audio input as required with Mojave and newer, bugref:9805 [Makefile.kmk fix]

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