VirtualBox

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

Last change on this file since 78877 was 78814, checked in by vboxsync, 6 years ago

Devices/Makefile.kmk: indent

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 46.5 KB
Line 
1# $Id: Makefile.kmk 78814 2019-05-28 12:27:35Z 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_VIRTIO_SCSI
523 VBoxDD_DEFS += VBOX_WITH_VIRTIO_SCSI
524 VBoxDD_SOURCES += \
525 Storage/DevVirtioSCSI.cpp
526 endif
527
528 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
529 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
530 endif
531
532 ifdef VBOX_WITH_SCSI
533 VBoxDD_DEFS += VBOX_WITH_SCSI
534 VBoxDD_SOURCES += \
535 Storage/DrvSCSI.cpp
536 endif
537
538 ifdef VBOX_WITH_ISCSI
539 $(eval $(call def_vbox_lwip_flags, \
540 VBoxDD, Storage/DrvVD.cpp, Network/lwip-new))
541 endif
542
543 ifdef VBOX_WITH_DRV_DISK_INTEGRITY
544 VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
545 VBoxDD_SOURCES += \
546 Storage/DrvDiskIntegrity.cpp \
547 Storage/DrvRamDisk.cpp
548 endif
549
550 ifdef VBOX_WITH_EFI
551 VBoxDD_DEFS += VBOX_WITH_EFI
552 VBoxDD_SOURCES += EFI/DevEFI.cpp
553 EFI/DevEFI.cpp_INCS += EFI/Firmware/BaseTools/Source/C/Include
554 EFI/DevEFI.cpp_INCS.x86 += EFI/Firmware/BaseTools/Source/C/Include/Ia32
555 EFI/DevEFI.cpp_INCS.amd64 += EFI/Firmware/BaseTools/Source/C/Include/X64
556 endif
557
558 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
559 VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
560 VBoxDD_SOURCES += \
561 Bus/DevPciRaw.cpp \
562 Bus/DrvPciRaw.cpp
563 endif
564
565 ifdef VBOX_WITH_MSI_DEVICES
566 VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
567 endif
568
569 ifdef VBOX_WITH_DYNAMIC_DSDT
570 VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
571 endif
572
573 # --- Audio bits (see also VBOX_AUDIO_DEFS in ./Config.kmk). ---
574
575 VBoxDD_DEFS += $(VBOX_AUDIO_DEFS)
576 VBoxDD_SOURCES += \
577 Audio/DevIchAc97.cpp \
578 Audio/DevSB16.cpp \
579 Audio/DevHDA.cpp \
580 Audio/DevHDACommon.cpp \
581 Audio/HDACodec.cpp \
582 Audio/HDAStream.cpp \
583 Audio/HDAStreamChannel.cpp \
584 Audio/HDAStreamMap.cpp \
585 Audio/HDAStreamPeriod.cpp \
586 Audio/AudioMixBuffer.cpp \
587 Audio/AudioMixer.cpp \
588 Audio/DrvAudio.cpp \
589 Audio/DrvAudioCommon.cpp \
590 Audio/DrvHostNullAudio.cpp
591
592 ifdef VBOX_WITH_AUDIO_DEBUG
593 VBoxDD_DEFS += VBOX_WITH_AUDIO_DEBUG
594 VBoxDD_SOURCES += \
595 Audio/DrvHostDebugAudio.cpp
596 endif
597
598 ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
599 VBoxDD_DEFS += VBOX_WITH_AUDIO_VALIDATIONKIT
600 VBoxDD_SOURCES += \
601 Audio/DrvHostValidationKit.cpp
602 endif
603
604 ifeq ($(KBUILD_TARGET),darwin)
605 VBoxDD_SOURCES += \
606 Audio/DrvHostCoreAudio.cpp
607 endif
608
609 ifeq ($(KBUILD_TARGET),win)
610 VBoxDD_SOURCES += \
611 Audio/DrvHostDSound.cpp
612 ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
613 VBoxDD_SOURCES += \
614 Audio/VBoxMMNotificationClient.cpp
615 VBoxDD_DEFS += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
616 endif
617 endif
618
619 ifdef VBOX_WITH_AUDIO_OSS
620 VBoxDD_DEFS += VBOX_WITH_AUDIO_OSS
621 VBoxDD_SOURCES += \
622 Audio/DrvHostOSSAudio.cpp
623 endif
624
625 ifdef VBOX_WITH_AUDIO_ALSA
626 VBoxDD_DEFS += VBOX_WITH_AUDIO_ALSA
627 VBoxDD_SOURCES += \
628 Audio/DrvHostALSAAudio.cpp \
629 Audio/alsa_stubs.c
630 endif
631
632 ifdef VBOX_WITH_AUDIO_PULSE
633 VBoxDD_DEFS += VBOX_WITH_AUDIO_PULSE
634 VBoxDD_SOURCES += \
635 Audio/DrvHostPulseAudio.cpp \
636 Audio/pulse_stubs.c
637 endif
638
639 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
640 VBOX_SLIRP_SOURCES = \
641 Network/DrvNAT.cpp \
642 Network/slirp/bootp.c \
643 Network/slirp/debug.c \
644 Network/slirp/ip_icmp.c \
645 Network/slirp/ip_input.c \
646 Network/slirp/ip_output.c \
647 Network/slirp/misc.c \
648 Network/slirp/sbuf.c \
649 Network/slirp/slirp.c \
650 Network/slirp/slirp_dns.c \
651 Network/slirp/socket.c \
652 Network/slirp/tcp_input.c \
653 Network/slirp/tcp_output.c \
654 Network/slirp/tcp_subr.c \
655 Network/slirp/tcp_timer.c \
656 Network/slirp/udp.c \
657 Network/slirp/hostres.c \
658 Network/slirp/dnsproxy/hash.c \
659 Network/slirp/tftp.c \
660 Network/slirp/dnsproxy/dnsproxy.c
661
662 ifeq ($(KBUILD_TARGET), win)
663 VBOX_SLIRP_SOURCES += Network/slirp/ip_icmpwin.c
664 else ifneq ($(KBUILD_TARGET),darwin)
665 # helper for debugging unprivileged
666# Network/slirp/ip_icmp.c_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
667# VBOX_SLIRP_SOURCES += ../NetworkServices/NAT/getrawsock.c
668 endif
669
670 ifneq ($(KBUILD_TARGET), win)
671 VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
672 endif
673
674 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
675 VBOX_SLIRP_BSD_SOURCES += \
676 Network/slirp/bsd/kern/kern_mbuf.c \
677 Network/slirp/bsd/kern/uipc_mbuf.c \
678 Network/slirp/bsd/kern/uipc_mbuf2.c \
679 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
680 VBOX_SLIRP_ALIAS_SOURCES = \
681 Network/slirp/libalias/alias.c \
682 Network/slirp/libalias/alias_db.c \
683 Network/slirp/libalias/alias_mod.c \
684 Network/slirp/libalias/alias_proxy.c \
685 Network/slirp/libalias/alias_ftp.c \
686 Network/slirp/libalias/alias_nbt.c \
687 Network/slirp/libalias/alias_util.c
688
689 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
690 # $(file)_DEFS or clean the code disabled with this definition.
691 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER=1
692
693 # dump memory related operations.
694 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
695
696 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
697 define def_vbox_slirp_cflags
698 $(file)_DEFS += \
699 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
700 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
701 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
702 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
703 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
704 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
705 $(file)_INCS += \
706 $(1)/slirp/bsd/sys \
707 $(1)/slirp/bsd/sys/sys \
708 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
709 $(1)/slirp/bsd/netinet \
710 $(1)/slirp \
711 $(1)/slirp/libalias
712 ifeq ($(KBUILD_TARGET),win)
713 $(file)_CFLAGS = -wd4018
714 else
715 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
716 endif
717 endef
718
719 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
720
721 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
722 define def_vbox_slirp_alias_cflags
723 $(file)_DEFS += VBOX_SLIRP_ALIAS \
724 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
725 $(file)_INCS += \
726 $(1)/slirp/libalias \
727 $(1)/slirp \
728 $(1)/slirp/dnsproxy
729 ifneq ($(KBUILD_TARGET),win)
730 $(file)_CFLAGS += -Wno-shadow
731 endif
732 endef
733 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
734 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
735
736 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
737 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
738 define def_vbox_slirp_bsd_cflags
739 $(file)_DEFS += VBOX_SLIRP_BSD
740 $(file)_INCS += $(1)/slirp/dnsproxy
741 endef
742 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
743 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
744
745
746 # --- OS specific driver hacks. ---
747
748 ifeq ($(KBUILD_TARGET),freebsd)
749 VBoxDD_SOURCES.freebsd += Network/DrvTAP.cpp
750 endif # freebsd
751
752 VBoxDD_SOURCES.linux += \
753 Network/DrvTAP.cpp \
754 Parallel/DrvHostParallel.cpp
755
756 ifeq ($(KBUILD_TARGET),solaris)
757 ifdef VBOX_WITH_SUID_WRAPPER
758 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
759 endif
760 endif
761
762 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
763 VBoxDD_SOURCES.win += \
764 Parallel/DrvHostParallel.cpp
765
766 ifdef VBOX_WITH_VIRTUALKD
767 VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
768 VBoxDD_SOURCES.win += \
769 Misc/VirtualKD.cpp
770 endif
771
772 if defined(VBOX_WITH_NETFLT)
773 VBoxDD_DEFS += VBOX_WITH_NETFLT
774 if defined(VBOX_NETFLT_ONDEMAND_BIND)
775 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
776 endif
777 endif
778
779 # --- Final bits, mostly libraries for order dependant linkers. ---
780
781 VBoxDD_LIBS += \
782 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
783 $(LIB_VMM) \
784 $(LIB_RUNTIME)
785 ifeq ($(KBUILD_TARGET),win)
786 VBoxDD_LIBS += \
787 $(LIB_DDU) \
788 $(PATH_STAGE_LIB)/VBoxDD2.lib \
789 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
790 else
791 VBoxDD_LIBS += \
792 $(VBoxDDU_1_STAGE_TARGET) \
793 $(VBoxDD2_1_STAGE_TARGET)
794 endif
795
796 ifdef VBOX_WITH_NETFLT
797 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.lib
798 endif
799
800 ifeq ($(KBUILD_TARGET),solaris)
801 VBoxDD_LIBS += adm
802 ifdef VBOX_WITH_SUID_WRAPPER
803 VBoxDD_LIBS += secdb
804 endif
805 ifdef VBOX_WITH_USB
806 VBoxDD_LIBS += aio
807 endif
808 endif
809
810 VBoxDD_LIBS.darwin += \
811 $(LIB_REM)
812
813
814 ifdef VBOX_WITH_DYNAMIC_DSDT
815 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
816 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
817
818 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
819 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
820 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
821
822 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
823
824 else # !VBOX_WITH_DYNAMIC_DSDT
825 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
826 VBoxDD_CLEAN += \
827 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
828 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
829 $(VBoxDD_0_OUTDIR)/vboxaml.aml.tmp \
830 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
831 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml \
832 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml.tmp \
833 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
834 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml \
835 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.tmp \
836 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.pre
837 PC/ACPI/VBoxAcpi.cpp_DEPS = \
838 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
839 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
840 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex
841
842 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
843 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
844 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
845 $(QUIET)$(MV) -f $@ $@.tmp
846 $(QUIET)$(SED) -e "s/vboxaml_aml_code/AmlCode/g" \
847 --output $@ $@.tmp
848 $(QUIET)$(RM) -f $@.tmp
849
850 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
851
852 $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
853 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
854 $(QUIET)$(RM) -f $@ $@.tmp
855 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
856 $(QUIET)$(MV) -f $@ $@.tmp
857 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_standard_aml_code/AmlCodeSsdtStandard/g" \
858 --output $@ $@.tmp
859 $(QUIET)$(RM) -f $@.tmp
860
861
862 vboxssdt_standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex
863
864 $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
865 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
866 $(QUIET)$(RM) -f $@ $@.tmp $@.pre
867 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o $@.pre $<
868 $(QUIET)$(SED) -e "s/<NL>/\n/g" \
869 --output $@.pre1 $@.pre
870 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $@.pre1
871 $(QUIET)$(MV) -f $@ $@.tmp
872 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_cpuhotplug_aml_code/AmlCodeSsdtCpuHotPlug/g" \
873 --output $@ $@.tmp
874 $(QUIET)$(RM) -f $@.tmp $@.pre $@.pre1
875
876
877 vboxssdt_cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex
878
879 endif # !VBOX_WITH_DYNAMIC_DSDT
880 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
881
882 # For finding PCIInternal.h from VBox/pci.h.
883 Bus/DevPCI.cpp_INCS = Bus
884 Bus/DevPciIch9.cpp_INCS = Bus
885 Bus/MsiCommon.cpp_INCS = Bus
886 Bus/MsixCommon.cpp_INCS = Bus
887 Bus/DevPciRaw.cpp_INCS = Bus
888
889 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
890 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR) $(VBOX_GRAPHICS_INCS)
891 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
892
893 $(call VBOX_SET_VER_INFO_DLL,VBoxDD,VirtualBox VMM Devices and Drivers) # (last!)
894
895
896 ifdef VBOX_WITH_RAW_MODE
897 #
898 # VBoxDDRC (sysmod)
899 #
900 VBoxDDRC_TEMPLATE = VBoxRc
901 ifeq ($(KBUILD_TARGET_ARCH),x86)
902 VBoxDDRC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
903 endif
904 VBoxDDRC_DEFS = $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
905 VBoxDDRC_INCS = build $(VBOX_GRAPHICS_INCS)
906 VBoxDDRC_SOURCES = \
907 Bus/DevPCI.cpp \
908 Bus/DevPciIch9.cpp \
909 Bus/MsiCommon.cpp \
910 Bus/MsixCommon.cpp \
911 EFI/DevSmc.cpp \
912 Graphics/DevVGA.cpp \
913 Input/DevPS2.cpp \
914 Input/PS2K.cpp \
915 Input/PS2M.cpp \
916 PC/DevACPI.cpp \
917 PC/DevIoApic.cpp \
918 PC/DevPit-i8254.cpp \
919 PC/DevPIC.cpp \
920 PC/DevRTC.cpp \
921 PC/DevDMA.cpp \
922 PC/DevHPET.cpp \
923 Storage/DevATA.cpp \
924 Network/DevPCNet.cpp \
925 Serial/DevSerial.cpp \
926 Serial/DevOxPcie958.cpp \
927 Serial/UartCore.cpp \
928 Parallel/DevParallel.cpp \
929 VMMDev/VMMDev.cpp \
930 VMMDev/VMMDevTesting.cpp
931
932 VBoxDDRC_DEFS += $(VBOX_AUDIO_DEFS)
933 VBoxDDRC_SOURCES += \
934 Audio/DevHDA.cpp \
935 Audio/DevHDACommon.cpp \
936 Audio/DevIchAc97.cpp
937
938 VBoxDDRC_DEFS += \
939 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
940 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
941 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
942
943 ifdef VBOX_WITH_E1000
944 VBoxDDRC_DEFS += VBOX_WITH_E1000
945 VBoxDDRC_SOURCES += \
946 Network/DevE1000.cpp \
947 Network/DevE1000Phy.cpp
948 endif
949
950 ifdef VBOX_WITH_VIRTIO
951 VBoxDDRC_DEFS += VBOX_WITH_VIRTIO
952 VBoxDDRC_SOURCES += \
953 VirtIO/Virtio.cpp \
954 Network/DevVirtioNet.cpp
955 endif
956
957 ifdef VBOX_WITH_HGSMI
958 VBoxDDRC_DEFS += VBOX_WITH_HGSMI
959 endif
960 ifdef VBOX_WITH_WDDM
961 VBoxDDRC_DEFS += VBOX_WITH_WDDM
962 endif
963 ifdef VBOX_WITH_VDMA
964 VBoxDDRC_DEFS += VBOX_WITH_VDMA
965 endif
966 ifdef VBOX_WITH_CRHGSMI
967 VBoxDDRC_DEFS += VBOX_WITH_CRHGSMI
968 endif
969 ifdef VBOXWDDM_WITH_VBVA
970 VBoxDDRC_DEFS += VBOXWDDM_WITH_VBVA
971 endif
972 ifdef VBOX_WITH_VMSVGA
973 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA
974 VBoxDDRC_SOURCES += \
975 Graphics/DevVGA-SVGA.cpp
976 endif
977 ifdef VBOX_WITH_VMSVGA3D
978 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA3D
979 endif
980 ifdef VBOX_VDMA_WITH_WATCHDOG
981 VBoxDDRC_DEFS += VBOX_VDMA_WITH_WATCHDOG
982 endif
983
984 ifdef VBOX_WITH_VUSB
985 VBoxDDRC_DEFS += VBOX_WITH_VUSB
986 VBoxDDRC_SOURCES += \
987 USB/DevOHCI.cpp
988 endif
989
990 ifdef VBOX_WITH_USB
991 VBoxDDRC_DEFS += VBOX_WITH_USB
992 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
993 VBoxDDRC_DEFS += VBOX_WITH_EHCI_IMPL
994 VBoxDDRC_SOURCES += \
995 USB/DevEHCI.cpp
996 endif
997 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
998 VBoxDDRC_DEFS += VBOX_WITH_XHCI_IMPL
999 VBoxDDRC_SOURCES += \
1000 USB/DevXHCI.cpp
1001 endif
1002 endif
1003
1004 ifdef VBOX_WITH_VIDEOHWACCEL
1005 VBoxDDRC_DEFS += VBOX_WITH_VIDEOHWACCEL
1006 endif
1007
1008 ifdef VBOX_WITH_AHCI
1009 VBoxDDRC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
1010 VBoxDDRC_SOURCES += \
1011 Storage/DevAHCI.cpp
1012 endif
1013
1014 ifdef VBOX_WITH_BUSLOGIC
1015 VBoxDDRC_DEFS += VBOX_WITH_BUSLOGIC
1016 VBoxDDRC_SOURCES += \
1017 Storage/DevBusLogic.cpp
1018 endif
1019
1020 ifdef VBOX_WITH_LSILOGIC
1021 VBoxDDRC_DEFS += VBOX_WITH_LSILOGIC
1022 VBoxDDRC_SOURCES += \
1023 Storage/DevLsiLogicSCSI.cpp
1024 endif
1025
1026 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1027 VBoxDDGC_DEFS += VBOX_WITH_NVME_IMPL
1028 VBoxDDGC_SOURCES += \
1029 Storage/DevNVMe.cpp
1030 endif
1031
1032 if1of ($(VBOX_LDR_FMT32), pe lx)
1033 VBoxDDRC_LIBS = \
1034 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1035 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1036 endif
1037 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 Serial/DevOxPcie958.cpp \
1101 Serial/UartCore.cpp \
1102 Parallel/DevParallel.cpp \
1103 VMMDev/VMMDev.cpp \
1104 VMMDev/VMMDevTesting.cpp \
1105 Network/DrvIntNet.cpp \
1106 Network/DrvDedicatedNic.cpp
1107
1108 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1109
1110 VBoxDDR0_DEFS += \
1111 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
1112 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
1113 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
1114 $(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI,) \
1115 $(if $(VBOXWDDM_WITH_VBVA),VBOXWDDM_WITH_VBVA,) \
1116 $(if $(VBOX_VDMA_WITH_WATCHDOG),VBOX_VDMA_WITH_WATCHDOG,) \
1117 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1118 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1119 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1120
1121 VBoxDDR0_DEFS += $(VBOX_AUDIO_DEFS)
1122 VBoxDDR0_SOURCES += \
1123 Audio/DevHDA.cpp \
1124 Audio/DevHDACommon.cpp \
1125 Audio/DevIchAc97.cpp
1126
1127 ifdef VBOX_WITH_E1000
1128 VBoxDDR0_DEFS += VBOX_WITH_E1000
1129 VBoxDDR0_SOURCES += \
1130 Network/DevE1000.cpp \
1131 Network/DevE1000Phy.cpp
1132 endif
1133
1134 ifdef VBOX_WITH_VIRTIO
1135 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1136 VBoxDDR0_SOURCES += \
1137 VirtIO/Virtio.cpp \
1138 Network/DevVirtioNet.cpp
1139 endif
1140
1141 ifdef VBOX_WITH_NETSHAPER
1142 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1143 VBoxDDR0_SOURCES += \
1144 Network/DrvNetShaper.cpp
1145 endif
1146
1147 ifdef VBOX_WITH_VMSVGA
1148 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1149 VBoxDDR0_SOURCES += \
1150 Graphics/DevVGA-SVGA.cpp
1151 endif
1152 ifdef VBOX_WITH_VMSVGA3D
1153 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1154 endif
1155
1156 ifdef VBOX_WITH_VUSB
1157 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1158 VBoxDDR0_SOURCES += \
1159 USB/DevOHCI.cpp
1160 endif
1161 ifdef VBOX_WITH_USB
1162 VBoxDDR0_DEFS += VBOX_WITH_USB
1163 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1164 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1165 VBoxDDR0_SOURCES += \
1166 USB/DevEHCI.cpp
1167 endif
1168 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1169 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1170 VBoxDDR0_SOURCES += \
1171 USB/DevXHCI.cpp
1172 endif
1173 endif
1174
1175 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1176 VBoxDDR0_SOURCES += \
1177 Bus/DevPciRaw.cpp
1178 endif
1179
1180 ifdef VBOX_WITH_AHCI
1181 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1182 VBoxDDR0_SOURCES += \
1183 Storage/DevAHCI.cpp
1184 endif
1185
1186 ifdef VBOX_WITH_BUSLOGIC
1187 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1188 VBoxDDR0_SOURCES += \
1189 Storage/DevBusLogic.cpp
1190 endif
1191
1192 ifdef VBOX_WITH_LSILOGIC
1193 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1194 VBoxDDR0_SOURCES += \
1195 Storage/DevLsiLogicSCSI.cpp
1196 endif
1197
1198 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1199 VBoxDDR0_DEFS += VBOX_WITH_NVME_IMPL
1200 VBoxDDR0_SOURCES += \
1201 Storage/DevNVMe.cpp
1202 endif
1203
1204 ifdef VBOX_WITH_HGSMI
1205 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1206 endif
1207 ifdef VBOX_WITH_VIDEOHWACCEL
1208 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1209 endif
1210
1211 if1of ($(VBOX_LDR_FMT), pe lx)
1212 VBoxDDR0_LIBS = \
1213 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1214 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1215 endif
1216
1217 $(call VBOX_SET_VER_INFO_R0,VBoxDDR0,VirtualBox VMM Devices and Drivers$(COMMA) ring-0) # (last!)
1218
1219
1220 #
1221 # Ring-0 Services (library, linked into VMMR0.r0)
1222 #
1223 ServicesR0_TEMPLATE = VBoxR0
1224 ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0 \
1225 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1226 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1227 ServicesR0_SOURCES = \
1228 Network/SrvIntNetR0.cpp \
1229 $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1230 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1231
1232
1233 #
1234 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1235 #
1236 ifdef VBOX_WITH_TESTCASES
1237 PROGRAMS += tstIntNetR0
1238 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
1239 tstIntNetR0_DEFS = IN_INTNET_R0
1240 tstIntNetR0_SOURCES = \
1241 Network/testcase/tstIntNetR0.cpp
1242 ifneq ($(KBUILD_TARGET),win)
1243 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1244 endif
1245 endif
1246
1247
1248 #
1249 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1250 #
1251 ifdef VBOX_WITH_TESTCASES
1252 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1253 PROGRAMS += tstIntNetHardened-1
1254 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1255 tstIntNetHardened-1_NAME = tstIntNet-1
1256 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1257 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
1258
1259 DLLS += tstIntNet-1
1260 tstIntNet-1_TEMPLATE = VBoxR3HardenedTstDll
1261 else
1262 PROGRAMS += tstIntNet-1
1263 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
1264 endif
1265 tstIntNet-1_SOURCES = \
1266 Network/testcase/tstIntNet-1.cpp \
1267 Network/Pcap.cpp
1268 endif
1269
1270
1271 #
1272 # EEPROM device unit test requires cppunit
1273 #
1274 ifdef VBOX_WITH_CPPUNIT_TESTCASES
1275 ifdef VBOX_WITH_E1000
1276 PROGRAMS += tstDevEEPROM
1277 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1278 tstDevEEPROM_SOURCES = \
1279 Network/testcase/tstDevEEPROM.cpp
1280 tstDevEEPROM_LIBS = \
1281 $(TARGET_VBoxDD)
1282 PROGRAMS += tstDevPhy
1283 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1284 tstDevPhy_SOURCES = \
1285 Network/testcase/tstDevPhy.cpp \
1286 Network/DevE1000Phy.cpp
1287 tstDevPhy_DEFS = PHY_UNIT_TEST
1288 endif
1289 endif
1290
1291 #
1292 # Apple SMC Utility.
1293 #
1294 ifdef VBOX_WITH_TESTCASES
1295 PROGRAMS.darwin += VBoxSmcUtil-darwin
1296 VBoxSmcUtil-darwin_TEMPLATE = VBOXR3TSTEXE
1297 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1298 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1299 endif
1300
1301 #
1302 # PDM device testcase framework.
1303 #
1304 ifdef VBOX_WITH_TESTCASES_TSTDEV
1305 DLLS += tstDeviceVBoxVMMStubs
1306 tstDeviceVBoxVMMStubs_TEMPLATE = VBoxR3DllNoPic
1307 tstDeviceVBoxVMMStubs_SONAME.linux = tstDeviceVBoxVMMStubs.so
1308 tstDeviceVBoxVMMStubs_SONAME.darwin = tstDeviceVBoxVMMStubs.dylib
1309 tstDeviceVBoxVMMStubs_DEFS = IN_VMM_R3 IN_DIS IN_GMM_R3 IN_DBG $(VMM_COMMON_DEFS)
1310 tstDeviceVBoxVMMStubs_LIBS = $(LIB_RUNTIME)
1311
1312 tstDeviceVBoxVMMStubs_SOURCES = \
1313 testcase/tstDeviceVMMStubs.cpp
1314
1315 PROGRAMS += tstDevice
1316 tstDevice_TEMPLATE = VBOXR3TSTEXE
1317 tstDevice_DEFS += IN_SUP_R3
1318 tstDevice_LIBS.linux = $(PATH_STAGE_BIN)/tstDeviceVBoxVMMStubs.so
1319 tstDevice_LIBS.darwin = $(PATH_STAGE_BIN)/tstDeviceVBoxVMMStubs.dylib
1320 # Required on OS X to prevent resolving symbols in the real VBoxVMM.dylib when VBoxDD.dylib is loaded
1321 tstDevice_LDFLAGS.darwin += -force_flat_namespace
1322 tstDevice_SOURCES = \
1323 testcase/tstDevice.cpp \
1324 testcase/tstDevicePdmDevHlp.cpp \
1325 testcase/tstDeviceVMM.cpp \
1326 testcase/tstDeviceSUP.cpp
1327 endif
1328
1329endif # !VBOX_ONLY_EXTPACKS
1330
1331
1332if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
1333 #
1334 # The EHCI (USB 2.0) Extension Pack Modules.
1335 #
1336 if defined(VBOX_WITH_USB)
1337 DLLS += VBoxEhciR3
1338 VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
1339 VBoxEhciR3_SOURCES = \
1340 USB/DevEHCI.cpp \
1341 USB/DevXHCI.cpp
1342 $(call VBOX_SET_VER_INFO_DLL,VBoxEhciR3,PUEL Extension Pack - EHCI Device)
1343
1344 SYSMODS += VBoxEhciR0
1345 VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
1346 VBoxEhciR0_SOURCES = \
1347 USB/DevEHCI.cpp \
1348 USB/DevXHCI.cpp
1349 $(call VBOX_SET_VER_INFO_R0,VBoxEhciR0,PUEL Extension Pack - EHCI Device$(COMMA) ring-0)
1350
1351 ifdef VBOX_WITH_RAW_MODE
1352 SYSMODS += VBoxEhciRC
1353 VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
1354 VBoxEhciRC_SOURCES = \
1355 USB/DevEHCI.cpp \
1356 USB/DevXHCI.cpp
1357 $(call VBOX_SET_VER_INFO_RC,VBoxEhciRC,PUEL Extension Pack - EHCI Device$(COMMA) raw-mode)
1358 endif
1359
1360 # Hacky but MSI support *must* be enabled
1361 ifdef VBOX_WITH_MSI_DEVICES
1362 VBoxEhciR3_DEFS += VBOX_WITH_MSI_DEVICES
1363 VBoxEhciR0_DEFS += VBOX_WITH_MSI_DEVICES
1364 VBoxEhciRC_DEFS += VBOX_WITH_MSI_DEVICES
1365 endif
1366
1367 endif
1368
1369 if defined(VBOX_WITH_PCI_PASSTHROUGH)
1370 DLLS += VBoxPciRawR3
1371 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1372 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1373 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawR3,PUEL Extension Pack - PCI Passthrough Device)
1374
1375 DLLS += VBoxPciRawDrv
1376 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1377 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1378 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawDrv,PUEL Extension Pack - PCI Passthrough Driver)
1379
1380 SYSMODS += VBoxPciRawR0
1381 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1382 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1383 $(call VBOX_SET_VER_INFO_R0,VBoxPciRawR0,PUEL Extension Pack - PCI Passthrough Driver$(COMMA) ring-0)
1384
1385 Bus/DevPciRaw.cpp_INCS = Bus
1386 endif
1387
1388 #
1389 # The NVMe Extension Pack Modules.
1390 #
1391 if defined(VBOX_WITH_NVME_IMPL)
1392 DLLS += VBoxNvmeR3
1393 VBoxNvmeR3_TEMPLATE = VBoxR3ExtPackPuel
1394 VBoxNvmeR3_SOURCES = \
1395 Storage/DevNVMe.cpp
1396 $(call VBOX_SET_VER_INFO_DLL,VBoxNvmeR3,PUEL Extension Pack - NVMe Device)
1397
1398 SYSMODS += VBoxNvmeR0
1399 VBoxNvmeR0_TEMPLATE = VBoxR0ExtPackPuel
1400 VBoxNvmeR0_SOURCES = \
1401 Storage/DevNVMe.cpp
1402 $(call VBOX_SET_VER_INFO_R0,VBoxNvmeR0,PUEL Extension Pack - NVMe Device$(COMMA) ring-0)
1403
1404 ifdef VBOX_WITH_RAW_MODE
1405 SYSMODS += VBoxNvmeRC
1406 VBoxNvmeRC_TEMPLATE = VBoxRcExtPackPuel
1407 VBoxNvmeRC_SOURCES = \
1408 Storage/DevNVMe.cpp
1409 $(call VBOX_SET_VER_INFO_RC,VBoxNvmeRC,PUEL Extension Pack - NVMe Device$(COMMA) raw-mode)
1410 endif
1411
1412 # Hacky but MSI support *must* be enabled
1413 ifdef VBOX_WITH_MSI_DEVICES
1414 VBoxNvmeR3_DEFS += VBOX_WITH_MSI_DEVICES
1415 VBoxNvmeR0_DEFS += VBOX_WITH_MSI_DEVICES
1416 VBoxNvmeRC_DEFS += VBOX_WITH_MSI_DEVICES
1417 endif
1418
1419 endif
1420
1421
1422 #
1423 # The Intel PXE ROM.
1424 #
1425 INSTALLS += VBoxExtPackPuelInsRoms
1426 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1427 ifdef PXE_EXPERIMENTAL_BUILD_SETUP
1428 VBoxExtPackPuelInsRoms_SOURCES = $(PATH_OUT)/obj/NetBiosBin/NetBiosBin.rom=>PXE-Intel.rom
1429 else
1430 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1431 endif
1432endif # VBOX_WITH_EXTPACK_PUEL
1433
1434
1435if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
1436 #
1437 # Template used for VBoxSVGA3D. (Strips away compiler options.)
1438 #
1439 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1440 TEMPLATE_VBoxSVGA3D_EXTENDS := $(if-expr "$(KBUILD_TARGET)" == "darwin" && !defined(VBOX_WITH_NEW_XCODE),VBoxR3DllOsX107,VBOXR3)
1441 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1442 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1443 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1444 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1445 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_LDFLAGS.darwin) \
1446 -framework AppKit -framework OpenGL -framework IOKit
1447
1448 #
1449 # The shader library used by the SVGA3D implementation.
1450 #
1451 DLLS += VBoxSVGA3D
1452 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1453 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1454 VBoxSVGA3D_DEFS = \
1455 __WINESRC__ \
1456 WINE_UNICODE_API="" \
1457 _REENTRANT \
1458 WINE_NOWINSOCK \
1459 VBOX_WITH_VMSVGA \
1460 VBOX_WITH_VMSVGA3D \
1461 DLLDIR=\"\" \
1462 BINDIR=\"\" \
1463 LIB_TO_BINDIR=\"\" \
1464 LIB_TO_DLLDIR=\"\" \
1465 BIN_TO_DLLDIR=\"\" \
1466 LIB_TO_DATADIR=\"\" \
1467 BIN_TO_DATADIR=\"\" \
1468 _USE_MATH_DEFINES \
1469 VBOX_USING_WINDDK_W7_OR_LATER \
1470 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1471 IN_vmsvgashader_STATIC \
1472 IN_VMSVGA3D \
1473 VBOX_WINE_WITH_IPRT
1474 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1475 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1476 endif
1477 VBoxSVGA3D_DEFS.x86 += __i386__
1478 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1479 VBoxSVGA3D_DEFS.win += \
1480 USE_WIN32_OPENGL \
1481 VBOX_WINE_WITHOUT_LIBWINE
1482 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1483 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1484 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1485 else
1486 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1487 endif
1488
1489 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1490 VBoxSVGA3D_DEFS.darwin += \
1491 __builtin_ms_va_list=va_list \
1492 __stdcall= \
1493 ms_abi=
1494 VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS)
1495 VBoxSVGA3D_INCS.win := \
1496 Graphics/shaderlib/libWineStub/include
1497 VBoxSVGA3D_INCS.linux := \
1498 Graphics/shaderlib/wine/include
1499 VBoxSVGA3D_INCS.darwin := \
1500 Graphics/ \
1501 Graphics/shaderlib/wine/include
1502 VBoxSVGA3D_SOURCES := \
1503 Graphics/shaderlib/glsl_shader.c \
1504 Graphics/shaderlib/shader.c \
1505 Graphics/shaderlib/shader_sm1.c \
1506 Graphics/shaderlib/shader_sm4.c \
1507 Graphics/shaderlib/shaderapi.c \
1508 Graphics/shaderlib/utils.c \
1509 Graphics/shaderlib/stateblock.c \
1510 Graphics/shaderlib/directx.c \
1511 Graphics/shaderlib/libWineStub/debug.c
1512 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1513 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1514 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1515 VBoxSVGA3D_LIBS += GL
1516 endif
1517 VBoxSVGA3D_LDFLAGS.darwin += \
1518 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1519 $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
1520 # -wd4100: unreferenced format parameter
1521 # -wd4204: nonstandard extension used : non-constant initializer
1522 # -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
1523 # -wd4305: 'function' : truncation from 'double' to 'GLclampf'
1524 VBoxSVGA3D_CFLAGS.win = -wd4100 -wd4204 -wd4245 -wd4305
1525 ifneq ($(KBUILD_TARGET),win)
1526 VBoxSVGA3D_CFLAGS += -Wno-unused-parameter -Wno-unused-function
1527 endif
1528
1529 #
1530 # The Objective C code needs to be separate since the shaderlib redefines most
1531 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1532 # functions directly. This module must be compiled for 10.7 or later, thus it
1533 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1534 #
1535 DLLS.darwin += VBoxSVGA3DObjC
1536 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1537 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS) IN_VMSVGA3DCOCOA
1538 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1539 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1540 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1541 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1542 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1543 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1544 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1545 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1546 -framework OpenGL
1547 if 1
1548 VBoxSVGA3DObjC_SOURCES.darwin += \
1549 Graphics/DevVGA-SVGA3d-cocoa.m
1550 else
1551 VBoxSVGA3DObjC_SOURCES.darwin += \
1552 ../HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m \
1553 ../HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp
1554 endif
1555
1556
1557endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
1558
1559include $(FILE_KBUILD_SUB_FOOTER)
1560
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