VirtualBox

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

Last change on this file since 73494 was 73135, checked in by vboxsync, 6 years ago

Serial: Split out the generic UART functionality into a separate module so it can be reused.

Add a PCI Express 16 port UART controller emulation based on the Oxford Semiconductor OXPCIe958
PCI Express to octa UART controller (supports chaining two of those together in a single device
to get up to 16 UARTs). This somewhat revives the incomplete and never enabled PCI UART controller
in the old code. Linux detects the device and apparently configures all 16 UARTs but data transfers
were not tested and the code is pretty incomplete still.

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