VirtualBox

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

Last change on this file since 63845 was 63711, checked in by vboxsync, 8 years ago

Audio: Implemented support for audio device enumeration handling, audio device information and audio backend notifications. This will enable to let the backends tell the audio subsystem that the host audio configuration has changed and react accordingly to it. For now only the Core Audio backend supports device enumeration. Further this also will get rid of the static initialization on the device emulation side, which, if at VM startup no audio input(s) / output(s) were available, was triggering a warning. The NULL backend therefore does not need to act as a (static) fallback anymore.

Work in progress.

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