VirtualBox

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

Last change on this file since 68080 was 67961, checked in by vboxsync, 7 years ago

VSCSI: Added virtual SSC device. WIP, disabled by default.

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