VirtualBox

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

Last change on this file since 76251 was 76251, checked in by vboxsync, 6 years ago

DevVGA-SVGA3d: enable dynamic loading of opengl for win and linux

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