VirtualBox

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

Last change on this file since 80502 was 80478, checked in by vboxsync, 5 years ago

WDDM: remove unused VBOX_VDMA_WITH_WATCHDOG code. bugref:9529

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 46.9 KB
Line 
1# $Id: Makefile.kmk 80478 2019-08-28 13:32:17Z vboxsync $
2## @file
3# Top-level sub-makefile for the devices, drivers and services.
4#
5
6#
7# Copyright (C) 2006-2019 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21# Make sure our Config.kmk is included.
22ifndef VBOX_DEVICES_CONFIG_KMK_INCLUDED
23 include $(PATH_SUB_CURRENT)/Config.kmk
24endif
25
26# Include sub-makefiles.
27if1of ($(KBUILD_TARGET_ARCH), $(VBOX_SUPPORTED_HOST_ARCHS))
28 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
29 include $(PATH_SUB_CURRENT)/Audio/testcase/Makefile.kmk
30 include $(PATH_SUB_CURRENT)/Input/testcase/Makefile.kmk
31 ifdef VBOX_WITH_TESTCASES
32 include $(PATH_SUB_CURRENT)/Samples/Makefile.kmk
33 endif
34 if defined(VBOX_WITH_INTEL_PXE) || defined(VBOX_ONLY_EXTPACKS)
35 include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
36 else if defined(VBOX_WITH_PXE_ROM)
37 if !defined(VBOX_WITHOUT_IPXE)
38 include $(PATH_SUB_CURRENT)/PC/ipxe/Makefile.kmk
39 endif
40 endif
41endif
42if !defined(VBOX_ONLY_EXTPACKS)
43 if1of ($(KBUILD_TARGET_ARCH), $(VBOX_SUPPORTED_HOST_ARCHS))
44 include $(PATH_SUB_CURRENT)/BiosCommonCode/Makefile.kmk
45 include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
46 include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
47 endif
48
49 #
50 # Main targets.
51 #
52 if1of ($(KBUILD_TARGET_ARCH), $(VBOX_SUPPORTED_HOST_ARCHS))
53 LIBRARIES += ServicesR0
54 DLLS += VBoxDDU VBoxDD VBoxDD2
55 SYSMODS += VBoxDDR0
56 ifdef VBOX_WITH_RAW_MODE
57 SYSMODS += VBoxDDRC
58 endif
59 else
60 DLLS += VBoxDDU
61 endif
62
63
64 #
65 # VBoxDDU (shared object)
66 #
67 VBoxDDU_TEMPLATE = VBoxR3DllWarnNoPic
68 VBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
69 VBoxDDU_INST.darwin = $(INST_DLL) $(INST_TESTCASE)
70 VBoxDDU_DEFS = IN_VBOXDDU
71 if defined(VBOX_WITH_VUSB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
72 VBoxDDU_DEFS += VBOX_WITH_VUSB
73 endif
74 if defined(VBOX_WITH_USB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
75 VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
76 VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
77 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
78 VBoxDDU_DEFS += VBOX_WITH_EHCI_IMPL
79 endif
80 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
81 VBoxDDU_DEFS += VBOX_WITH_XHCI_IMPL
82 endif
83 else
84 VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK)
85 endif
86 VBoxDDU_SOURCES = \
87 Storage/VSCSI/VSCSIDevice.cpp \
88 Storage/VSCSI/VSCSILun.cpp \
89 Storage/VSCSI/VSCSILunSbc.cpp \
90 Storage/VSCSI/VSCSILunMmc.cpp \
91 Storage/VSCSI/VSCSISense.cpp \
92 Storage/VSCSI/VSCSIIoReq.cpp \
93 Storage/VSCSI/VSCSIVpdPagePool.cpp \
94 build/VBoxDDUDeps.cpp
95
96 ifdef VBOX_WITH_VSCSI_SSC
97 VBoxDDU_SOURCES += Storage/VSCSI/VSCSILunSsc.cpp
98 VBoxDDU_DEFS += VBOX_WITH_VSCSI_SSC
99 endif
100 VBoxDDU_LIBS = \
101 $(LIB_RUNTIME) \
102 $(PATH_STAGE_LIB)/StorageLib$(VBOX_SUFF_LIB)
103 if defined(VBOX_WITH_USB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
104 VBoxDDU_LIBS += \
105 $(PATH_STAGE_LIB)/USBLib$(VBOX_SUFF_LIB)
106 VBoxDDU_LIBS.win += \
107 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
108 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib
109 endif
110 VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
111 if defined(VBOX_WITH_USB) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
112 VBoxDDU_LDFLAGS.darwin += -framework IOKit
113 endif
114
115 VBoxDDU_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
116 $(call VBOX_SET_VER_INFO_DLL,VBoxDDU,VirtualBox VMM Devices and Drivers Utilities)
117
118
119endif # VBOX_ONLY_EXTPACKS
120if !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != "" # Goes on almost to the end of the file.
121
122
123 #
124 # VBoxDD (shared object)
125 #
126 VBoxDD_TEMPLATE = VBoxR3DllWarnNoPic
127 VBoxDD_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
128 Storage/DrvHostDVD.cpp_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK)
129 VBoxDD_INCS = \
130 build \
131 Network/slirp \
132 $(VBOX_GRAPHICS_INCS)
133 VBoxDD_DEFS = \
134 VBOX_ACPI \
135 VBOX_HGCM_HOST_CODE \
136 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
137 $(if $(VBOX_BIOS_DMI_FALLBACK),VBOX_BIOS_DMI_FALLBACK,) \
138 VBOX_WITH_DMI_CHASSIS \
139 VBOX_WITH_DMI_OEMSTRINGS \
140 $(if $(VBOX_WITH_NEW_LPC_DEVICE),VBOX_WITH_NEW_LPC_DEVICE,)
141 VBoxDD_DEFS.win = _WIN32_WINNT=0x0510
142 ifeq ($(KBUILD_TARGET_ARCH),x86)
143 VBoxDD_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
144 endif
145 VBoxDD_SOURCES = \
146 build/VBoxDD.cpp \
147 \
148 Input/DevPS2.cpp \
149 Input/PS2K.cpp \
150 Input/PS2M.cpp \
151 Input/UsbKbd.cpp \
152 Input/UsbMouse.cpp \
153 Bus/DevPCI.cpp \
154 Bus/DevPciIch9.cpp \
155 Bus/MsiCommon.cpp \
156 Bus/MsixCommon.cpp \
157 EFI/DevSmc.cpp \
158 EFI/DevFlash.cpp \
159 Graphics/DevVGA.cpp \
160 Storage/DevATA.cpp \
161 PC/DevPit-i8254.cpp \
162 PC/DevPIC.cpp \
163 PC/DevACPI.cpp \
164 PC/ACPI/VBoxAcpi.cpp \
165 PC/DevRTC.cpp \
166 PC/DevPcBios.cpp \
167 PC/DevFwCommon.cpp \
168 PC/DevPcArch.cpp \
169 $(if $(VBOX_WITH_NEW_LPC_DEVICE),PC/DevLpc-new.cpp,) \
170 GIMDev/GIMDev.cpp \
171 GIMDev/DrvUDP.cpp \
172 VMMDev/VMMDev.cpp \
173 $(if $(VBOX_WITH_HGCM),VMMDev/VMMDevHGCM.cpp,) \
174 VMMDev/VMMDevTesting.cpp \
175 Network/DevPCNet.cpp \
176 PC/DevDMA.cpp \
177 PC/DevHPET.cpp \
178 PC/DevIoApic.cpp \
179 Storage/DevFdc.cpp \
180 Parallel/DevParallel.cpp \
181 \
182 Input/DrvKeyboardQueue.cpp \
183 Input/DrvMouseQueue.cpp \
184 Network/DrvIntNet.cpp \
185 Network/DrvDedicatedNic.cpp \
186 PC/DrvACPI.cpp \
187 PC/DrvAcpiCpu.cpp \
188 Serial/DevSerial.cpp \
189 Serial/DevOxPcie958.cpp \
190 Serial/UartCore.cpp \
191 Serial/DrvChar.cpp \
192 Serial/DrvHostSerial.cpp \
193 Serial/DrvNamedPipe.cpp \
194 Serial/DrvTCP.cpp \
195 Serial/DrvRawFile.cpp \
196 Storage/Debug.cpp \
197 Storage/DrvVD.cpp \
198 Storage/ATAPIPassthrough.cpp \
199 Storage/IOBufMgmt.cpp \
200 Network/DrvNetSniffer.cpp \
201 Network/Pcap.cpp
202 ifn1of ($(KBUILD_TARGET), os2)
203 VBoxDD_SOURCES += Storage/DrvHostBase.cpp
204 endif
205 ifn1of ($(KBUILD_TARGET), os2)
206 VBoxDD_SOURCES += Storage/DrvHostDVD.cpp
207 endif
208 ifn1of ($(KBUILD_TARGET), darwin freebsd os2 solaris)
209 VBoxDD_SOURCES += Storage/DrvHostFloppy.cpp
210 endif
211
212
213 ifn1of ($(KBUILD_TARGET), darwin)
214 VBoxDD_SOURCES += Storage/HBDMgmt-generic.cpp
215 endif
216
217 VBoxDD_SOURCES.darwin += \
218 Storage/HBDMgmt-darwin.cpp \
219 Storage/DrvHostBase-darwin.cpp
220
221 VBoxDD_SOURCES.freebsd += \
222 Storage/DrvHostBase-freebsd.cpp
223
224 VBoxDD_SOURCES.linux += \
225 Storage/DrvHostBase-linux.cpp
226
227 VBoxDD_SOURCES.solaris += \
228 Storage/DrvHostBase-solaris.cpp
229
230 VBoxDD_SOURCES.win += \
231 Storage/DrvHostBase-win.cpp
232
233 #VBoxDD_SOURCES.win += Storage/HBDMgmt-win.cpp #Disabled until remaining issues are sorted out
234
235 VBoxDD_LIBS = # more later.
236 VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \
237 -framework CoreAudio \
238 -framework AudioUnit \
239 -framework AudioToolbox \
240 -framework IOKit \
241 -framework Carbon \
242 -framework DiskArbitration \
243 -framework SystemConfiguration
244 VBoxDD_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
245
246 # --- Tracing bits. ---
247
248 ifdef VBOX_WITH_DTRACE_R3
249 VBoxDD_DEFS += VBOX_WITH_DTRACE
250 VBoxDD_USES += dtrace
251 VBoxDD_SOURCES += build/VBoxDD.d
252 endif
253
254 # --- Graphics bits. ---
255
256 ifdef VBOXWDDM_TEST_UHGSMI
257 VBoxDD_DEFS += VBOXWDDM_TEST_UHGSMI
258 endif
259 ifdef VBOXWDDM_WITH_VBVA
260 VBoxDD_DEFS += VBOXWDDM_WITH_VBVA
261 endif
262 ifdef VBOX_WITH_VIDEOHWACCEL
263 VBoxDD_DEFS += VBOX_WITH_VIDEOHWACCEL
264 endif
265
266 ifdef VBOX_WITH_HGSMI
267 VBoxDD_DEFS += VBOX_WITH_HGSMI
268 VBoxDD_SOURCES += \
269 Graphics/DevVGA_VBVA.cpp \
270 Graphics/HGSMI/HGSMIHost.cpp
271 VBoxDD_LIBS += \
272 $(PATH_STAGE_LIB)/HGSMIHostR3Lib$(VBOX_SUFF_LIB)
273 endif
274
275 ifdef VBOX_WITH_WDDM
276 VBoxDD_DEFS += VBOX_WITH_WDDM
277 VBoxDD_SOURCES += \
278 Graphics/HGSMI/SHGSMIHost.cpp
279 endif
280
281 ifdef VBOX_WITH_VMSVGA
282 VBoxDD_DEFS += VBOX_WITH_VMSVGA
283 VBoxDD_SOURCES += Graphics/DevVGA-SVGA.cpp
284 endif
285 ifdef VBOX_WITH_VMSVGA3D
286 if1of ($(KBUILD_TARGET), linux win)
287# Dynamically load 3D library (opengl32, libGL).
288# This is a temporary solution. In future the 3D backend will be in a separate library.
289VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1
290 endif
291 VBoxDD_DEFS += VBOX_WITH_VMSVGA3D
292 VBoxDD_SOURCES += \
293 Graphics/DevVGA-SVGA3d.cpp \
294 Graphics/DevVGA-SVGA3d-info.cpp \
295 Graphics/DevVGA-SVGA3d-shared.cpp \
296 Graphics/DevVGA-SVGA3d-savedstate.cpp
297 if "$(KBUILD_TARGET)" == "win" && !defined(VBOX_WITH_VMSVGA3D_USE_OPENGL)
298 VBoxDD_DEFS += VMSVGA3D_DIRECT3D
299 VBoxDD_SOURCES += Graphics/DevVGA-SVGA3d-win.cpp
300 VBoxDD_LIBS.win += d3d9.lib $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
301 VBoxDD_LDFLAGS.win += /DELAYLOAD:d3d9.dll
302 else
303 VBoxDD_DEFS += VMSVGA3D_OPENGL
304 VBoxDD_SOURCES += \
305 Graphics/DevVGA-SVGA3d-ogl.cpp \
306 $(VBoxDD_0_OUTDIR)/VBoxSVGA3DLazyLoad.asm
307 VBoxDD_SOURCES.darwin += \
308 $(VBoxDD_0_OUTDIR)/VBoxSVGA3DObjCLazyLoad.asm
309 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/VBoxSVGA3DLazyLoad.asm
310 $$(VBoxDD_0_OUTDIR)/VBoxSVGA3DLazyLoad.asm: $(PATH_SUB_CURRENT)/Graphics/VBoxSVGA3D.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
311 $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxDD,$(filter %.def, $^),$@)
312 $(QUIET)$(RM) -f -- "$@"
313 $(VBOX_DEF_2_LAZY_LOAD) --explicit-load-function --library VBoxSVGA3D --output "$@" $(filter %.def, $^)
314 $$(VBoxDD_0_OUTDIR)/VBoxSVGA3DObjCLazyLoad.asm: $(PATH_SUB_CURRENT)/Graphics/VBoxSVGA3DObjC.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
315 $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxDD,$(filter %.def, $^),$@)
316 $(QUIET)$(RM) -f -- "$@"
317 $(VBOX_DEF_2_LAZY_LOAD) --explicit-load-function --library VBoxSVGA3DObjC --output "$@" $(filter %.def, $^)
318
319 ifdef VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD
320 VBoxDD_DEFS += VMSVGA3D_DYNAMIC_LOAD
321 VBoxDD_SOURCES += \
322 Graphics/DevVGA-SVGA3d-glLdr.cpp
323 else
324 VBoxDD_LIBS.linux += X11 GL
325 VBoxDD_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
326 endif
327 VBoxDD_LDFLAGS.darwin += -framework OpenGL
328 VBoxDD_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
329 if 0 # Use the OpenGL 3.2 Core profile (see also VBoxSVGA3D_DEFS.darwin and VBoxSVGA3DObjC_DEFS.darwin).
330 VBoxDD_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
331 else
332 VBoxDD_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
333 endif
334 endif
335 if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.6 10.5 10.4)
336 Graphics/DevVGA-SVGA3d.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
337 Graphics/DevVGA-SVGA3d-info.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
338 Graphics/DevVGA-SVGA3d-shared.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
339 Graphics/DevVGA-SVGA3d-savedstate.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
340 Graphics/DevVGA-SVGA3d-ogl.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
341 endif
342 endif
343
344 ifdef VBOX_WITH_VDMA
345 VBoxDD_DEFS += VBOX_WITH_VDMA
346 VBoxDD_SOURCES += \
347 Graphics/DevVGA_VDMA.cpp
348 endif
349
350 ifdef VBOX_WITH_PXE_ROM
351 VBoxDD_DEFS += VBOX_WITH_PXE_ROM
352 endif
353
354 # --- USB bits. ---
355
356 ifdef VBOX_WITH_USB
357 VBoxDD_DEFS += VBOX_WITH_USB
358 VBoxDD_SOURCES += \
359 USB/vrdp/USBProxyDevice-vrdp.cpp \
360 USB/usbip/USBProxyDevice-usbip.cpp
361
362 VBoxDD_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
363 VBoxDD_SOURCES.darwin += \
364 USB/USBProxyDevice.cpp \
365 USB/darwin/USBProxyDevice-darwin.cpp
366
367 VBoxDD_DEFS.linux += \
368 VUSB_HAVE_USBPROXY_DEVICE \
369 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
370 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
371 VBoxDD_SOURCES.linux += \
372 USB/USBProxyDevice.cpp \
373 USB/linux/USBProxyDevice-linux.cpp
374
375 VBoxDD_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
376 VBoxDD_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
377 VBoxDD_SOURCES.os2 += \
378 USB/USBProxyDevice.cpp \
379 USB/os2/USBProxyDevice-os2.cpp
380
381 VBoxDD_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
382 VBoxDD_SOURCES.win += \
383 USB/USBProxyDevice.cpp \
384 USB/win/USBProxyDevice-win.cpp
385
386 VBoxDD_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
387 VBoxDD_SOURCES.solaris+= \
388 USB/USBProxyDevice.cpp \
389 USB/solaris/USBProxyDevice-solaris.cpp
390
391 VBoxDD_DEFS.freebsd += VUSB_HAVE_USBPROXY_DEVICE
392 VBoxDD_SOURCES.freebsd+= \
393 USB/USBProxyDevice.cpp \
394 USB/freebsd/USBProxyDevice-freebsd.cpp
395
396 ifdef VBOX_WITH_SCSI
397 VBoxDD_SOURCES += \
398 Storage/UsbMsd.cpp
399 endif
400
401 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
402 VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
403 VBoxDD_SOURCES += \
404 USB/DevEHCI.cpp
405 endif
406
407 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
408 VBoxDD_DEFS += VBOX_WITH_XHCI_IMPL
409 VBoxDD_SOURCES += \
410 USB/DevXHCI.cpp
411 endif
412
413 if defined(VBOX_WITH_USB_VIDEO_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
414 if1of ($(KBUILD_TARGET), linux)
415 VBoxDD_DEFS += VBOX_WITH_USB_VIDEO_IMPL
416 VBoxDD_SOURCES += \
417 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcam.cpp \
418 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcamDesc.cpp \
419 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/jpggen.cpp \
420 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/DrvHostWebcam.cpp \
421 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp
422 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp_INCS = \
423 $(VBOX_JPEG_INCS)
424 VBoxDD_SOURCES.linux += \
425 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/HostWebcam-v4l2.cpp
426 VBoxDD_LIBS += \
427 $(PATH_STAGE_LIB)/VBox-libjpeg$(VBOX_SUFF_LIB)
428 endif
429 endif
430
431 endif # VBOX_WITH_USB
432
433 ifdef VBOX_WITH_VUSB
434 VBoxDD_DEFS += VBOX_WITH_VUSB
435 VBoxDD_SOURCES += \
436 USB/DevOHCI.cpp \
437 USB/DrvVUSBRootHub.cpp \
438 USB/VUSBDevice.cpp \
439 USB/VUSBSniffer.cpp \
440 USB/VUSBSnifferPcapNg.cpp \
441 USB/VUSBSnifferUsbMon.cpp \
442 USB/VUSBSnifferVmx.cpp \
443 USB/VUSBUrb.cpp \
444 USB/VUSBUrbPool.cpp \
445 USB/VUSBUrbTrace.cpp
446 endif
447
448 # --- Networking bits. ---
449
450 ifdef VBOX_WITH_INIP
451 ifndef LWIP_SOURCES
452 include $(PATH_SUB_CURRENT)/Network/lwip-new/Config.kmk
453 endif
454 VBoxDD_DEFS += VBOX_WITH_INIP
455 VBoxDD_SOURCES += \
456 Network/DevINIP.cpp \
457 $(addprefix Network/lwip-new/,$(LWIP_SOURCES))
458 VBoxDD_INCS += \
459 Network \
460 $(addprefix Network/lwip-new/,$(LWIP_INCS))
461 endif # VBOX_WITH_INIP
462
463 ifdef VBOX_WITH_E1000
464 VBoxDD_DEFS += VBOX_WITH_E1000
465 VBoxDD_SOURCES += \
466 Network/DevE1000.cpp \
467 Network/DevE1000Phy.cpp \
468 Network/DevEEPROM.cpp
469 endif
470
471 ifdef VBOX_WITH_VIRTIO
472 VBoxDD_DEFS += VBOX_WITH_VIRTIO
473 VBoxDD_SOURCES += \
474 VirtIO/Virtio.cpp \
475 Network/DevVirtioNet.cpp
476 endif
477
478 ifdef VBOX_WITH_UDPTUNNEL
479 VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
480 VBoxDD_SOURCES += \
481 Network/DrvUDPTunnel.cpp
482 endif
483
484 ifdef VBOX_WITH_VDE
485 VBoxDD_DEFS += VBOX_WITH_VDE
486 VBoxDD_SOURCES += \
487 Network/DrvVDE.cpp \
488 Network/VDEPlug.cpp
489 endif
490
491 ifdef VBOX_WITH_NETSHAPER
492 VBoxDD_DEFS += VBOX_WITH_NETSHAPER
493 VBoxDD_SOURCES += \
494 Network/DrvNetShaper.cpp
495 endif
496
497 # --- Storage bits. ---
498
499 ifdef VBOX_WITH_AHCI
500 VBoxDD_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
501 VBoxDD_SOURCES += \
502 Storage/DevAHCI.cpp
503 endif
504
505 ifdef VBOX_WITH_BUSLOGIC
506 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
507 VBoxDD_SOURCES += \
508 Storage/DevBusLogic.cpp \
509 Storage/VBoxSCSI.cpp
510 endif
511
512 ifdef VBOX_WITH_LSILOGIC
513 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
514 VBoxDD_SOURCES += \
515 Storage/DevLsiLogicSCSI.cpp
516 endif
517
518 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
519 VBoxDD_DEFS += VBOX_WITH_NVME_IMPL
520 VBoxDD_SOURCES += \
521 Storage/DevNVMe.cpp
522 endif
523
524 ifdef VBOX_WITH_VIRTIO_SCSI
525 VBoxDD_DEFS += VBOX_WITH_VIRTIO_SCSI
526 VBoxDD_SOURCES += \
527 Virtio/Virtio_1_0.cpp \
528 Storage/DevVirtioSCSI.cpp
529 endif
530
531 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
532 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
533 endif
534
535 ifdef VBOX_WITH_SCSI
536 VBoxDD_DEFS += VBOX_WITH_SCSI
537 VBoxDD_SOURCES += \
538 Storage/DrvSCSI.cpp
539 endif
540
541 ifdef VBOX_WITH_ISCSI
542 $(eval $(call def_vbox_lwip_flags, \
543 VBoxDD, Storage/DrvVD.cpp, Network/lwip-new))
544 endif
545
546 ifdef VBOX_WITH_DRV_DISK_INTEGRITY
547 VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
548 VBoxDD_SOURCES += \
549 Storage/DrvDiskIntegrity.cpp \
550 Storage/DrvRamDisk.cpp
551 endif
552
553 ifdef VBOX_WITH_EFI
554 VBoxDD_DEFS += VBOX_WITH_EFI
555 VBoxDD_SOURCES += EFI/DevEFI.cpp
556 EFI/DevEFI.cpp_INCS += EFI/Firmware/BaseTools/Source/C/Include
557 EFI/DevEFI.cpp_INCS.x86 += EFI/Firmware/BaseTools/Source/C/Include/Ia32
558 EFI/DevEFI.cpp_INCS.amd64 += EFI/Firmware/BaseTools/Source/C/Include/X64
559 endif
560
561 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
562 VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
563 VBoxDD_SOURCES += \
564 Bus/DevPciRaw.cpp \
565 Bus/DrvPciRaw.cpp
566 endif
567
568 ifdef VBOX_WITH_MSI_DEVICES
569 VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
570 endif
571
572 ifdef VBOX_WITH_DYNAMIC_DSDT
573 VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
574 endif
575
576 # --- Audio bits (see also VBOX_AUDIO_DEFS in ./Config.kmk). ---
577
578 VBoxDD_DEFS += $(VBOX_AUDIO_DEFS)
579 VBoxDD_SOURCES += \
580 Audio/DevIchAc97.cpp \
581 Audio/DevSB16.cpp \
582 Audio/DevHDA.cpp \
583 Audio/DevHDACommon.cpp \
584 Audio/HDACodec.cpp \
585 Audio/HDAStream.cpp \
586 Audio/HDAStreamChannel.cpp \
587 Audio/HDAStreamMap.cpp \
588 Audio/HDAStreamPeriod.cpp \
589 Audio/AudioMixBuffer.cpp \
590 Audio/AudioMixer.cpp \
591 Audio/DrvAudio.cpp \
592 Audio/DrvAudioCommon.cpp \
593 Audio/DrvHostNullAudio.cpp
594
595 ifdef VBOX_WITH_AUDIO_DEBUG
596 VBoxDD_DEFS += VBOX_WITH_AUDIO_DEBUG
597 VBoxDD_SOURCES += \
598 Audio/DrvHostDebugAudio.cpp
599 endif
600
601 ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
602 VBoxDD_DEFS += VBOX_WITH_AUDIO_VALIDATIONKIT
603 VBoxDD_SOURCES += \
604 Audio/DrvHostValidationKit.cpp
605 endif
606
607 ifeq ($(KBUILD_TARGET),darwin)
608 VBoxDD_SOURCES += \
609 Audio/DrvHostCoreAudio.cpp
610 endif
611
612 ifeq ($(KBUILD_TARGET),win)
613 VBoxDD_SOURCES += \
614 Audio/DrvHostDSound.cpp
615 ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
616 VBoxDD_SOURCES += \
617 Audio/VBoxMMNotificationClient.cpp
618 VBoxDD_DEFS += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
619 endif
620 endif
621
622 ifdef VBOX_WITH_AUDIO_OSS
623 VBoxDD_DEFS += VBOX_WITH_AUDIO_OSS
624 VBoxDD_SOURCES += \
625 Audio/DrvHostOSSAudio.cpp
626 endif
627
628 ifdef VBOX_WITH_AUDIO_ALSA
629 VBoxDD_DEFS += VBOX_WITH_AUDIO_ALSA
630 VBoxDD_SOURCES += \
631 Audio/DrvHostALSAAudio.cpp \
632 Audio/alsa_stubs.c
633 endif
634
635 ifdef VBOX_WITH_AUDIO_PULSE
636 VBoxDD_DEFS += VBOX_WITH_AUDIO_PULSE
637 VBoxDD_SOURCES += \
638 Audio/DrvHostPulseAudio.cpp \
639 Audio/pulse_stubs.c
640 endif
641
642 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
643 VBOX_SLIRP_SOURCES = \
644 Network/DrvNAT.cpp \
645 Network/slirp/bootp.c \
646 Network/slirp/debug.c \
647 Network/slirp/ip_icmp.c \
648 Network/slirp/ip_input.c \
649 Network/slirp/ip_output.c \
650 Network/slirp/misc.c \
651 Network/slirp/sbuf.c \
652 Network/slirp/slirp.c \
653 Network/slirp/slirp_dns.c \
654 Network/slirp/socket.c \
655 Network/slirp/tcp_input.c \
656 Network/slirp/tcp_output.c \
657 Network/slirp/tcp_subr.c \
658 Network/slirp/tcp_timer.c \
659 Network/slirp/udp.c \
660 Network/slirp/hostres.c \
661 Network/slirp/dnsproxy/hash.c \
662 Network/slirp/tftp.c \
663 Network/slirp/dnsproxy/dnsproxy.c
664
665 ifeq ($(KBUILD_TARGET), win)
666 VBOX_SLIRP_SOURCES += Network/slirp/ip_icmpwin.c
667 else ifneq ($(KBUILD_TARGET),darwin)
668 # helper for debugging unprivileged
669# Network/slirp/ip_icmp.c_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
670# VBOX_SLIRP_SOURCES += ../NetworkServices/NAT/getrawsock.c
671 endif
672
673 ifneq ($(KBUILD_TARGET), win)
674 VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
675 endif
676
677 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
678 VBOX_SLIRP_BSD_SOURCES += \
679 Network/slirp/bsd/kern/kern_mbuf.c \
680 Network/slirp/bsd/kern/uipc_mbuf.c \
681 Network/slirp/bsd/kern/uipc_mbuf2.c \
682 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
683 VBOX_SLIRP_ALIAS_SOURCES = \
684 Network/slirp/libalias/alias.c \
685 Network/slirp/libalias/alias_db.c \
686 Network/slirp/libalias/alias_mod.c \
687 Network/slirp/libalias/alias_proxy.c \
688 Network/slirp/libalias/alias_ftp.c \
689 Network/slirp/libalias/alias_nbt.c \
690 Network/slirp/libalias/alias_util.c
691
692 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
693 # $(file)_DEFS or clean the code disabled with this definition.
694 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER=1
695
696 # dump memory related operations.
697 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
698
699 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
700 define def_vbox_slirp_cflags
701 $(file)_DEFS += \
702 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
703 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
704 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
705 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
706 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
707 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
708 $(file)_INCS += \
709 $(1)/slirp/bsd/sys \
710 $(1)/slirp/bsd/sys/sys \
711 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
712 $(1)/slirp/bsd/netinet \
713 $(1)/slirp \
714 $(1)/slirp/libalias
715 ifeq ($(KBUILD_TARGET),win)
716 $(file)_CFLAGS = -wd4018
717 else
718 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
719 endif
720 endef
721
722 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
723
724 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
725 define def_vbox_slirp_alias_cflags
726 $(file)_DEFS += VBOX_SLIRP_ALIAS \
727 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
728 $(file)_INCS += \
729 $(1)/slirp/libalias \
730 $(1)/slirp \
731 $(1)/slirp/dnsproxy
732 ifneq ($(KBUILD_TARGET),win)
733 $(file)_CFLAGS += -Wno-shadow
734 endif
735 endef
736 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
737 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
738
739 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
740 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
741 define def_vbox_slirp_bsd_cflags
742 $(file)_DEFS += VBOX_SLIRP_BSD
743 $(file)_INCS += $(1)/slirp/dnsproxy
744 endef
745 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
746 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
747
748
749 # --- OS specific driver hacks. ---
750
751 ifeq ($(KBUILD_TARGET),freebsd)
752 VBoxDD_SOURCES.freebsd += Network/DrvTAP.cpp
753 endif # freebsd
754
755 VBoxDD_SOURCES.linux += \
756 Network/DrvTAP.cpp \
757 Parallel/DrvHostParallel.cpp
758
759 ifeq ($(KBUILD_TARGET),solaris)
760 ifdef VBOX_WITH_SUID_WRAPPER
761 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
762 endif
763 endif
764
765 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
766 VBoxDD_SOURCES.win += \
767 Parallel/DrvHostParallel.cpp
768
769 ifdef VBOX_WITH_VIRTUALKD
770 VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
771 VBoxDD_SOURCES.win += \
772 Misc/VirtualKD.cpp
773 endif
774
775 if defined(VBOX_WITH_NETFLT)
776 VBoxDD_DEFS += VBOX_WITH_NETFLT
777 if defined(VBOX_NETFLT_ONDEMAND_BIND)
778 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
779 endif
780 endif
781
782 # --- Final bits, mostly libraries for order dependant linkers. ---
783
784 VBoxDD_LIBS += \
785 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
786 $(LIB_VMM) \
787 $(LIB_RUNTIME)
788 ifeq ($(KBUILD_TARGET),win)
789 VBoxDD_LIBS += \
790 $(LIB_DDU) \
791 $(PATH_STAGE_LIB)/VBoxDD2.lib \
792 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
793 else
794 VBoxDD_LIBS += \
795 $(VBoxDDU_1_STAGE_TARGET) \
796 $(VBoxDD2_1_STAGE_TARGET)
797 endif
798
799 ifdef VBOX_WITH_NETFLT
800 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.lib
801 endif
802
803 ifeq ($(KBUILD_TARGET),solaris)
804 VBoxDD_LIBS += adm
805 ifdef VBOX_WITH_SUID_WRAPPER
806 VBoxDD_LIBS += secdb
807 endif
808 ifdef VBOX_WITH_USB
809 VBoxDD_LIBS += aio
810 endif
811 endif
812
813 VBoxDD_LIBS.darwin += \
814 $(LIB_REM)
815
816
817 ifdef VBOX_WITH_DYNAMIC_DSDT
818 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
819 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
820
821 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
822 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
823 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
824
825 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
826
827 else # !VBOX_WITH_DYNAMIC_DSDT
828 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
829 VBoxDD_CLEAN += \
830 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
831 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
832 $(VBoxDD_0_OUTDIR)/vboxaml.aml.tmp \
833 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
834 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml \
835 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml.tmp \
836 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
837 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml \
838 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.tmp \
839 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.pre
840 PC/ACPI/VBoxAcpi.cpp_DEPS = \
841 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
842 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
843 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex
844
845 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
846 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
847 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
848 $(QUIET)$(MV) -f $@ [email protected]
849 $(QUIET)$(SED) -e "s/vboxaml_aml_code/AmlCode/g" \
850 --output $@ [email protected]
851 $(QUIET)$(RM) -f [email protected]
852
853 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
854
855 $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
856 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
857 $(QUIET)$(RM) -f $@ [email protected]
858 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
859 $(QUIET)$(MV) -f $@ [email protected]
860 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_standard_aml_code/AmlCodeSsdtStandard/g" \
861 --output $@ [email protected]
862 $(QUIET)$(RM) -f [email protected]
863
864
865 vboxssdt_standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex
866
867 $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
868 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
869 $(QUIET)$(RM) -f $@ [email protected] [email protected]
870 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o [email protected] $<
871 $(QUIET)$(SED) -e "s/<NL>/\n/g" \
872 --output [email protected] [email protected]
873 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ [email protected]
874 $(QUIET)$(MV) -f $@ [email protected]
875 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_cpuhotplug_aml_code/AmlCodeSsdtCpuHotPlug/g" \
876 --output $@ [email protected]
877 $(QUIET)$(RM) -f [email protected] [email protected] [email protected]
878
879
880 vboxssdt_cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex
881
882 endif # !VBOX_WITH_DYNAMIC_DSDT
883 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
884
885 # For finding PCIInternal.h from VBox/pci.h.
886 Bus/DevPCI.cpp_INCS = Bus
887 Bus/DevPciIch9.cpp_INCS = Bus
888 Bus/MsiCommon.cpp_INCS = Bus
889 Bus/MsixCommon.cpp_INCS = Bus
890 Bus/DevPciRaw.cpp_INCS = Bus
891
892 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
893 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR) $(VBOX_GRAPHICS_INCS)
894 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
895
896 $(call VBOX_SET_VER_INFO_DLL,VBoxDD,VirtualBox VMM Devices and Drivers) # (last!)
897
898
899 ifdef VBOX_WITH_RAW_MODE
900 #
901 # VBoxDDRC (sysmod)
902 #
903 VBoxDDRC_TEMPLATE = VBoxRc
904 ifeq ($(KBUILD_TARGET_ARCH),x86)
905 VBoxDDRC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
906 endif
907 VBoxDDRC_DEFS = $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
908 VBoxDDRC_INCS = build $(VBOX_GRAPHICS_INCS)
909 VBoxDDRC_SOURCES = \
910 Bus/DevPCI.cpp \
911 Bus/DevPciIch9.cpp \
912 Bus/MsiCommon.cpp \
913 Bus/MsixCommon.cpp \
914 EFI/DevSmc.cpp \
915 Graphics/DevVGA.cpp \
916 Input/DevPS2.cpp \
917 Input/PS2K.cpp \
918 Input/PS2M.cpp \
919 PC/DevACPI.cpp \
920 PC/DevIoApic.cpp \
921 PC/DevPit-i8254.cpp \
922 PC/DevPIC.cpp \
923 PC/DevRTC.cpp \
924 PC/DevDMA.cpp \
925 PC/DevHPET.cpp \
926 Storage/DevATA.cpp \
927 Network/DevPCNet.cpp \
928 Serial/DevSerial.cpp \
929 Serial/DevOxPcie958.cpp \
930 Serial/UartCore.cpp \
931 Parallel/DevParallel.cpp \
932 VMMDev/VMMDev.cpp \
933 VMMDev/VMMDevTesting.cpp
934
935 VBoxDDRC_DEFS += $(VBOX_AUDIO_DEFS)
936 VBoxDDRC_SOURCES += \
937 Audio/DevHDA.cpp \
938 Audio/DevHDACommon.cpp \
939 Audio/DevIchAc97.cpp
940
941 VBoxDDRC_DEFS += \
942 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
943 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
944 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
945
946 ifdef VBOX_WITH_E1000
947 VBoxDDRC_DEFS += VBOX_WITH_E1000
948 VBoxDDRC_SOURCES += \
949 Network/DevE1000.cpp \
950 Network/DevE1000Phy.cpp
951 endif
952
953 ifdef VBOX_WITH_VIRTIO
954 VBoxDDRC_DEFS += VBOX_WITH_VIRTIO
955 VBoxDDRC_SOURCES += \
956 VirtIO/Virtio.cpp \
957 Network/DevVirtioNet.cpp
958 endif
959
960 ifdef VBOX_WITH_HGSMI
961 VBoxDDRC_DEFS += VBOX_WITH_HGSMI
962 endif
963 ifdef VBOX_WITH_WDDM
964 VBoxDDRC_DEFS += VBOX_WITH_WDDM
965 endif
966 ifdef VBOX_WITH_VDMA
967 VBoxDDRC_DEFS += VBOX_WITH_VDMA
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
981 ifdef VBOX_WITH_VUSB
982 VBoxDDRC_DEFS += VBOX_WITH_VUSB
983 VBoxDDRC_SOURCES += \
984 USB/DevOHCI.cpp
985 endif
986
987 ifdef VBOX_WITH_USB
988 VBoxDDRC_DEFS += VBOX_WITH_USB
989 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
990 VBoxDDRC_DEFS += VBOX_WITH_EHCI_IMPL
991 VBoxDDRC_SOURCES += \
992 USB/DevEHCI.cpp
993 endif
994 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
995 VBoxDDRC_DEFS += VBOX_WITH_XHCI_IMPL
996 VBoxDDRC_SOURCES += \
997 USB/DevXHCI.cpp
998 endif
999 endif
1000
1001 ifdef VBOX_WITH_VIDEOHWACCEL
1002 VBoxDDRC_DEFS += VBOX_WITH_VIDEOHWACCEL
1003 endif
1004
1005 ifdef VBOX_WITH_AHCI
1006 VBoxDDRC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
1007 VBoxDDRC_SOURCES += \
1008 Storage/DevAHCI.cpp
1009 endif
1010
1011 ifdef VBOX_WITH_BUSLOGIC
1012 VBoxDDRC_DEFS += VBOX_WITH_BUSLOGIC
1013 VBoxDDRC_SOURCES += \
1014 Storage/DevBusLogic.cpp
1015 endif
1016
1017 ifdef VBOX_WITH_LSILOGIC
1018 VBoxDDRC_DEFS += VBOX_WITH_LSILOGIC
1019 VBoxDDRC_SOURCES += \
1020 Storage/DevLsiLogicSCSI.cpp
1021 endif
1022
1023 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1024 VBoxDDGC_DEFS += VBOX_WITH_NVME_IMPL
1025 VBoxDDGC_SOURCES += \
1026 Storage/DevNVMe.cpp
1027 endif
1028
1029 if1of ($(VBOX_LDR_FMT32), pe lx)
1030 VBoxDDRC_LIBS = \
1031 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1032 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1033 endif
1034 $(call VBOX_SET_VER_INFO_RC,VBoxDDRC,VirtualBox VMM Devices and Drivers$(COMMA) raw-mode) # last!
1035 endif # VBOX_WITH_RAW_MODE
1036
1037
1038 #
1039 # VBoxDD2 (shared object)
1040 #
1041 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
1042 VBoxDD2_DEFS = \
1043 IN_VBOXDD2 \
1044 $(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,) \
1045 $(if $(VBOX_WITH_NEW_LPC_DEVICE),VBOX_WITH_NEW_LPC_DEVICE,)
1046 VBoxDD2_INCS := \
1047 build \
1048 $(PATH_SUB_CURRENT)
1049 VBoxDD2_SOURCES = \
1050 build/VBoxDD2.cpp \
1051 $(if $(VBOX_WITH_NEW_LPC_DEVICE),,PC/DevLPC.cpp)
1052 VBoxDD2_LIBS = \
1053 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1054 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1055 $(if $(VBOX_WITH_PXE_ROM),\
1056 $(if $(VBOX_WITH_INTEL_PXE),\
1057 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB),\
1058 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1059 $(LIB_VMM) \
1060 $(LIB_RUNTIME)
1061 VBoxDD2_LIBS.darwin += $(LIB_REM)
1062 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1063 VBoxDD2_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
1064
1065 $(call VBOX_SET_VER_INFO_DLL,VBoxDD2,VirtualBox VMM Devices and Drivers 2) # (last!)
1066
1067 #
1068 # VBoxDDR0 (sysmod)
1069 #
1070 VBoxDDR0_TEMPLATE = VBoxR0
1071 VBoxDDR0_DEFS = IN_RT_R0 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) # - WTF is IN_RT_R0 doing here?
1072 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1073 VBoxDDR0_INCS = build $(VBOX_GRAPHICS_INCS)
1074 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1075 VBoxDDR0_SOURCES = \
1076 build/VBoxDDR0.cpp \
1077 Bus/DevPCI.cpp \
1078 Bus/DevPciIch9.cpp \
1079 Bus/MsiCommon.cpp \
1080 Bus/MsixCommon.cpp \
1081 EFI/DevSmc.cpp \
1082 Graphics/DevVGA.cpp \
1083 Input/DevPS2.cpp \
1084 Input/PS2K.cpp \
1085 Input/PS2M.cpp \
1086 PC/DevACPI.cpp \
1087 PC/DevIoApic.cpp \
1088 PC/DevPit-i8254.cpp \
1089 PC/DevPIC.cpp \
1090 PC/DevRTC.cpp \
1091 PC/DevDMA.cpp \
1092 PC/DevHPET.cpp \
1093 Storage/DevATA.cpp \
1094 Network/DevPCNet.cpp \
1095 Serial/DevSerial.cpp \
1096 Serial/DevOxPcie958.cpp \
1097 Serial/UartCore.cpp \
1098 Parallel/DevParallel.cpp \
1099 VMMDev/VMMDev.cpp \
1100 VMMDev/VMMDevTesting.cpp \
1101 Network/DrvIntNet.cpp \
1102 Network/DrvDedicatedNic.cpp
1103
1104 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1105
1106 VBoxDDR0_DEFS += \
1107 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
1108 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
1109 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
1110 $(if $(VBOXWDDM_WITH_VBVA),VBOXWDDM_WITH_VBVA,) \
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 = VBOX_IN_VMM IN_INTNET_R0 IN_RT_R0 $(VMM_COMMON_DEFS) \
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 && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1324
1325
1326if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
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 ifdef PXE_EXPERIMENTAL_BUILD_SETUP
1422 VBoxExtPackPuelInsRoms_SOURCES = $(PATH_OUT)/obj/NetBiosBin/NetBiosBin.rom=>PXE-Intel.rom
1423 else
1424 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1425 endif
1426endif # VBOX_WITH_EXTPACK_PUEL && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1427
1428
1429if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1430 #
1431 # Template used for VBoxSVGA3D. (Strips away compiler options.)
1432 #
1433 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1434 TEMPLATE_VBoxSVGA3D_EXTENDS := $(if-expr "$(KBUILD_TARGET)" == "darwin" && !defined(VBOX_WITH_NEW_XCODE),VBoxR3DllOsX107,VBOXR3)
1435 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1436 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1437 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1438 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1439 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_LDFLAGS.darwin) \
1440 -framework AppKit -framework OpenGL -framework IOKit
1441
1442 #
1443 # The shader library used by the SVGA3D implementation.
1444 #
1445 DLLS += VBoxSVGA3D
1446 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1447 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1448 VBoxSVGA3D_DEFS = \
1449 __WINESRC__ \
1450 WINE_UNICODE_API="" \
1451 _REENTRANT \
1452 WINE_NOWINSOCK \
1453 VBOX_WITH_VMSVGA \
1454 VBOX_WITH_VMSVGA3D \
1455 DLLDIR=\"\" \
1456 BINDIR=\"\" \
1457 LIB_TO_BINDIR=\"\" \
1458 LIB_TO_DLLDIR=\"\" \
1459 BIN_TO_DLLDIR=\"\" \
1460 LIB_TO_DATADIR=\"\" \
1461 BIN_TO_DATADIR=\"\" \
1462 _USE_MATH_DEFINES \
1463 VBOX_USING_WINDDK_W7_OR_LATER \
1464 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1465 IN_vmsvgashader_STATIC \
1466 IN_VMSVGA3D \
1467 VBOX_WINE_WITH_IPRT
1468 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1469 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1470 endif
1471 VBoxSVGA3D_DEFS.x86 += __i386__
1472 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1473 VBoxSVGA3D_DEFS.win += \
1474 USE_WIN32_OPENGL \
1475 VBOX_WINE_WITHOUT_LIBWINE
1476 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1477 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1478 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1479 else
1480 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1481 endif
1482
1483 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1484 VBoxSVGA3D_DEFS.darwin += \
1485 __builtin_ms_va_list=va_list \
1486 __stdcall= \
1487 ms_abi=
1488 VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS)
1489 VBoxSVGA3D_INCS.win := \
1490 Graphics/shaderlib/libWineStub/include
1491 VBoxSVGA3D_INCS.linux := \
1492 Graphics/shaderlib/wine/include
1493 VBoxSVGA3D_INCS.darwin := \
1494 Graphics/ \
1495 Graphics/shaderlib/wine/include
1496 VBoxSVGA3D_SOURCES := \
1497 Graphics/shaderlib/glsl_shader.c \
1498 Graphics/shaderlib/shader.c \
1499 Graphics/shaderlib/shader_sm1.c \
1500 Graphics/shaderlib/shader_sm4.c \
1501 Graphics/shaderlib/shaderapi.c \
1502 Graphics/shaderlib/utils.c \
1503 Graphics/shaderlib/stateblock.c \
1504 Graphics/shaderlib/directx.c \
1505 Graphics/shaderlib/libWineStub/debug.c
1506 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1507 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1508 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1509 VBoxSVGA3D_LIBS += GL
1510 endif
1511 VBoxSVGA3D_LDFLAGS.darwin += \
1512 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1513 $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
1514 # -wd4100: unreferenced format parameter
1515 # -wd4204: nonstandard extension used : non-constant initializer
1516 # -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
1517 # -wd4305: 'function' : truncation from 'double' to 'GLclampf'
1518 VBoxSVGA3D_CFLAGS.win = -wd4100 -wd4204 -wd4245 -wd4305
1519 ifneq ($(KBUILD_TARGET),win)
1520 VBoxSVGA3D_CFLAGS += -Wno-unused-parameter -Wno-unused-function
1521 endif
1522
1523 #
1524 # The Objective C code needs to be separate since the shaderlib redefines most
1525 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1526 # functions directly. This module must be compiled for 10.7 or later, thus it
1527 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1528 #
1529 DLLS.darwin += VBoxSVGA3DObjC
1530 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1531 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS) IN_VMSVGA3DCOCOA
1532 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1533 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1534 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1535 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1536 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1537 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1538 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1539 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1540 -framework OpenGL
1541 VBoxSVGA3DObjC_SOURCES.darwin += \
1542 Graphics/DevVGA-SVGA3d-cocoa.m
1543
1544
1545endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1546
1547include $(FILE_KBUILD_SUB_FOOTER)
1548
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