VirtualBox

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

Last change on this file since 86208 was 86043, checked in by vboxsync, 4 years ago

Devices: use current VMSVGA headers (GCC 4 tweaks, no pedantic for old gcc).

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