VirtualBox

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

Last change on this file since 93466 was 93450, checked in by vboxsync, 3 years ago

Devices: Drop linking with LIB_VMM and LIB_REM linking. bugref:10074

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