VirtualBox

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

Last change on this file since 66969 was 66125, checked in by vboxsync, 8 years ago

bugref:8019: Undefined behaviour sanitiser: add a build option VBOX_WITH_GCC_SANITIZER to enable the gcc undefined behaviour, address, return, bounds, object size, alignment and vptr sanitiser tools.

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