VirtualBox

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

Last change on this file since 87064 was 87050, checked in by vboxsync, 4 years ago

Main: bugref:9224: Added device and partition paths checks for Solaris

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