VirtualBox

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

Last change on this file since 86861 was 86838, checked in by vboxsync, 4 years ago

Devices/Graphics: A couple of new commands; a more generic handler for creating a surface; cleaned saved state data for a surface; increased saved state version; possibility to build DX11 backend. bugref:9830

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

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