VirtualBox

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

Last change on this file since 78229 was 76553, checked in by vboxsync, 6 years ago

scm --update-copyright-year

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