VirtualBox

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

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

VMMDev,PGM: New I/O port for ACKing IRQs and retreiving pending events. This is handled in ring-0/raw-mode and saves a bit of time compared to the ring-3 trip we've been doing for VMMDevReq_AcknowledgeEvents thus far. Requires the start of the VMMDev memory being mapped into R00/RC, the former requires some hacks on linux+windows as RTR0MemObjMapKernelEx is missing some functionality here. bugref:9172

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