VirtualBox

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

Last change on this file since 75047 was 74770, checked in by vboxsync, 6 years ago

Dropping VBoxDD2R0.r0 & VBoxDDR2RC.rc as they are empty (and thereby causes darwin signing issues). bugref:9232

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