VirtualBox

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

Last change on this file since 71604 was 71210, checked in by vboxsync, 7 years ago

DevDMA: Handle I/O port access from ring-0 and raw-mode since we handle port 0x80 here. Port 0x80 is used both the our BIOS and the linux kernel for I/O delay / debugging, there is no need to go to ring-3 each time it is accessed.

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