VirtualBox

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

Last change on this file since 86611 was 86265, checked in by vboxsync, 4 years ago

Devices/Graphics: Split DevVGA-SVGA.cpp to two source files (device and command implementation) and an internal header file. bugref:9830

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