VirtualBox

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

Last change on this file since 93072 was 92996, checked in by vboxsync, 3 years ago

virtio-net works on linux in local testing, and virtio-scsi works on windows. Integrating the switchover to make DevVirtioNet_1_0.cpp the 'virtio-net' option in the Virtual Network Controller list.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 55.0 KB
Line 
1# $Id: Makefile.kmk 92996 2021-12-17 08:18:43Z 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_SDKS.win += VBOX_WIN_NEWDEV
109 VBoxDDU_LIBS += \
110 $(PATH_STAGE_LIB)/USBLib$(VBOX_SUFF_LIB)
111 VBoxDDU_LIBS.win += \
112 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_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/VirtioCore.cpp \
526 Network/DevVirtioNet_1_0.cpp
527 endif
528
529
530 ifdef VBOX_WITH_UDPTUNNEL
531 VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
532 VBoxDD_SOURCES += \
533 Network/DrvUDPTunnel.cpp
534 endif
535
536 ifdef VBOX_WITH_VDE
537 VBoxDD_DEFS += VBOX_WITH_VDE
538 VBoxDD_SOURCES += \
539 Network/DrvVDE.cpp \
540 Network/VDEPlug.cpp
541 endif
542
543 ifdef VBOX_WITH_NETSHAPER
544 VBoxDD_DEFS += VBOX_WITH_NETSHAPER
545 VBoxDD_SOURCES += \
546 Network/DrvNetShaper.cpp
547 endif
548
549 ifdef VBOX_WITH_VMNET
550 VBoxDD_DEFS += VBOX_WITH_VMNET
551 VBoxDD_SOURCES += \
552 Network/DrvVMNet.m
553 VBoxDD_LDFLAGS += -framework vmnet
554 endif
555
556 # --- Storage bits. ---
557
558 ifdef VBOX_WITH_AHCI
559 VBoxDD_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
560 VBoxDD_SOURCES += \
561 Storage/DevAHCI.cpp
562 endif
563
564 ifdef VBOX_WITH_BUSLOGIC
565 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
566 VBoxDD_SOURCES += \
567 Storage/DevBusLogic.cpp
568 endif
569
570 ifdef VBOX_WITH_LSILOGIC
571 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
572 VBoxDD_SOURCES += \
573 Storage/DevLsiLogicSCSI.cpp
574 endif
575
576 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
577 VBoxDD_DEFS += VBOX_WITH_NVME_IMPL
578 VBoxDD_SOURCES += \
579 Storage/DevNVMe.cpp
580 endif
581
582 if defined(VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_SCSI)
583 VBoxDD_DEFS += VBOX_WITH_VIRTIO_SCSI
584 VBoxDD_SOURCES += \
585 Storage/DevVirtioSCSI.cpp
586 endif
587
588 if defined(VBOX_WITH_TPM)
589 VBoxDD_DEFS += VBOX_WITH_TPM
590 VBoxDD_SOURCES += \
591 Security/DevTpm.cpp \
592 Security/DrvTpmEmu.cpp
593
594 VBoxDD_SOURCES.linux += \
595 Security/DrvTpmHost.cpp
596
597 VBoxDD_SOURCES.win += \
598 Security/DrvTpmHost.cpp
599
600 if defined(VBOX_WITH_LIBTPMS)
601 VBoxDD_SDKS += VBOX_TPMS
602 VBoxDD_DEFS += VBOX_WITH_LIBTPMS
603 VBoxDD_SOURCES += \
604 Security/DrvTpmEmuTpms.cpp
605 endif
606 endif
607
608 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
609 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
610 endif
611
612 ifdef VBOX_WITH_SCSI
613 VBoxDD_DEFS += VBOX_WITH_SCSI
614 VBoxDD_SOURCES += \
615 Storage/DrvSCSI.cpp
616 endif
617
618 ifdef VBOX_WITH_ISCSI
619 $(eval $(call def_vbox_lwip_flags, \
620 VBoxDD, Storage/DrvVD.cpp, Network/lwip-new))
621 endif
622
623 ifdef VBOX_WITH_DRV_DISK_INTEGRITY
624 VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
625 VBoxDD_SOURCES += \
626 Storage/DrvDiskIntegrity.cpp \
627 Storage/DrvRamDisk.cpp
628 endif
629
630 ifdef VBOX_WITH_EFI
631 VBoxDD_DEFS += VBOX_WITH_EFI
632 VBoxDD_SOURCES += EFI/DevEFI.cpp
633 EFI/DevEFI.cpp_INCS += EFI/Firmware/BaseTools/Source/C/Include
634 EFI/DevEFI.cpp_INCS.x86 += EFI/Firmware/BaseTools/Source/C/Include/Ia32
635 EFI/DevEFI.cpp_INCS.amd64 += EFI/Firmware/BaseTools/Source/C/Include/X64
636 EFI/DevEFI.cpp_INCS.arm32 += EFI/Firmware/BaseTools/Source/C/Include/Arm
637 EFI/DevEFI.cpp_INCS.arm64 += EFI/Firmware/BaseTools/Source/C/Include/Aarch64
638 endif
639
640 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
641 VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
642 VBoxDD_SOURCES += \
643 Bus/DevPciRaw.cpp \
644 Bus/DrvPciRaw.cpp
645 endif
646
647 ifdef VBOX_WITH_MSI_DEVICES
648 VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
649 endif
650
651 ifdef VBOX_WITH_DYNAMIC_DSDT
652 VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
653 endif
654
655 # --- Audio bits (see also VBOX_AUDIO_DEFS in ./Config.kmk). ---
656
657 VBoxDD_DEFS += $(VBOX_AUDIO_DEFS)
658 VBoxDD_SOURCES += \
659 Audio/DevIchAc97.cpp \
660 Audio/DevSB16.cpp \
661 Audio/DevHda.cpp \
662 Audio/DevHdaCodec.cpp \
663 Audio/DevHdaStream.cpp \
664 Audio/AudioHlp.cpp \
665 Audio/AudioMixBuffer.cpp \
666 Audio/AudioMixer.cpp \
667 Audio/DrvAudio.cpp \
668 Audio/DrvHostAudioNull.cpp
669
670 if defined(VBOX_WITH_AUDIO_DEBUG) || defined(VBOX_WITH_AUDIO_VALIDATIONKIT)
671 VBoxDD_SOURCES += \
672 Audio/AudioTest.cpp \
673 Audio/AudioTestService.cpp \
674 Audio/AudioTestServiceTcp.cpp \
675 Audio/AudioTestServiceProtocol.cpp
676 endif
677
678 ifdef VBOX_WITH_AUDIO_DEBUG
679 VBoxDD_DEFS += VBOX_WITH_AUDIO_DEBUG
680 VBoxDD_SOURCES += \
681 Audio/DrvHostAudioDebug.cpp
682 endif
683
684 ifdef VBOX_WITH_AUDIO_VALIDATIONKIT
685 VBoxDD_DEFS += VBOX_WITH_AUDIO_VALIDATIONKIT
686 VBoxDD_SOURCES += \
687 Audio/DrvHostAudioValidationKit.cpp
688 endif
689
690 ifeq ($(KBUILD_TARGET),darwin)
691 VBoxDD_SOURCES += \
692 Audio/DrvHostAudioCoreAudio.cpp \
693 Audio/DrvHostAudioCoreAudioAuth.mm
694 endif
695
696 ifeq ($(KBUILD_TARGET),win)
697 VBoxDD_SOURCES += \
698 Audio/DrvHostAudioDSound.cpp \
699 Audio/DrvHostAudioWasApi.cpp
700 ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
701 VBoxDD_DEFS += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
702 VBoxDD_SOURCES += \
703 Audio/DrvHostAudioDSoundMMNotifClient.cpp
704 endif
705 endif
706
707 ifdef VBOX_WITH_AUDIO_OSS
708 VBoxDD_DEFS += VBOX_WITH_AUDIO_OSS
709 VBoxDD_SOURCES += \
710 Audio/DrvHostAudioOss.cpp
711 endif
712
713 ifdef VBOX_WITH_AUDIO_ALSA
714 VBoxDD_DEFS += VBOX_WITH_AUDIO_ALSA
715 VBoxDD_SOURCES += \
716 Audio/DrvHostAudioAlsa.cpp \
717 Audio/DrvHostAudioAlsaStubs.cpp
718 endif
719
720 ifdef VBOX_WITH_AUDIO_PULSE
721 VBoxDD_DEFS += VBOX_WITH_AUDIO_PULSE
722 VBoxDD_SOURCES += \
723 Audio/DrvHostAudioPulseAudio.cpp \
724 Audio/DrvHostAudioPulseAudioStubs.cpp
725 endif
726
727 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
728 VBOX_SLIRP_SOURCES = \
729 Network/DrvNAT.cpp \
730 Network/slirp/bootp.c \
731 Network/slirp/debug.c \
732 Network/slirp/ip_icmp.c \
733 Network/slirp/ip_input.c \
734 Network/slirp/ip_output.c \
735 Network/slirp/misc.c \
736 Network/slirp/sbuf.c \
737 Network/slirp/slirp.c \
738 Network/slirp/slirp_dns.c \
739 Network/slirp/socket.c \
740 Network/slirp/tcp_input.c \
741 Network/slirp/tcp_output.c \
742 Network/slirp/tcp_subr.c \
743 Network/slirp/tcp_timer.c \
744 Network/slirp/udp.c \
745 Network/slirp/hostres.c \
746 Network/slirp/dnsproxy/hash.c \
747 Network/slirp/tftp.c \
748 Network/slirp/dnsproxy/dnsproxy.c
749
750 ifeq ($(KBUILD_TARGET), win)
751 VBOX_SLIRP_SOURCES += Network/slirp/ip_icmpwin.c
752 else ifneq ($(KBUILD_TARGET),darwin)
753 # helper for debugging unprivileged
754# Network/slirp/ip_icmp.c_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
755# VBOX_SLIRP_SOURCES += ../NetworkServices/NAT/getrawsock.c
756 endif
757
758 ifneq ($(KBUILD_TARGET), win)
759 VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
760 endif
761
762 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
763 VBOX_SLIRP_BSD_SOURCES += \
764 Network/slirp/bsd/kern/kern_mbuf.c \
765 Network/slirp/bsd/kern/uipc_mbuf.c \
766 Network/slirp/bsd/kern/uipc_mbuf2.c \
767 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
768 VBOX_SLIRP_ALIAS_SOURCES = \
769 Network/slirp/libalias/alias.c \
770 Network/slirp/libalias/alias_db.c \
771 Network/slirp/libalias/alias_mod.c \
772 Network/slirp/libalias/alias_proxy.c \
773 Network/slirp/libalias/alias_ftp.c \
774 Network/slirp/libalias/alias_nbt.c \
775 Network/slirp/libalias/alias_util.c
776
777 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
778 # $(file)_DEFS or clean the code disabled with this definition.
779 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER=1
780
781 # dump memory related operations.
782 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
783
784 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
785 define def_vbox_slirp_cflags
786 $(file)_DEFS += \
787 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
788 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
789 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
790 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
791 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
792 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
793 $(file)_INCS += \
794 $(1)/slirp/bsd/sys \
795 $(1)/slirp/bsd/sys/sys \
796 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
797 $(1)/slirp/bsd/netinet \
798 $(1)/slirp \
799 $(1)/slirp/libalias
800 ifeq ($(KBUILD_TARGET),win)
801 $(file)_CFLAGS = -wd4018
802 else
803 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
804 endif
805 endef
806
807 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
808
809 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
810 define def_vbox_slirp_alias_cflags
811 $(file)_DEFS += VBOX_SLIRP_ALIAS \
812 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
813 $(file)_INCS += \
814 $(1)/slirp/libalias \
815 $(1)/slirp \
816 $(1)/slirp/dnsproxy
817 ifneq ($(KBUILD_TARGET),win)
818 $(file)_CFLAGS += -Wno-shadow
819 endif
820 endef
821 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
822 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
823
824 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
825 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
826 define def_vbox_slirp_bsd_cflags
827 $(file)_DEFS += VBOX_SLIRP_BSD
828 $(file)_INCS += $(1)/slirp/dnsproxy
829 endef
830 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
831 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
832
833
834 # --- OS specific driver hacks. ---
835
836 ifeq ($(KBUILD_TARGET),freebsd)
837 VBoxDD_SOURCES.freebsd += Network/DrvTAP.cpp
838 endif # freebsd
839
840 VBoxDD_SOURCES.linux += \
841 Network/DrvTAP.cpp \
842 Parallel/DrvHostParallel.cpp
843
844 ifeq ($(KBUILD_TARGET),solaris)
845 ifdef VBOX_WITH_SUID_WRAPPER
846 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
847 endif
848 endif
849
850 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
851 VBoxDD_SOURCES.win += \
852 Parallel/DrvHostParallel.cpp
853
854 ifdef VBOX_WITH_VIRTUALKD
855 VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
856 VBoxDD_SOURCES.win += \
857 Misc/DevVirtualKD.cpp
858 endif
859
860 if defined(VBOX_WITH_NETFLT)
861 VBoxDD_DEFS += VBOX_WITH_NETFLT
862 if defined(VBOX_NETFLT_ONDEMAND_BIND)
863 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
864 endif
865 endif
866
867 # --- Final bits, mostly libraries for order dependant linkers. ---
868
869 VBoxDD_LIBS += \
870 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
871 $(LIB_RUNTIME)
872 ifeq ($(KBUILD_TARGET),win)
873 VBoxDD_LIBS += \
874 $(LIB_DDU) \
875 $(PATH_STAGE_LIB)/VBoxDD2.lib
876 else
877 VBoxDD_LIBS += \
878 $(VBoxDDU_1_STAGE_TARGET) \
879 $(VBoxDD2_1_STAGE_TARGET)
880 endif
881
882 ifdef VBOX_WITH_NETFLT
883 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.lib
884 endif
885
886 ifeq ($(KBUILD_TARGET),solaris)
887 VBoxDD_LIBS += adm
888 ifdef VBOX_WITH_SUID_WRAPPER
889 VBoxDD_LIBS += secdb
890 endif
891 ifdef VBOX_WITH_USB
892 VBoxDD_LIBS += aio
893 endif
894 endif
895
896 VBoxDD_LIBS.darwin += \
897 $(LIB_REM)
898
899
900 ifdef VBOX_WITH_DYNAMIC_DSDT
901 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
902 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
903
904 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
905 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
906 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
907
908 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
909
910 else # !VBOX_WITH_DYNAMIC_DSDT
911 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
912 VBoxDD_CLEAN += \
913 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
914 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
915 $(VBoxDD_0_OUTDIR)/vboxaml.aml.tmp \
916 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
917 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml \
918 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml.tmp \
919 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
920 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml \
921 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.tmp \
922 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.pre \
923 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,) \
924 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml,) \
925 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml.tmp,)
926 PC/ACPI/VBoxAcpi.cpp_DEPS = \
927 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
928 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
929 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
930 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,)
931
932 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
933 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
934 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
935 $(QUIET)$(MV) -f $@ [email protected]
936 $(QUIET)$(SED) -e "s/vboxaml_aml_code/AmlCode/g" \
937 --output $@ [email protected]
938 $(QUIET)$(RM) -f [email protected]
939
940 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
941
942 $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
943 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
944 $(QUIET)$(RM) -f $@ [email protected]
945 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
946 $(QUIET)$(MV) -f $@ [email protected]
947 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_standard_aml_code/AmlCodeSsdtStandard/g" \
948 --output $@ [email protected]
949 $(QUIET)$(RM) -f [email protected]
950
951
952 vboxssdt_standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex
953
954 $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
955 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
956 $(QUIET)$(RM) -f $@ [email protected] [email protected]
957 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o [email protected] $<
958 $(QUIET)$(SED) -e "s/<NL>/\n/g" \
959 --output [email protected] [email protected]
960 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ [email protected]
961 $(QUIET)$(MV) -f $@ [email protected]
962 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_cpuhotplug_aml_code/AmlCodeSsdtCpuHotPlug/g" \
963 --output $@ [email protected]
964 $(QUIET)$(RM) -f [email protected] [email protected] [email protected]
965
966
967 vboxssdt_cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex
968
969 if defined(VBOX_WITH_TPM)
970 $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex: $(PATH_SUB_CURRENT)/PC/vbox-tpm.dsl | $$(dir $$@)
971 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
972 $(QUIET)$(RM) -f $@ [email protected]
973 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
974 $(QUIET)$(MV) -f $@ [email protected]
975 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_tpm_aml_code/AmlCodeSsdtTpm/g" \
976 --output $@ [email protected]
977 $(QUIET)$(RM) -f [email protected]
978
979 vboxssdt_tpm.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex
980 endif # !VBOX_WITH_TPM
981
982 endif # !VBOX_WITH_DYNAMIC_DSDT
983 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
984
985 # For finding PCIInternal.h from VBox/pci.h.
986 Bus/DevPCI.cpp_INCS = Bus
987 Bus/DevPciIch9.cpp_INCS = Bus
988 Bus/MsiCommon.cpp_INCS = Bus
989 Bus/MsixCommon.cpp_INCS = Bus
990 Bus/DevPciRaw.cpp_INCS = Bus
991
992 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
993 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR) $(VBOX_GRAPHICS_INCS)
994 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
995
996 $(call VBOX_SET_VER_INFO_DLL,VBoxDD,VirtualBox VMM Devices and Drivers) # (last!)
997
998
999 ifdef VBOX_WITH_RAW_MODE
1000 #
1001 # VBoxDDRC (sysmod)
1002 #
1003 VBoxDDRC_TEMPLATE = VBoxRc
1004 ifeq ($(KBUILD_TARGET_ARCH),x86)
1005 VBoxDDRC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
1006 endif
1007 VBoxDDRC_DEFS = \
1008 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1009 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1010 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,)
1011 VBoxDDRC_INCS = build $(VBOX_GRAPHICS_INCS)
1012 VBoxDDRC_SOURCES = \
1013 Bus/DevPCI.cpp \
1014 Bus/DevPciIch9.cpp \
1015 Bus/MsiCommon.cpp \
1016 Bus/MsixCommon.cpp \
1017 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1018 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1019 EFI/DevSmc.cpp \
1020 Graphics/DevVGA.cpp \
1021 Input/DevPS2.cpp \
1022 Input/DevPS2K.cpp \
1023 Input/DevPS2M.cpp \
1024 PC/DevACPI.cpp \
1025 PC/DevIoApic.cpp \
1026 PC/DevPit-i8254.cpp \
1027 PC/DevPIC.cpp \
1028 PC/DevRTC.cpp \
1029 PC/DevDMA.cpp \
1030 PC/DevHPET.cpp \
1031 Storage/DevATA.cpp \
1032 Network/DevPCNet.cpp \
1033 Serial/DevSerial.cpp \
1034 Serial/DevOxPcie958.cpp \
1035 Serial/UartCore.cpp \
1036 Parallel/DevParallel.cpp \
1037 VMMDev/VMMDev.cpp \
1038 VMMDev/VMMDevTesting.cpp
1039
1040 VBoxDDRC_DEFS += $(VBOX_AUDIO_DEFS)
1041 VBoxDDRC_SOURCES += \
1042 Audio/DevHda.cpp \
1043 Audio/DevIchAc97.cpp
1044
1045 VBoxDDRC_DEFS += \
1046 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1047 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1048 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1049
1050 ifdef VBOX_WITH_E1000
1051 VBoxDDRC_DEFS += VBOX_WITH_E1000
1052 VBoxDDRC_SOURCES += \
1053 Network/DevE1000.cpp \
1054 Network/DevE1000Phy.cpp
1055 endif
1056
1057 ifdef VBOX_WITH_VIRTIO
1058 VBoxDDRC_DEFS += VBOX_WITH_VIRTIO
1059 VBoxDDRC_SOURCES += \
1060 VirtIO/VirtioCore.cpp \
1061 Network/DevVirtioNet_1_0.cpp
1062 endif
1063
1064 ifdef VBOX_WITH_HGSMI
1065 VBoxDDRC_DEFS += VBOX_WITH_HGSMI
1066 endif
1067 ifdef VBOX_WITH_WDDM
1068 VBoxDDRC_DEFS += VBOX_WITH_WDDM
1069 endif
1070 ifdef VBOX_WITH_VDMA
1071 VBoxDDRC_DEFS += VBOX_WITH_VDMA
1072 endif
1073 ifdef VBOXWDDM_WITH_VBVA
1074 VBoxDDRC_DEFS += VBOXWDDM_WITH_VBVA
1075 endif
1076 ifdef VBOX_WITH_VMSVGA
1077 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA
1078 VBoxDDRC_SOURCES += \
1079 Graphics/DevVGA-SVGA.cpp
1080 endif
1081 ifdef VBOX_WITH_VMSVGA3D
1082 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA3D
1083 endif
1084
1085 ifdef VBOX_WITH_VUSB
1086 VBoxDDRC_DEFS += VBOX_WITH_VUSB
1087 VBoxDDRC_SOURCES += \
1088 USB/DevOHCI.cpp
1089 endif
1090
1091 ifdef VBOX_WITH_USB
1092 VBoxDDRC_DEFS += VBOX_WITH_USB
1093 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1094 VBoxDDRC_DEFS += VBOX_WITH_EHCI_IMPL
1095 VBoxDDRC_SOURCES += \
1096 USB/DevEHCI.cpp
1097 endif
1098 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1099 VBoxDDRC_DEFS += VBOX_WITH_XHCI_IMPL
1100 VBoxDDRC_SOURCES += \
1101 USB/DevXHCI.cpp
1102 endif
1103 endif
1104
1105 ifdef VBOX_WITH_VIDEOHWACCEL
1106 VBoxDDRC_DEFS += VBOX_WITH_VIDEOHWACCEL
1107 endif
1108
1109 ifdef VBOX_WITH_AHCI
1110 VBoxDDRC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
1111 VBoxDDRC_SOURCES += \
1112 Storage/DevAHCI.cpp
1113 endif
1114
1115 ifdef VBOX_WITH_BUSLOGIC
1116 VBoxDDRC_DEFS += VBOX_WITH_BUSLOGIC
1117 VBoxDDRC_SOURCES += \
1118 Storage/DevBusLogic.cpp
1119 endif
1120
1121 ifdef VBOX_WITH_LSILOGIC
1122 VBoxDDRC_DEFS += VBOX_WITH_LSILOGIC
1123 VBoxDDRC_SOURCES += \
1124 Storage/DevLsiLogicSCSI.cpp
1125 endif
1126
1127 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1128 VBoxDDGC_DEFS += VBOX_WITH_NVME_IMPL
1129 VBoxDDGC_SOURCES += \
1130 Storage/DevNVMe.cpp
1131 endif
1132
1133 if1of ($(VBOX_LDR_FMT32), pe lx)
1134 VBoxDDRC_LIBS = \
1135 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1136 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1137 endif
1138 $(call VBOX_SET_VER_INFO_RC,VBoxDDRC,VirtualBox VMM Devices and Drivers$(COMMA) raw-mode) # last!
1139 endif # VBOX_WITH_RAW_MODE
1140
1141
1142 #
1143 # VBoxDD2 (shared object)
1144 #
1145 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
1146 VBoxDD2_DEFS = \
1147 IN_VBOXDD2 \
1148 $(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,)
1149 VBoxDD2_INCS := \
1150 build \
1151 $(PATH_SUB_CURRENT)
1152 VBoxDD2_SOURCES = \
1153 build/VBoxDD2.cpp
1154 VBoxDD2_LIBS = \
1155 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1156 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1157 $(if $(VBOX_WITH_PXE_ROM),\
1158 $(if $(VBOX_WITH_INTEL_PXE),\
1159 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB),\
1160 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1161 $(LIB_RUNTIME)
1162 VBoxDD2_LIBS.darwin += $(LIB_REM)
1163 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1164 VBoxDD2_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
1165 if defined(VBOX_WITH_EFI) && !defined(VBOX_WITH_EFIFW_PACKING)
1166 VBoxDD_DEFS += VBOX_WITH_EFI_IN_DD2
1167 VBoxDD2_DEFS += VBOX_WITH_EFI
1168 VBoxDD2_SOURCES.x86 += EFI/DevEFI-binaries.asm
1169 VBoxDD2_SOURCES.amd64 += EFI/DevEFI-binaries.asm
1170 EFI/DevEFI-binaries.asm_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1171 EFI/DevEFI-binaries.asm_DEPS = \
1172 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1173 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1174
1175 VBoxDD2_SOURCES.arm64 += EFI/DevEFI-binaries.S
1176 EFI/DevEFI-binaries.S_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1177 EFI/DevEFI-binaries.S_DEPS = \
1178 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1179 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1180 endif
1181
1182 $(call VBOX_SET_VER_INFO_DLL,VBoxDD2,VirtualBox VMM Devices and Drivers 2) # (last!)
1183
1184 #
1185 # VBoxDDR0 (sysmod)
1186 #
1187 if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
1188 #
1189 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
1190 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
1191 #
1192 # Template used for gcc older than 4.6. (Strips away compiler options.)
1193 #
1194 TEMPLATE_VBoxDDR0OldGCC := VBoxDDR0OldGCC
1195 TEMPLATE_VBoxDDR0OldGCC_EXTENDS := VBoxR0
1196 TEMPLATE_VBoxDDR0OldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxDDR0OldGCC_EXTENDS)_CXXFLAGS))
1197
1198 VBoxDDR0_TEMPLATE = VBoxDDR0OldGCC
1199 else
1200 VBoxDDR0_TEMPLATE = VBoxR0
1201 endif
1202 VBoxDDR0_DEFS = \
1203 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1204 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1205 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
1206 IN_RT_R0 # - WTF is IN_RT_R0 doing here?
1207 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1208 VBoxDDR0_INCS = build $(VBOX_GRAPHICS_INCS)
1209 VBoxDDR0_INCS += $(VBOX_PATH_VMSVGA_DEVICE_INC)
1210 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1211 VBoxDDR0_SOURCES = \
1212 build/VBoxDDR0.cpp \
1213 Bus/DevPCI.cpp \
1214 Bus/DevPciIch9.cpp \
1215 Bus/MsiCommon.cpp \
1216 Bus/MsixCommon.cpp \
1217 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1218 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1219 EFI/DevSmc.cpp \
1220 EFI/DevFlash.cpp \
1221 EFI/FlashCore.cpp \
1222 Graphics/DevVGA.cpp \
1223 Input/DevPS2.cpp \
1224 Input/DevPS2K.cpp \
1225 Input/DevPS2M.cpp \
1226 PC/DevACPI.cpp \
1227 PC/DevIoApic.cpp \
1228 PC/DevPit-i8254.cpp \
1229 PC/DevPIC.cpp \
1230 PC/DevRTC.cpp \
1231 PC/DevDMA.cpp \
1232 PC/DevHPET.cpp \
1233 Storage/DevATA.cpp \
1234 Network/DevPCNet.cpp \
1235 Serial/DevSerial.cpp \
1236 Serial/DevOxPcie958.cpp \
1237 Serial/UartCore.cpp \
1238 Parallel/DevParallel.cpp \
1239 GIMDev/GIMDev.cpp \
1240 VMMDev/VMMDev.cpp \
1241 VMMDev/VMMDevTesting.cpp \
1242 Network/DrvIntNet.cpp \
1243 Network/DrvDedicatedNic.cpp
1244
1245 ifdef VBOX_WITH_DTRACE_R0
1246 VBoxDDR0_USES += dtrace
1247 VBoxDDR0_SOURCES += build/VBoxDD.d
1248 endif
1249
1250 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1251
1252 VBoxDDR0_DEFS += \
1253 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
1254 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
1255 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
1256 $(if $(VBOXWDDM_WITH_VBVA),VBOXWDDM_WITH_VBVA,) \
1257 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1258 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1259 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1260
1261 VBoxDDR0_DEFS += $(VBOX_AUDIO_DEFS)
1262 VBoxDDR0_SOURCES += \
1263 Audio/DevHda.cpp \
1264 Audio/DevHdaStream.cpp \
1265 Audio/DevIchAc97.cpp
1266
1267 ifdef VBOX_WITH_E1000
1268 VBoxDDR0_DEFS += VBOX_WITH_E1000
1269 VBoxDDR0_SOURCES += \
1270 Network/DevE1000.cpp \
1271 Network/DevE1000Phy.cpp
1272 endif
1273
1274 ifdef VBOX_WITH_VIRTIO
1275 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1276 VBoxDDR0_SOURCES += \
1277 VirtIO/VirtioCore.cpp \
1278 Network/DevVirtioNet_1_0.cpp
1279 endif
1280
1281 ifdef VBOX_WITH_NETSHAPER
1282 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1283 VBoxDDR0_SOURCES += \
1284 Network/DrvNetShaper.cpp
1285 endif
1286
1287 ifdef VBOX_WITH_VMSVGA
1288 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1289 VBoxDDR0_SOURCES += \
1290 Graphics/DevVGA-SVGA.cpp
1291 endif
1292 ifdef VBOX_WITH_VMSVGA3D
1293 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1294 endif
1295
1296 ifdef VBOX_WITH_VUSB
1297 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1298 VBoxDDR0_SOURCES += \
1299 USB/DevOHCI.cpp
1300 endif
1301 ifdef VBOX_WITH_USB
1302 VBoxDDR0_DEFS += VBOX_WITH_USB
1303 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1304 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1305 VBoxDDR0_SOURCES += \
1306 USB/DevEHCI.cpp
1307 endif
1308 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1309 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1310 VBoxDDR0_SOURCES += \
1311 USB/DevXHCI.cpp
1312 endif
1313 endif
1314
1315 ifdef VBOX_WITH_EFI
1316 VBoxDDR0_DEFS += VBOX_WITH_EFI
1317 VBoxDDR0_SOURCES += EFI/DevEFI.cpp
1318 endif
1319
1320 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1321 VBoxDDR0_SOURCES += \
1322 Bus/DevPciRaw.cpp
1323 endif
1324
1325 ifdef VBOX_WITH_AHCI
1326 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1327 VBoxDDR0_SOURCES += \
1328 Storage/DevAHCI.cpp
1329 endif
1330
1331 ifdef VBOX_WITH_BUSLOGIC
1332 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1333 VBoxDDR0_SOURCES += \
1334 Storage/DevBusLogic.cpp
1335 endif
1336
1337 ifdef VBOX_WITH_LSILOGIC
1338 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1339 VBoxDDR0_SOURCES += \
1340 Storage/DevLsiLogicSCSI.cpp
1341 endif
1342
1343 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1344 VBoxDDR0_DEFS += VBOX_WITH_NVME_IMPL
1345 VBoxDDR0_SOURCES += \
1346 Storage/DevNVMe.cpp
1347 endif
1348
1349 if defined (VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_SCSI)
1350 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO_SCSI
1351 VBoxDDR0_SOURCES += \
1352 Storage/DevVirtioSCSI.cpp
1353 endif
1354
1355 if defined(VBOX_WITH_TPM)
1356 VBoxDDR0_DEFS += VBOX_WITH_TPM
1357 VBoxDDR0_SOURCES += \
1358 Security/DevTpm.cpp
1359 endif
1360
1361 ifdef VBOX_WITH_HGSMI
1362 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1363 endif
1364 ifdef VBOX_WITH_VIDEOHWACCEL
1365 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1366 endif
1367
1368 if1of ($(VBOX_LDR_FMT), pe lx)
1369 VBoxDDR0_LIBS = \
1370 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
1371 endif
1372 VBoxDDR0_LIBS += \
1373 $(VBOX_LIB_SUPR0)
1374
1375 $(call VBOX_SET_VER_INFO_R0,VBoxDDR0,VirtualBox VMM Devices and Drivers$(COMMA) ring-0) # (last!)
1376
1377 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS
1378 # Wrapper kmod for VBoxDDR0.r0
1379 INSTALLS.linux += vbox_vboxddr0-src
1380 vbox_vboxddr0-src_INST = bin/src/vbox_vboxddr0/
1381 vbox_vboxddr0-src_SYMLINKS = \
1382 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1383 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1384 vbox_vboxddr0-src_SOURCES = \
1385 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxddr0.gmk=>Makefile \
1386 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.r0=>VBoxDDR0.r0 \
1387 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.debug=>VBoxDDR0.debug
1388 endif
1389
1390 #
1391 # Ring-0 Services (library, linked into VMMR0.r0)
1392 #
1393 ServicesR0_TEMPLATE = VBoxR0
1394 ServicesR0_DEFS = VBOX_IN_VMM IN_INTNET_R0 IN_RT_R0 $(VMM_COMMON_DEFS) \
1395 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1396 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1397 ServicesR0_SOURCES = \
1398 Network/SrvIntNetR0.cpp \
1399# $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1400 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1401
1402
1403 #
1404 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1405 #
1406 ifdef VBOX_WITH_TESTCASES
1407 PROGRAMS += tstIntNetR0
1408 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
1409 tstIntNetR0_DEFS = IN_INTNET_R0
1410 tstIntNetR0_SOURCES = \
1411 Network/testcase/tstIntNetR0.cpp
1412 ifneq ($(KBUILD_TARGET),win)
1413 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1414 endif
1415 endif
1416
1417
1418 #
1419 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1420 #
1421 ifdef VBOX_WITH_TESTCASES
1422 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1423 PROGRAMS += tstIntNetHardened-1
1424 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1425 tstIntNetHardened-1_NAME = tstIntNet-1
1426 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1427 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR="tstIntNet-1"
1428 else
1429 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1430 endif
1431 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
1432
1433 DLLS += tstIntNet-1
1434 tstIntNet-1_TEMPLATE = VBoxR3HardenedTstDll
1435 else
1436 PROGRAMS += tstIntNet-1
1437 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
1438 endif
1439 tstIntNet-1_SOURCES = \
1440 Network/testcase/tstIntNet-1.cpp \
1441 Network/Pcap.cpp
1442 endif
1443
1444
1445 #
1446 # EEPROM device unit test requires cppunit
1447 #
1448 ifdef VBOX_WITH_CPPUNIT_TESTCASES
1449 ifdef VBOX_WITH_E1000
1450 PROGRAMS += tstDevEEPROM
1451 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1452 tstDevEEPROM_SOURCES = \
1453 Network/testcase/tstDevEEPROM.cpp
1454 tstDevEEPROM_LIBS = \
1455 $(TARGET_VBoxDD)
1456 PROGRAMS += tstDevPhy
1457 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1458 tstDevPhy_SOURCES = \
1459 Network/testcase/tstDevPhy.cpp \
1460 Network/DevE1000Phy.cpp
1461 tstDevPhy_DEFS = PHY_UNIT_TEST
1462 endif
1463 endif
1464
1465 #
1466 # Apple SMC Utility.
1467 #
1468 ifdef VBOX_WITH_TESTCASES
1469 PROGRAMS.darwin += VBoxSmcUtil-darwin
1470 VBoxSmcUtil-darwin_TEMPLATE = VBOXR3TSTEXE
1471 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1472 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1473 endif
1474
1475 #
1476 # PDM device testcase framework.
1477 #
1478 ifdef VBOX_WITH_TESTCASES_TSTDEV
1479 PROGRAMS += tstDevice
1480 tstDevice_TEMPLATE = VBOXR3TSTEXE
1481 tstDevice_DEFS += IN_SUP_R3
1482 tstDevice_SOURCES = \
1483 testcase/tstDevice.cpp \
1484 testcase/tstDeviceR0.cpp \
1485 testcase/tstDeviceCfg.cpp \
1486 testcase/tstDevicePdmDevHlp.cpp \
1487 testcase/tstDevicePdmDevHlpR0.cpp \
1488 testcase/tstDevicePdmThread.cpp \
1489 testcase/tstDeviceSsmFuzz.cpp \
1490 testcase/tstDeviceIoFuzz.cpp
1491 endif
1492
1493endif # !VBOX_ONLY_EXTPACKS && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1494
1495
1496if defined(VBOX_WITH_EXTPACK) && defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1497 #
1498 # The EHCI (USB 2.0) Extension Pack Modules.
1499 #
1500 if defined(VBOX_WITH_USB)
1501 DLLS += VBoxEhciR3
1502 VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
1503 VBoxEhciR3_SOURCES = \
1504 USB/DevEHCI.cpp \
1505 USB/DevXHCI.cpp
1506 $(call VBOX_SET_VER_INFO_DLL,VBoxEhciR3,PUEL Extension Pack - EHCI Device)
1507
1508 $(if-expr defined(VBOX_WITH_VBOXR0_AS_DLL),DLLS,SYSMODS) += VBoxEhciR0
1509 VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
1510 VBoxEhciR0_SOURCES = \
1511 USB/DevEHCI.cpp \
1512 USB/DevXHCI.cpp
1513 $(call VBOX_SET_VER_INFO_R0,VBoxEhciR0,PUEL Extension Pack - EHCI Device$(COMMA) ring-0)
1514 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # Wrapper kmod for VBoxEhciR0.r0
1515 INSTALLS.linux += vbox_vboxehcir0-src
1516 vbox_vboxehcir0-src_INST = bin/src/vbox_vboxehcir0/
1517 vbox_vboxehcir0-src_SYMLINKS = \
1518 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1519 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1520 vbox_vboxehcir0-src_SOURCES = \
1521 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxehcir0.gmk=>Makefile \
1522 $(VBoxEhciR0_0_OUTDIR)/VBoxEhciR0.r0=>VBoxEhciR0.r0 \
1523 $(VBoxEhciR0_0_OUTDIR)/VBoxEhciR0.debug=>VBoxEhciR0.debug
1524 endif
1525
1526 ifdef VBOX_WITH_RAW_MODE
1527 SYSMODS += VBoxEhciRC
1528 VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
1529 VBoxEhciRC_SOURCES = \
1530 USB/DevEHCI.cpp \
1531 USB/DevXHCI.cpp
1532 $(call VBOX_SET_VER_INFO_RC,VBoxEhciRC,PUEL Extension Pack - EHCI Device$(COMMA) raw-mode)
1533 endif
1534
1535 # Hacky but MSI support *must* be enabled
1536 ifdef VBOX_WITH_MSI_DEVICES
1537 VBoxEhciR3_DEFS += VBOX_WITH_MSI_DEVICES
1538 VBoxEhciR0_DEFS += VBOX_WITH_MSI_DEVICES
1539 VBoxEhciRC_DEFS += VBOX_WITH_MSI_DEVICES
1540 endif
1541
1542 endif
1543
1544 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL)
1545 DLLS += VBoxPciRawR3
1546 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1547 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1548 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawR3,PUEL Extension Pack - PCI Passthrough Device)
1549
1550 DLLS += VBoxPciRawDrv
1551 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1552 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1553 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawDrv,PUEL Extension Pack - PCI Passthrough Driver)
1554
1555 $(if-expr defined(VBOX_WITH_VBOXR0_AS_DLL),DLLS,SYSMODS) += VBoxPciRawR0
1556 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1557 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1558 $(call VBOX_SET_VER_INFO_R0,VBoxPciRawR0,PUEL Extension Pack - PCI Passthrough Driver$(COMMA) ring-0)
1559
1560 Bus/DevPciRaw.cpp_INCS = Bus
1561 endif
1562
1563 #
1564 # The NVMe Extension Pack Modules.
1565 #
1566 if defined(VBOX_WITH_NVME_IMPL)
1567 DLLS += VBoxNvmeR3
1568 VBoxNvmeR3_TEMPLATE = VBoxR3ExtPackPuel
1569 VBoxNvmeR3_SOURCES = \
1570 Storage/DevNVMe.cpp
1571 $(call VBOX_SET_VER_INFO_DLL,VBoxNvmeR3,PUEL Extension Pack - NVMe Device)
1572
1573 $(if-expr defined(VBOX_WITH_VBOXR0_AS_DLL),DLLS,SYSMODS) += VBoxNvmeR0
1574 VBoxNvmeR0_TEMPLATE = VBoxR0ExtPackPuel
1575 VBoxNvmeR0_SOURCES = \
1576 Storage/DevNVMe.cpp
1577 $(call VBOX_SET_VER_INFO_R0,VBoxNvmeR0,PUEL Extension Pack - NVMe Device$(COMMA) ring-0)
1578 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # Wrapper kmod for VBoxEhciR0.r0
1579 INSTALLS.linux += vbox_vboxnvmer0-src
1580 vbox_vboxnvmer0-src_INST = bin/src/vbox_vboxnvmer0/
1581 vbox_vboxnvmer0-src_SYMLINKS = \
1582 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1583 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1584 vbox_vboxnvmer0-src_SOURCES = \
1585 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxnvmer0.gmk=>Makefile \
1586 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.r0=>VBoxNvmeR0.r0 \
1587 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.debug=>VBoxNvmeR0.debug
1588 endif
1589
1590 ifdef VBOX_WITH_RAW_MODE
1591 SYSMODS += VBoxNvmeRC
1592 VBoxNvmeRC_TEMPLATE = VBoxRcExtPackPuel
1593 VBoxNvmeRC_SOURCES = \
1594 Storage/DevNVMe.cpp
1595 $(call VBOX_SET_VER_INFO_RC,VBoxNvmeRC,PUEL Extension Pack - NVMe Device$(COMMA) raw-mode)
1596 endif
1597
1598 # Hacky but MSI support *must* be enabled
1599 ifdef VBOX_WITH_MSI_DEVICES
1600 VBoxNvmeR3_DEFS += VBOX_WITH_MSI_DEVICES
1601 VBoxNvmeR0_DEFS += VBOX_WITH_MSI_DEVICES
1602 VBoxNvmeRC_DEFS += VBOX_WITH_MSI_DEVICES
1603 endif
1604
1605 endif
1606
1607
1608 #
1609 # The Intel PXE ROM.
1610 #
1611 INSTALLS += VBoxExtPackPuelInsRoms
1612 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1613 ifdef PXE_EXPERIMENTAL_BUILD_SETUP
1614 VBoxExtPackPuelInsRoms_SOURCES = $(PATH_OUT)/obj/NetBiosBin/NetBiosBin.rom=>PXE-Intel.rom
1615 else
1616 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1617 endif
1618endif # VBOX_WITH_EXTPACK_PUEL && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1619
1620
1621if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1622 #
1623 # Template used for VBoxSVGA3D. (Strips away compiler options.)
1624 #
1625 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1626 TEMPLATE_VBoxSVGA3D_EXTENDS := VBOXR3
1627 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1628 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
1629 # -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'
1630 TEMPLATE_VBoxSVGA3D_CFLAGS.win = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS.win) \
1631 -wd4777
1632 endif
1633 ifeq ($(KBUILD_TARGET),darwin)
1634 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1635 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1636 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1637 else
1638 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1639 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1640 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1641 endif
1642 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_LDFLAGS.darwin) \
1643 -framework AppKit -framework OpenGL -framework IOKit
1644
1645
1646 #
1647 # The shader library used by the SVGA3D implementation.
1648 #
1649 DLLS += VBoxSVGA3D
1650 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1651 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1652 VBoxSVGA3D_DEFS = \
1653 __WINESRC__ \
1654 _REENTRANT \
1655 WINE_NOWINSOCK \
1656 VBOX_WITH_VMSVGA \
1657 VBOX_WITH_VMSVGA3D \
1658 _USE_MATH_DEFINES \
1659 VBOX_USING_WINDDK_W7_OR_LATER \
1660 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1661 IN_vmsvgashader_STATIC \
1662 IN_VMSVGA3D \
1663 VBOX_WINE_WITH_IPRT
1664 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1665 VBoxSVGA3D_DEFS += \
1666 WINE_UNICODE_API= \
1667 DLLDIR="" \
1668 BINDIR="" \
1669 LIB_TO_BINDIR="" \
1670 LIB_TO_DLLDIR="" \
1671 BIN_TO_DLLDIR="" \
1672 LIB_TO_DATADIR="" \
1673 BIN_TO_DATADIR=""
1674 else
1675 VBoxSVGA3D_DEFS += \
1676 WINE_UNICODE_API="" \
1677 DLLDIR=\"\" \
1678 BINDIR=\"\" \
1679 LIB_TO_BINDIR=\"\" \
1680 LIB_TO_DLLDIR=\"\" \
1681 BIN_TO_DLLDIR=\"\" \
1682 LIB_TO_DATADIR=\"\" \
1683 BIN_TO_DATADIR=\"\"
1684 endif
1685 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1686 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1687 endif
1688 VBoxSVGA3D_DEFS.x86 += __i386__
1689 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1690 VBoxSVGA3D_DEFS.win += \
1691 USE_WIN32_OPENGL \
1692 VBOX_WINE_WITHOUT_LIBWINE
1693 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1694 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1695 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1696 else
1697 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1698 endif
1699
1700 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1701 VBoxSVGA3D_DEFS.darwin += \
1702 __builtin_ms_va_list=va_list \
1703 __stdcall= \
1704 ms_abi=
1705 VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS)
1706 VBoxSVGA3D_INCS.win := \
1707 Graphics/shaderlib/libWineStub/include
1708 VBoxSVGA3D_INCS.linux := \
1709 Graphics/shaderlib/wine/include
1710 VBoxSVGA3D_INCS.darwin := \
1711 Graphics/ \
1712 Graphics/shaderlib/wine/include
1713 VBoxSVGA3D_SOURCES := \
1714 Graphics/shaderlib/glsl_shader.c \
1715 Graphics/shaderlib/shader.c \
1716 Graphics/shaderlib/shader_sm1.c \
1717 Graphics/shaderlib/shader_sm4.c \
1718 Graphics/shaderlib/shaderapi.c \
1719 Graphics/shaderlib/utils.c \
1720 Graphics/shaderlib/stateblock.c \
1721 Graphics/shaderlib/directx.c \
1722 Graphics/shaderlib/libWineStub/debug.c
1723 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1724 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1725 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1726 VBoxSVGA3D_LIBS += GL
1727 endif
1728 VBoxSVGA3D_LDFLAGS.darwin += \
1729 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1730 $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
1731 # -wd4100: unreferenced format parameter
1732 # -wd4204: nonstandard extension used : non-constant initializer
1733 # -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
1734 # -wd4305: 'function' : truncation from 'double' to 'GLclampf'
1735 VBoxSVGA3D_CFLAGS.win = -wd4100 -wd4204 -wd4245 -wd4305
1736 ifneq ($(KBUILD_TARGET),win)
1737 VBoxSVGA3D_CFLAGS += -Wno-unused-parameter -Wno-unused-function
1738 endif
1739
1740 #
1741 # The Objective C code needs to be separate since the shaderlib redefines most
1742 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1743 # functions directly. This module must be compiled for 10.7 or later, thus it
1744 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1745 #
1746 DLLS.darwin += VBoxSVGA3DObjC
1747 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1748 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS) IN_VMSVGA3DCOCOA
1749 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1750 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1751 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1752 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1753 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1754 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1755 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1756 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1757 -framework OpenGL
1758 VBoxSVGA3DObjC_SOURCES.darwin += \
1759 Graphics/DevVGA-SVGA3d-cocoa.m
1760
1761
1762endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1763
1764include $(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