VirtualBox

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

Last change on this file since 61662 was 61662, checked in by vboxsync, 8 years ago

Devices: typo.

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