VirtualBox

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

Last change on this file since 86692 was 86639, checked in by vboxsync, 4 years ago

Config.kmk,Devices/DevLpc-new.cpp: Get rid of VBOX_WITH_NEW_LPC_DEVICE and make it the default, the odl DevLPC.cpp doesn't exist anymore for a long time now

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