VirtualBox

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

Last change on this file since 80294 was 80049, checked in by vboxsync, 5 years ago

Main: Kicking out raw-mode - Devices warning. bugref:9517

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