VirtualBox

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

Last change on this file since 72816 was 72615, checked in by vboxsync, 7 years ago

Flash: Added a simple flash memory device modeled after Intel 28F008.

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