VirtualBox

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

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

Devices: Preps for embedding the EFI firmware into VBoxDD2.

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette