VirtualBox

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

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

Copyright year updates by scm.

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