VirtualBox

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

Last change on this file since 72285 was 72075, checked in by vboxsync, 7 years ago

Devices/Makefile.kmk: Add VBOX_WITH_NEW_SERIAL to turn on the new serial port emulation (work in progress, disabled by default of course)

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