VirtualBox

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

Last change on this file since 93435 was 93424, checked in by vboxsync, 3 years ago

*.kmk: Try contain VBOX_WITH_VMNET to darwin in the makefile usage. bugref:9932

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 55.6 KB
Line 
1# $Id: Makefile.kmk 93424 2022-01-24 21:09:41Z 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 VBoxDD_LIBS.darwin += \
912 $(LIB_REM)
913
914
915 ifdef VBOX_WITH_DYNAMIC_DSDT
916 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
917 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
918
919 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
920 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
921 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
922
923 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
924
925 else # !VBOX_WITH_DYNAMIC_DSDT
926 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
927 VBoxDD_CLEAN += \
928 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
929 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
930 $(VBoxDD_0_OUTDIR)/vboxaml.aml.tmp \
931 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
932 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml \
933 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.aml.tmp \
934 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
935 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml \
936 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.tmp \
937 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.aml.pre \
938 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,) \
939 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml,) \
940 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.aml.tmp,)
941 PC/ACPI/VBoxAcpi.cpp_DEPS = \
942 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
943 $(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex \
944 $(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex \
945 $(if $(VBOX_WITH_TPM),$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex,)
946
947 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
948 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
949 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
950 $(QUIET)$(MV) -f $@ $@.tmp
951 $(QUIET)$(SED) -e "s/vboxaml_aml_code/AmlCode/g" \
952 --output $@ $@.tmp
953 $(QUIET)$(RM) -f $@.tmp
954
955 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
956
957 $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
958 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
959 $(QUIET)$(RM) -f $@ $@.tmp
960 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
961 $(QUIET)$(MV) -f $@ $@.tmp
962 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_standard_aml_code/AmlCodeSsdtStandard/g" \
963 --output $@ $@.tmp
964 $(QUIET)$(RM) -f $@.tmp
965
966
967 vboxssdt_standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_standard.hex
968
969 $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
970 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
971 $(QUIET)$(RM) -f $@ $@.tmp $@.pre
972 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o $@.pre $<
973 $(QUIET)$(SED) -e "s/<NL>/\n/g" \
974 --output $@.pre1 $@.pre
975 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $@.pre1
976 $(QUIET)$(MV) -f $@ $@.tmp
977 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_cpuhotplug_aml_code/AmlCodeSsdtCpuHotPlug/g" \
978 --output $@ $@.tmp
979 $(QUIET)$(RM) -f $@.tmp $@.pre $@.pre1
980
981
982 vboxssdt_cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_cpuhotplug.hex
983
984 if defined(VBOX_WITH_TPM)
985 $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex: $(PATH_SUB_CURRENT)/PC/vbox-tpm.dsl | $$(dir $$@)
986 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
987 $(QUIET)$(RM) -f $@ $@.tmp
988 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
989 $(QUIET)$(MV) -f $@ $@.tmp
990 $(QUIET)$(SED) -e "s/AmlCode\|vboxssdt_tpm_aml_code/AmlCodeSsdtTpm/g" \
991 --output $@ $@.tmp
992 $(QUIET)$(RM) -f $@.tmp
993
994 vboxssdt_tpm.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt_tpm.hex
995 endif # !VBOX_WITH_TPM
996
997 endif # !VBOX_WITH_DYNAMIC_DSDT
998 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
999
1000 # For finding PCIInternal.h from VBox/pci.h.
1001 Bus/DevPCI.cpp_INCS = Bus
1002 Bus/DevPciIch9.cpp_INCS = Bus
1003 Bus/MsiCommon.cpp_INCS = Bus
1004 Bus/MsixCommon.cpp_INCS = Bus
1005 Bus/DevPciRaw.cpp_INCS = Bus
1006
1007 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
1008 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR) $(VBOX_GRAPHICS_INCS)
1009 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
1010
1011 $(call VBOX_SET_VER_INFO_DLL,VBoxDD,VirtualBox VMM Devices and Drivers) # (last!)
1012
1013
1014 ifdef VBOX_WITH_RAW_MODE
1015 #
1016 # VBoxDDRC (sysmod)
1017 #
1018 VBoxDDRC_TEMPLATE = VBoxRc
1019 ifeq ($(KBUILD_TARGET_ARCH),x86)
1020 VBoxDDRC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
1021 endif
1022 VBoxDDRC_DEFS = \
1023 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1024 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1025 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,)
1026 VBoxDDRC_INCS = build $(VBOX_GRAPHICS_INCS)
1027 VBoxDDRC_SOURCES = \
1028 Bus/DevPCI.cpp \
1029 Bus/DevPciIch9.cpp \
1030 Bus/MsiCommon.cpp \
1031 Bus/MsixCommon.cpp \
1032 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1033 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1034 EFI/DevSmc.cpp \
1035 Graphics/DevVGA.cpp \
1036 Input/DevPS2.cpp \
1037 Input/DevPS2K.cpp \
1038 Input/DevPS2M.cpp \
1039 PC/DevACPI.cpp \
1040 PC/DevIoApic.cpp \
1041 PC/DevPit-i8254.cpp \
1042 PC/DevPIC.cpp \
1043 PC/DevRTC.cpp \
1044 PC/DevDMA.cpp \
1045 PC/DevHPET.cpp \
1046 Storage/DevATA.cpp \
1047 Network/DevPCNet.cpp \
1048 Serial/DevSerial.cpp \
1049 Serial/DevOxPcie958.cpp \
1050 Serial/UartCore.cpp \
1051 Parallel/DevParallel.cpp \
1052 VMMDev/VMMDev.cpp \
1053 VMMDev/VMMDevTesting.cpp
1054
1055 VBoxDDRC_DEFS += $(VBOX_AUDIO_DEFS)
1056 VBoxDDRC_SOURCES += \
1057 Audio/DevHda.cpp \
1058 Audio/DevIchAc97.cpp
1059
1060 VBoxDDRC_DEFS += \
1061 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1062 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1063 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1064
1065 ifdef VBOX_WITH_E1000
1066 VBoxDDRC_DEFS += VBOX_WITH_E1000
1067 VBoxDDRC_SOURCES += \
1068 Network/DevE1000.cpp \
1069 Network/DevE1000Phy.cpp
1070 endif
1071
1072 ifdef VBOX_WITH_VIRTIO
1073 VBoxDDRC_DEFS += VBOX_WITH_VIRTIO
1074 VBoxDDRC_SOURCES += \
1075 VirtIO/VirtioCore.cpp \
1076 Network/DevVirtioNet_1_0.cpp
1077 endif
1078
1079 ifdef VBOX_WITH_HGSMI
1080 VBoxDDRC_DEFS += VBOX_WITH_HGSMI
1081 endif
1082 ifdef VBOX_WITH_WDDM
1083 VBoxDDRC_DEFS += VBOX_WITH_WDDM
1084 endif
1085 ifdef VBOX_WITH_VDMA
1086 VBoxDDRC_DEFS += VBOX_WITH_VDMA
1087 endif
1088 ifdef VBOXWDDM_WITH_VBVA
1089 VBoxDDRC_DEFS += VBOXWDDM_WITH_VBVA
1090 endif
1091 ifdef VBOX_WITH_VMSVGA
1092 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA
1093 VBoxDDRC_SOURCES += \
1094 Graphics/DevVGA-SVGA.cpp
1095 endif
1096 ifdef VBOX_WITH_VMSVGA3D
1097 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA3D
1098 endif
1099
1100 ifdef VBOX_WITH_VUSB
1101 VBoxDDRC_DEFS += VBOX_WITH_VUSB
1102 VBoxDDRC_SOURCES += \
1103 USB/DevOHCI.cpp
1104 endif
1105
1106 ifdef VBOX_WITH_USB
1107 VBoxDDRC_DEFS += VBOX_WITH_USB
1108 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1109 VBoxDDRC_DEFS += VBOX_WITH_EHCI_IMPL
1110 VBoxDDRC_SOURCES += \
1111 USB/DevEHCI.cpp
1112 endif
1113 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1114 VBoxDDRC_DEFS += VBOX_WITH_XHCI_IMPL
1115 VBoxDDRC_SOURCES += \
1116 USB/DevXHCI.cpp
1117 endif
1118 endif
1119
1120 ifdef VBOX_WITH_VIDEOHWACCEL
1121 VBoxDDRC_DEFS += VBOX_WITH_VIDEOHWACCEL
1122 endif
1123
1124 ifdef VBOX_WITH_AHCI
1125 VBoxDDRC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
1126 VBoxDDRC_SOURCES += \
1127 Storage/DevAHCI.cpp
1128 endif
1129
1130 ifdef VBOX_WITH_BUSLOGIC
1131 VBoxDDRC_DEFS += VBOX_WITH_BUSLOGIC
1132 VBoxDDRC_SOURCES += \
1133 Storage/DevBusLogic.cpp
1134 endif
1135
1136 ifdef VBOX_WITH_LSILOGIC
1137 VBoxDDRC_DEFS += VBOX_WITH_LSILOGIC
1138 VBoxDDRC_SOURCES += \
1139 Storage/DevLsiLogicSCSI.cpp
1140 endif
1141
1142 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1143 VBoxDDGC_DEFS += VBOX_WITH_NVME_IMPL
1144 VBoxDDGC_SOURCES += \
1145 Storage/DevNVMe.cpp
1146 endif
1147
1148 if1of ($(VBOX_LDR_FMT32), pe lx)
1149 VBoxDDRC_LIBS = \
1150 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1151 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1152 endif
1153 $(call VBOX_SET_VER_INFO_RC,VBoxDDRC,VirtualBox VMM Devices and Drivers$(COMMA) raw-mode) # last!
1154 endif # VBOX_WITH_RAW_MODE
1155
1156
1157 #
1158 # VBoxDD2 (shared object)
1159 #
1160 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
1161 VBoxDD2_DEFS = \
1162 IN_VBOXDD2 \
1163 $(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,)
1164 VBoxDD2_INCS := \
1165 build \
1166 $(PATH_SUB_CURRENT)
1167 VBoxDD2_SOURCES = \
1168 build/VBoxDD2.cpp
1169 VBoxDD2_LIBS = \
1170 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1171 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1172 $(if $(VBOX_WITH_PXE_ROM),\
1173 $(if $(VBOX_WITH_INTEL_PXE),\
1174 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB),\
1175 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1176 $(LIB_RUNTIME)
1177 VBoxDD2_LIBS.darwin += $(LIB_REM)
1178 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1179 VBoxDD2_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
1180 if defined(VBOX_WITH_EFI) && !defined(VBOX_WITH_EFIFW_PACKING)
1181 VBoxDD_DEFS += VBOX_WITH_EFI_IN_DD2
1182 VBoxDD2_DEFS += VBOX_WITH_EFI
1183 VBoxDD2_SOURCES.x86 += EFI/DevEFI-binaries.asm
1184 VBoxDD2_SOURCES.amd64 += EFI/DevEFI-binaries.asm
1185 EFI/DevEFI-binaries.asm_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1186 EFI/DevEFI-binaries.asm_DEPS = \
1187 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1188 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1189
1190 VBoxDD2_SOURCES.arm64 += EFI/DevEFI-binaries.S
1191 EFI/DevEFI-binaries.S_ASINCS = $(PATH_STAGE)/$(INST_BIN)
1192 EFI/DevEFI-binaries.S_DEPS = \
1193 $(PATH_STAGE)/$(INST_BIN)VBoxEFI32.fd \
1194 $(PATH_STAGE)/$(INST_BIN)VBoxEFI64.fd
1195 endif
1196
1197 $(call VBOX_SET_VER_INFO_DLL,VBoxDD2,VirtualBox VMM Devices and Drivers 2) # (last!)
1198
1199 #
1200 # VBoxDDR0 (sysmod)
1201 #
1202 if "$(KBUILD_TARGET)" != "win" && $(VBOX_GCC_VERSION_CXX) < 40600
1203 #
1204 # Disable "ISO C++ prohibits anonymous structs [-Werror=pedantic]" caused by Mesa VMSVGA driver headers
1205 # For GCC >= 4.6.0 the warning is disabled in DevVGA_SVGA.h
1206 #
1207 # Template used for gcc older than 4.6. (Strips away compiler options.)
1208 #
1209 TEMPLATE_VBoxDDR0OldGCC := VBoxDDR0OldGCC
1210 TEMPLATE_VBoxDDR0OldGCC_EXTENDS := VBoxR0
1211 TEMPLATE_VBoxDDR0OldGCC_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxDDR0OldGCC_EXTENDS)_CXXFLAGS))
1212
1213 VBoxDDR0_TEMPLATE = VBoxDDR0OldGCC
1214 else
1215 VBoxDDR0_TEMPLATE = VBoxR0
1216 endif
1217 VBoxDDR0_DEFS = \
1218 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
1219 $(if $(VBOX_WITH_IOMMU_AMD),VBOX_WITH_IOMMU_AMD,) \
1220 $(if $(VBOX_WITH_IOMMU_INTEL),VBOX_WITH_IOMMU_INTEL,) \
1221 IN_RT_R0 # - WTF is IN_RT_R0 doing here?
1222 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1223 VBoxDDR0_INCS = build $(VBOX_GRAPHICS_INCS)
1224 VBoxDDR0_INCS += $(VBOX_PATH_VMSVGA_DEVICE_INC)
1225 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1226 VBoxDDR0_SOURCES = \
1227 build/VBoxDDR0.cpp \
1228 Bus/DevPCI.cpp \
1229 Bus/DevPciIch9.cpp \
1230 Bus/MsiCommon.cpp \
1231 Bus/MsixCommon.cpp \
1232 $(if $(VBOX_WITH_IOMMU_AMD),Bus/DevIommuAmd.cpp,) \
1233 $(if $(VBOX_WITH_IOMMU_INTEL),Bus/DevIommuIntel.cpp,) \
1234 EFI/DevSmc.cpp \
1235 EFI/DevFlash.cpp \
1236 EFI/FlashCore.cpp \
1237 Graphics/DevVGA.cpp \
1238 Input/DevPS2.cpp \
1239 Input/DevPS2K.cpp \
1240 Input/DevPS2M.cpp \
1241 PC/DevACPI.cpp \
1242 PC/DevIoApic.cpp \
1243 PC/DevPit-i8254.cpp \
1244 PC/DevPIC.cpp \
1245 PC/DevRTC.cpp \
1246 PC/DevDMA.cpp \
1247 PC/DevHPET.cpp \
1248 Storage/DevATA.cpp \
1249 Network/DevPCNet.cpp \
1250 Serial/DevSerial.cpp \
1251 Serial/DevOxPcie958.cpp \
1252 Serial/UartCore.cpp \
1253 Parallel/DevParallel.cpp \
1254 GIMDev/GIMDev.cpp \
1255 VMMDev/VMMDev.cpp \
1256 VMMDev/VMMDevTesting.cpp \
1257 Network/DrvIntNet.cpp \
1258 Network/DrvDedicatedNic.cpp
1259
1260 ifdef VBOX_WITH_DTRACE_R0
1261 VBoxDDR0_USES += dtrace
1262 VBoxDDR0_SOURCES += build/VBoxDD.d
1263 endif
1264
1265 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1266
1267 VBoxDDR0_DEFS += \
1268 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
1269 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
1270 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
1271 $(if $(VBOXWDDM_WITH_VBVA),VBOXWDDM_WITH_VBVA,) \
1272 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1273 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1274 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1275
1276 VBoxDDR0_DEFS += $(VBOX_AUDIO_DEFS)
1277 VBoxDDR0_SOURCES += \
1278 Audio/DevHda.cpp \
1279 Audio/DevHdaStream.cpp \
1280 Audio/DevIchAc97.cpp
1281
1282 ifdef VBOX_WITH_E1000
1283 VBoxDDR0_DEFS += VBOX_WITH_E1000
1284 VBoxDDR0_SOURCES += \
1285 Network/DevE1000.cpp \
1286 Network/DevE1000Phy.cpp
1287 endif
1288
1289 ifdef VBOX_WITH_VIRTIO
1290 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1291 VBoxDDR0_SOURCES += \
1292 VirtIO/VirtioCore.cpp \
1293 Network/DevVirtioNet_1_0.cpp
1294 endif
1295
1296 ifdef VBOX_WITH_NETSHAPER
1297 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1298 VBoxDDR0_SOURCES += \
1299 Network/DrvNetShaper.cpp
1300 endif
1301
1302 ifdef VBOX_WITH_VMSVGA
1303 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1304 VBoxDDR0_SOURCES += \
1305 Graphics/DevVGA-SVGA.cpp
1306 endif
1307 ifdef VBOX_WITH_VMSVGA3D
1308 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1309 endif
1310
1311 ifdef VBOX_WITH_VUSB
1312 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1313 VBoxDDR0_SOURCES += \
1314 USB/DevOHCI.cpp
1315 endif
1316 ifdef VBOX_WITH_USB
1317 VBoxDDR0_DEFS += VBOX_WITH_USB
1318 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1319 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1320 VBoxDDR0_SOURCES += \
1321 USB/DevEHCI.cpp
1322 endif
1323 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1324 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1325 VBoxDDR0_SOURCES += \
1326 USB/DevXHCI.cpp
1327 endif
1328 endif
1329
1330 ifdef VBOX_WITH_EFI
1331 VBoxDDR0_DEFS += VBOX_WITH_EFI
1332 VBoxDDR0_SOURCES += EFI/DevEFI.cpp
1333 endif
1334
1335 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1336 VBoxDDR0_SOURCES += \
1337 Bus/DevPciRaw.cpp
1338 endif
1339
1340 ifdef VBOX_WITH_AHCI
1341 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1342 VBoxDDR0_SOURCES += \
1343 Storage/DevAHCI.cpp
1344 endif
1345
1346 ifdef VBOX_WITH_BUSLOGIC
1347 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1348 VBoxDDR0_SOURCES += \
1349 Storage/DevBusLogic.cpp
1350 endif
1351
1352 ifdef VBOX_WITH_LSILOGIC
1353 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1354 VBoxDDR0_SOURCES += \
1355 Storage/DevLsiLogicSCSI.cpp
1356 endif
1357
1358 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1359 VBoxDDR0_DEFS += VBOX_WITH_NVME_IMPL
1360 VBoxDDR0_SOURCES += \
1361 Storage/DevNVMe.cpp
1362 endif
1363
1364 if defined (VBOX_WITH_VIRTIO) && defined(VBOX_WITH_VIRTIO_SCSI)
1365 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO_SCSI
1366 VBoxDDR0_SOURCES += \
1367 Storage/DevVirtioSCSI.cpp
1368 endif
1369
1370 if defined(VBOX_WITH_TPM)
1371 VBoxDDR0_DEFS += VBOX_WITH_TPM
1372 VBoxDDR0_SOURCES += \
1373 Security/DevTpm.cpp
1374 endif
1375
1376 ifdef VBOX_WITH_HGSMI
1377 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1378 endif
1379 ifdef VBOX_WITH_VIDEOHWACCEL
1380 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1381 endif
1382
1383 if1of ($(VBOX_LDR_FMT), pe lx)
1384 VBoxDDR0_LIBS = \
1385 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
1386 endif
1387 VBoxDDR0_LIBS += \
1388 $(VBOX_LIB_SUPR0)
1389
1390 $(call VBOX_SET_VER_INFO_R0,VBoxDDR0,VirtualBox VMM Devices and Drivers$(COMMA) ring-0) # (last!)
1391
1392 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS
1393 # Wrapper kmod for VBoxDDR0.r0
1394 INSTALLS.linux += vbox_vboxddr0-src
1395 vbox_vboxddr0-src_INST = bin/src/vbox_vboxddr0/
1396 vbox_vboxddr0-src_SYMLINKS = \
1397 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1398 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1399 vbox_vboxddr0-src_SOURCES = \
1400 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxddr0.gmk=>Makefile \
1401 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.r0=>VBoxDDR0.r0 \
1402 $(VBoxDDR0_0_OUTDIR)/VBoxDDR0.debug=>VBoxDDR0.debug
1403 endif
1404
1405 #
1406 # Ring-0 Services (library, linked into VMMR0.r0)
1407 #
1408 ServicesR0_TEMPLATE = VBoxR0
1409 ServicesR0_DEFS = VBOX_IN_VMM IN_INTNET_R0 IN_RT_R0 $(VMM_COMMON_DEFS) \
1410 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1411 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1412 ServicesR0_SOURCES = \
1413 Network/SrvIntNetR0.cpp \
1414# $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1415 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1416
1417
1418 #
1419 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1420 #
1421 ifdef VBOX_WITH_TESTCASES
1422 PROGRAMS += tstIntNetR0
1423 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
1424 tstIntNetR0_DEFS = IN_INTNET_R0
1425 tstIntNetR0_SOURCES = \
1426 Network/testcase/tstIntNetR0.cpp
1427 ifneq ($(KBUILD_TARGET),win)
1428 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1429 endif
1430 endif
1431
1432
1433 #
1434 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1435 #
1436 ifdef VBOX_WITH_TESTCASES
1437 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1438 PROGRAMS += tstIntNetHardened-1
1439 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1440 tstIntNetHardened-1_NAME = tstIntNet-1
1441 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1442 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR="tstIntNet-1"
1443 else
1444 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1445 endif
1446 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
1447
1448 DLLS += tstIntNet-1
1449 tstIntNet-1_TEMPLATE = VBoxR3HardenedTstDll
1450 else
1451 PROGRAMS += tstIntNet-1
1452 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
1453 endif
1454 tstIntNet-1_SOURCES = \
1455 Network/testcase/tstIntNet-1.cpp \
1456 Network/Pcap.cpp
1457 endif
1458
1459
1460 #
1461 # EEPROM device unit test requires cppunit
1462 #
1463 ifdef VBOX_WITH_CPPUNIT_TESTCASES
1464 ifdef VBOX_WITH_E1000
1465 PROGRAMS += tstDevEEPROM
1466 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1467 tstDevEEPROM_SOURCES = \
1468 Network/testcase/tstDevEEPROM.cpp
1469 tstDevEEPROM_LIBS = \
1470 $(TARGET_VBoxDD)
1471 PROGRAMS += tstDevPhy
1472 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1473 tstDevPhy_SOURCES = \
1474 Network/testcase/tstDevPhy.cpp \
1475 Network/DevE1000Phy.cpp
1476 tstDevPhy_DEFS = PHY_UNIT_TEST
1477 endif
1478 endif
1479
1480 #
1481 # Apple SMC Utility.
1482 #
1483 ifdef VBOX_WITH_TESTCASES
1484 PROGRAMS.darwin += VBoxSmcUtil-darwin
1485 VBoxSmcUtil-darwin_TEMPLATE = VBOXR3TSTEXE
1486 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1487 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1488 endif
1489
1490 #
1491 # PDM device testcase framework.
1492 #
1493 ifdef VBOX_WITH_TESTCASES_TSTDEV
1494 PROGRAMS += tstDevice
1495 tstDevice_TEMPLATE = VBOXR3TSTEXE
1496 tstDevice_DEFS += IN_SUP_R3
1497 tstDevice_SOURCES = \
1498 testcase/tstDevice.cpp \
1499 testcase/tstDeviceR0.cpp \
1500 testcase/tstDeviceCfg.cpp \
1501 testcase/tstDevicePdmDevHlp.cpp \
1502 testcase/tstDevicePdmDevHlpR0.cpp \
1503 testcase/tstDevicePdmThread.cpp \
1504 testcase/tstDeviceSsmFuzz.cpp \
1505 testcase/tstDeviceIoFuzz.cpp
1506 endif
1507
1508endif # !VBOX_ONLY_EXTPACKS && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1509
1510
1511if defined(VBOX_WITH_EXTPACK) && defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1512 #
1513 # The EHCI (USB 2.0) Extension Pack Modules.
1514 #
1515 if defined(VBOX_WITH_USB)
1516 DLLS += VBoxEhciR3
1517 VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
1518 VBoxEhciR3_SOURCES = \
1519 USB/DevEHCI.cpp \
1520 USB/DevXHCI.cpp
1521 $(call VBOX_SET_VER_INFO_DLL,VBoxEhciR3,PUEL Extension Pack - EHCI Device)
1522
1523 ifdef VBOX_WITH_R0_MODULES
1524 ifdef VBOX_WITH_VBOXR0_AS_DLL
1525 DLLS += VBoxEhciR0
1526 else
1527 SYSMODS += VBoxEhciR0
1528 endif
1529 VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
1530 VBoxEhciR0_SOURCES = \
1531 USB/DevEHCI.cpp \
1532 USB/DevXHCI.cpp
1533 $(call VBOX_SET_VER_INFO_R0,VBoxEhciR0,PUEL Extension Pack - EHCI Device$(COMMA) ring-0)
1534 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # Wrapper kmod for VBoxEhciR0.r0
1535 INSTALLS.linux += vbox_vboxehcir0-src
1536 vbox_vboxehcir0-src_INST = bin/src/vbox_vboxehcir0/
1537 vbox_vboxehcir0-src_SYMLINKS = \
1538 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1539 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1540 vbox_vboxehcir0-src_SOURCES = \
1541 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxehcir0.gmk=>Makefile \
1542 $(VBoxEhciR0_0_OUTDIR)/VBoxEhciR0.r0=>VBoxEhciR0.r0 \
1543 $(VBoxEhciR0_0_OUTDIR)/VBoxEhciR0.debug=>VBoxEhciR0.debug
1544 endif
1545 endif
1546
1547 ifdef VBOX_WITH_RAW_MODE
1548 SYSMODS += VBoxEhciRC
1549 VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
1550 VBoxEhciRC_SOURCES = \
1551 USB/DevEHCI.cpp \
1552 USB/DevXHCI.cpp
1553 $(call VBOX_SET_VER_INFO_RC,VBoxEhciRC,PUEL Extension Pack - EHCI Device$(COMMA) raw-mode)
1554 endif
1555
1556 # Hacky but MSI support *must* be enabled
1557 ifdef VBOX_WITH_MSI_DEVICES
1558 VBoxEhciR3_DEFS += VBOX_WITH_MSI_DEVICES
1559 VBoxEhciR0_DEFS += VBOX_WITH_MSI_DEVICES
1560 VBoxEhciRC_DEFS += VBOX_WITH_MSI_DEVICES
1561 endif
1562
1563 endif
1564
1565 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL)
1566 DLLS += VBoxPciRawR3
1567 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1568 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1569 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawR3,PUEL Extension Pack - PCI Passthrough Device)
1570
1571 DLLS += VBoxPciRawDrv
1572 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1573 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1574 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawDrv,PUEL Extension Pack - PCI Passthrough Driver)
1575
1576 $(if-expr defined(VBOX_WITH_VBOXR0_AS_DLL),DLLS,SYSMODS) += VBoxPciRawR0
1577 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1578 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1579 $(call VBOX_SET_VER_INFO_R0,VBoxPciRawR0,PUEL Extension Pack - PCI Passthrough Driver$(COMMA) ring-0)
1580
1581 Bus/DevPciRaw.cpp_INCS = Bus
1582 endif
1583
1584 #
1585 # The NVMe Extension Pack Modules.
1586 #
1587 if defined(VBOX_WITH_NVME_IMPL)
1588 DLLS += VBoxNvmeR3
1589 VBoxNvmeR3_TEMPLATE = VBoxR3ExtPackPuel
1590 VBoxNvmeR3_SOURCES = \
1591 Storage/DevNVMe.cpp
1592 $(call VBOX_SET_VER_INFO_DLL,VBoxNvmeR3,PUEL Extension Pack - NVMe Device)
1593
1594 ifdef VBOX_WITH_R0_MODULES
1595 ifdef VBOX_WITH_VBOXR0_AS_DLL
1596 DLLS += VBoxNvmeR0
1597 else
1598 SYSMODS += VBoxNvmeR0
1599 endif
1600 VBoxNvmeR0_TEMPLATE = VBoxR0ExtPackPuel
1601 VBoxNvmeR0_SOURCES = \
1602 Storage/DevNVMe.cpp
1603 $(call VBOX_SET_VER_INFO_R0,VBoxNvmeR0,PUEL Extension Pack - NVMe Device$(COMMA) ring-0)
1604 ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # Wrapper kmod for VBoxEhciR0.r0
1605 INSTALLS.linux += vbox_vboxnvmer0-src
1606 vbox_vboxnvmer0-src_INST = bin/src/vbox_vboxnvmer0/
1607 vbox_vboxnvmer0-src_SYMLINKS = \
1608 SUPWrapperMod-linux.c=>../common/SUPWrapperMod-linux.c \
1609 Makefile-wrapper.gmk=>../common/Makefile-wrapper.gmk
1610 vbox_vboxnvmer0-src_SOURCES = \
1611 $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/Makefile-vbox_vboxnvmer0.gmk=>Makefile \
1612 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.r0=>VBoxNvmeR0.r0 \
1613 $(VBoxNvmeR0_0_OUTDIR)/VBoxNvmeR0.debug=>VBoxNvmeR0.debug
1614 endif
1615 endif
1616
1617 ifdef VBOX_WITH_RAW_MODE
1618 SYSMODS += VBoxNvmeRC
1619 VBoxNvmeRC_TEMPLATE = VBoxRcExtPackPuel
1620 VBoxNvmeRC_SOURCES = \
1621 Storage/DevNVMe.cpp
1622 $(call VBOX_SET_VER_INFO_RC,VBoxNvmeRC,PUEL Extension Pack - NVMe Device$(COMMA) raw-mode)
1623 endif
1624
1625 # Hacky but MSI support *must* be enabled
1626 ifdef VBOX_WITH_MSI_DEVICES
1627 VBoxNvmeR3_DEFS += VBOX_WITH_MSI_DEVICES
1628 VBoxNvmeR0_DEFS += VBOX_WITH_MSI_DEVICES
1629 VBoxNvmeRC_DEFS += VBOX_WITH_MSI_DEVICES
1630 endif
1631
1632 endif
1633
1634
1635 #
1636 # The Intel PXE ROM.
1637 #
1638 INSTALLS += VBoxExtPackPuelInsRoms
1639 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1640 ifdef PXE_EXPERIMENTAL_BUILD_SETUP
1641 VBoxExtPackPuelInsRoms_SOURCES = $(PATH_OUT)/obj/NetBiosBin/NetBiosBin.rom=>PXE-Intel.rom
1642 else
1643 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1644 endif
1645endif # VBOX_WITH_EXTPACK_PUEL && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1646
1647
1648if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1649 #
1650 # Template used for VBoxSVGA3D. (Strips away compiler options.)
1651 #
1652 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1653 TEMPLATE_VBoxSVGA3D_EXTENDS := VBOXR3
1654 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1655 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
1656 # -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'
1657 TEMPLATE_VBoxSVGA3D_CFLAGS.win = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS.win) \
1658 -wd4777
1659 endif
1660 ifeq ($(KBUILD_TARGET),darwin)
1661 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1662 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1663 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS)) $(VBOX_GCC_Wno-deprecated-declarations)
1664 else
1665 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1666 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1667 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1668 endif
1669 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_LDFLAGS.darwin) \
1670 -framework AppKit -framework OpenGL -framework IOKit
1671
1672
1673 #
1674 # The shader library used by the SVGA3D implementation.
1675 #
1676 DLLS += VBoxSVGA3D
1677 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1678 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1679 VBoxSVGA3D_DEFS = \
1680 __WINESRC__ \
1681 _REENTRANT \
1682 WINE_NOWINSOCK \
1683 VBOX_WITH_VMSVGA \
1684 VBOX_WITH_VMSVGA3D \
1685 _USE_MATH_DEFINES \
1686 VBOX_USING_WINDDK_W7_OR_LATER \
1687 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1688 IN_vmsvgashader_STATIC \
1689 IN_VMSVGA3D \
1690 VBOX_WINE_WITH_IPRT
1691 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
1692 VBoxSVGA3D_DEFS += \
1693 WINE_UNICODE_API= \
1694 DLLDIR="" \
1695 BINDIR="" \
1696 LIB_TO_BINDIR="" \
1697 LIB_TO_DLLDIR="" \
1698 BIN_TO_DLLDIR="" \
1699 LIB_TO_DATADIR="" \
1700 BIN_TO_DATADIR=""
1701 else
1702 VBoxSVGA3D_DEFS += \
1703 WINE_UNICODE_API="" \
1704 DLLDIR=\"\" \
1705 BINDIR=\"\" \
1706 LIB_TO_BINDIR=\"\" \
1707 LIB_TO_DLLDIR=\"\" \
1708 BIN_TO_DLLDIR=\"\" \
1709 LIB_TO_DATADIR=\"\" \
1710 BIN_TO_DATADIR=\"\"
1711 endif
1712 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1713 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1714 endif
1715 VBoxSVGA3D_DEFS.x86 += __i386__
1716 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1717 VBoxSVGA3D_DEFS.win += \
1718 USE_WIN32_OPENGL \
1719 VBOX_WINE_WITHOUT_LIBWINE
1720 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1721 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1722 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1723 else
1724 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1725 endif
1726
1727 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1728 VBoxSVGA3D_DEFS.darwin += \
1729 __builtin_ms_va_list=va_list \
1730 __stdcall= \
1731 ms_abi=
1732 VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS)
1733 VBoxSVGA3D_INCS.win := \
1734 Graphics/shaderlib/libWineStub/include
1735 VBoxSVGA3D_INCS.linux := \
1736 Graphics/shaderlib/wine/include
1737 VBoxSVGA3D_INCS.darwin := \
1738 Graphics/ \
1739 Graphics/shaderlib/wine/include
1740 VBoxSVGA3D_SOURCES := \
1741 Graphics/shaderlib/glsl_shader.c \
1742 Graphics/shaderlib/shader.c \
1743 Graphics/shaderlib/shader_sm1.c \
1744 Graphics/shaderlib/shader_sm4.c \
1745 Graphics/shaderlib/shaderapi.c \
1746 Graphics/shaderlib/utils.c \
1747 Graphics/shaderlib/stateblock.c \
1748 Graphics/shaderlib/directx.c \
1749 Graphics/shaderlib/libWineStub/debug.c
1750 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1751 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1752 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1753 VBoxSVGA3D_LIBS += GL
1754 endif
1755 VBoxSVGA3D_LDFLAGS.darwin += \
1756 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1757 $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
1758 # -wd4100: unreferenced format parameter
1759 # -wd4204: nonstandard extension used : non-constant initializer
1760 # -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
1761 # -wd4305: 'function' : truncation from 'double' to 'GLclampf'
1762 VBoxSVGA3D_CFLAGS.win = -wd4100 -wd4204 -wd4245 -wd4305
1763 ifneq ($(KBUILD_TARGET),win)
1764 VBoxSVGA3D_CFLAGS += -Wno-unused-parameter -Wno-unused-function
1765 endif
1766
1767 #
1768 # The Objective C code needs to be separate since the shaderlib redefines most
1769 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1770 # functions directly. This module must be compiled for 10.7 or later, thus it
1771 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1772 #
1773 DLLS.darwin += VBoxSVGA3DObjC
1774 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1775 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS) IN_VMSVGA3DCOCOA
1776 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1777 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1778 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1779 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1780 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1781 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1782 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1783 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1784 -framework OpenGL
1785 VBoxSVGA3DObjC_SOURCES.darwin += \
1786 Graphics/DevVGA-SVGA3d-cocoa.m
1787
1788
1789endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBUILD_TARGET_ARCH),$(VBOX_SUPPORTED_HOST_ARCHS))" != ""
1790
1791include $(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