VirtualBox

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

Last change on this file since 91942 was 91768, checked in by vboxsync, 3 years ago

Config.kmk,++: Define VBOX_LIB_SUPR0 for SUPR0.lib/.a on platforms where it's needed and skip all the if'ing. bugref:10124

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