VirtualBox

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

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

NAT: unifdef -U VBOX_WITH_NAT_UDP_SOCKET_CLONE - g/c old experiment.

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