VirtualBox

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

Last change on this file since 80396 was 80396, checked in by vboxsync, 5 years ago

Devices/DevVGA, Main: Get rid of obsolete code enclosed by VBOX_WITH_CRHGSMI, bugref:9529

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