VirtualBox

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

Last change on this file since 82254 was 82170, checked in by vboxsync, 5 years ago

Devices: PS2K.cpp -> DevPS2K.cpp; PS2M.cpp -> DevPS2M.cpp; PS2Dev.h -> DevPS2.h. bugref:9218

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