VirtualBox

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

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

DevLPC-new: Kicked off new LPC implementation. bugref:7000

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 47.4 KB
Line 
1# $Id: Makefile.kmk 71829 2018-04-11 17:17:06Z 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_UDP_SOCKET_CLONE),VBOX_WITH_NAT_UDP_SOCKET_CLONE,) \
683 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
684 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
685 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
686 $(file)_INCS += \
687 $(1)/slirp/bsd/sys \
688 $(1)/slirp/bsd/sys/sys \
689 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
690 $(1)/slirp/bsd/netinet \
691 $(1)/slirp \
692 $(1)/slirp/libalias
693 ifeq ($(KBUILD_TARGET),win)
694 $(file)_CFLAGS = -wd4018
695 else
696 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
697 endif
698 endef
699
700 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
701
702 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
703 define def_vbox_slirp_alias_cflags
704 $(file)_DEFS += VBOX_SLIRP_ALIAS \
705 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
706 $(file)_INCS += \
707 $(1)/slirp/libalias \
708 $(1)/slirp \
709 $(1)/slirp/dnsproxy
710 ifneq ($(KBUILD_TARGET),win)
711 $(file)_CFLAGS += -Wno-shadow
712 endif
713 endef
714 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
715 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
716
717 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
718 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
719 define def_vbox_slirp_bsd_cflags
720 $(file)_DEFS += VBOX_SLIRP_BSD
721 $(file)_INCS += $(1)/slirp/dnsproxy
722 endef
723 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
724 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
725
726
727 # --- OS specific driver hacks. ---
728
729 ifeq ($(KBUILD_TARGET),darwin)
730 VBoxDD_SOURCES.darwin += Serial/DrvHostSerial.cpp
731 endif # darwin
732
733 ifeq ($(KBUILD_TARGET),freebsd)
734 VBoxDD_SOURCES += Serial/DrvHostSerial.cpp
735 VBoxDD_SOURCES.freebsd += Network/DrvTAP.cpp
736 endif # freebsd
737
738 VBoxDD_SOURCES.linux += \
739 Network/DrvTAP.cpp \
740 Parallel/DrvHostParallel.cpp \
741 Serial/DrvHostSerial.cpp
742
743 ifeq ($(KBUILD_TARGET),solaris)
744 VBoxDD_SOURCES.solaris += Serial/DrvHostSerial.cpp
745 ifdef VBOX_WITH_SUID_WRAPPER
746 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
747 endif
748 endif
749
750 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
751 VBoxDD_SOURCES.win += \
752 Serial/DrvHostSerial.cpp \
753 Parallel/DrvHostParallel.cpp
754
755 ifdef VBOX_WITH_VIRTUALKD
756 VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
757 VBoxDD_SOURCES.win += \
758 Misc/VirtualKD.cpp
759 endif
760
761 if defined(VBOX_WITH_NETFLT)
762 VBoxDD_DEFS += VBOX_WITH_NETFLT
763 if defined(VBOX_NETFLT_ONDEMAND_BIND)
764 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
765 endif
766 endif
767
768 if defined(VBOX_WITH_NEW_DRVHOSTSERIAL)
769 VBoxDD_SOURCES.linux := \
770 $(filter-out Serial/DrvHostSerial.cpp, $(VBoxDD_SOURCES.linux)) \
771 Serial/DrvHostSerialNew.cpp
772
773 VBoxDD_SOURCES.darwin := \
774 $(filter-out Serial/DrvHostSerial.cpp, $(VBoxDD_SOURCES.darwin)) \
775 Serial/DrvHostSerialNew.cpp
776
777 VBoxDD_SOURCES.win := \
778 $(filter-out Serial/DrvHostSerial.cpp, $(VBoxDD_SOURCES.win)) \
779 Serial/DrvHostSerialNew.cpp
780
781 VBoxDD_SOURCES.freebsd := \
782 $(filter-out Serial/DrvHostSerial.cpp, $(VBoxDD_SOURCES.freebsd)) \
783 Serial/DrvHostSerialNew.cpp
784
785 VBoxDD_SOURCES.solaris := \
786 $(filter-out Serial/DrvHostSerial.cpp, $(VBoxDD_SOURCES.solaris)) \
787 Serial/DrvHostSerialNew.cpp
788 endif
789
790 # --- Final bits, mostly libraries for order dependant linkers. ---
791
792 VBoxDD_LIBS += \
793 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
794 $(LIB_VMM) \
795 $(LIB_RUNTIME)
796 ifeq ($(KBUILD_TARGET),win)
797 VBoxDD_LIBS += \
798 $(LIB_DDU) \
799 $(PATH_STAGE_LIB)/VBoxDD2.lib \
800 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
801 else
802 VBoxDD_LIBS += \
803 $(VBoxDDU_1_STAGE_TARGET) \
804 $(VBoxDD2_1_STAGE_TARGET)
805 endif
806
807 ifdef VBOX_WITH_NETFLT
808 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.lib
809 endif
810
811 ifeq ($(KBUILD_TARGET),solaris)
812 VBoxDD_LIBS += adm
813 ifdef VBOX_WITH_SUID_WRAPPER
814 VBoxDD_LIBS += secdb
815 endif
816 ifdef VBOX_WITH_USB
817 VBoxDD_LIBS += aio
818 endif
819 endif
820
821 VBoxDD_LIBS.darwin += \
822 $(LIB_REM)
823
824
825 ifdef VBOX_WITH_DYNAMIC_DSDT
826 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
827 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
828
829 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
830 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
831 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
832
833 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
834
835 else # !VBOX_WITH_DYNAMIC_DSDT
836 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
837 VBoxDD_CLEAN += \
838 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
839 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
840 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
841 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml \
842 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml.tmp \
843 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex \
844 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml \
845 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.tmp \
846 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.pre
847 PC/ACPI/VBoxAcpi.cpp_DEPS = \
848 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
849 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
850 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
851
852 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
853 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
854 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
855
856 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
857
858 $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
859 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
860 $(QUIET)$(RM) -f $@ [email protected]
861 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
862 $(QUIET)$(MV) -f $@ [email protected]
863 $(QUIET)$(SED) -e "s/AmlCode/AmlCodeSsdtStandard/g" \
864 --output $@ [email protected]
865 $(QUIET)$(RM) -f [email protected]
866
867
868 vboxssdt-standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex
869
870 $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
871 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
872 $(QUIET)$(RM) -f $@ [email protected] [email protected]
873 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o [email protected] $<
874 $(QUIET)$(SED) -e "s/<NL>/\n/g" \
875 --output [email protected] [email protected]
876 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ [email protected]
877 $(QUIET)$(MV) -f $@ [email protected]
878 $(QUIET)$(SED) -e "s/AmlCode/AmlCodeSsdtCpuHotPlug/g" \
879 --output $@ [email protected]
880 $(QUIET)$(RM) -f [email protected] [email protected] [email protected]
881
882
883 vboxssdt-cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
884
885 endif # !VBOX_WITH_DYNAMIC_DSDT
886 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
887
888 # For finding PCIInternal.h from VBox/pci.h.
889 Bus/DevPCI.cpp_INCS = Bus
890 Bus/DevPciIch9.cpp_INCS = Bus
891 Bus/MsiCommon.cpp_INCS = Bus
892 Bus/MsixCommon.cpp_INCS = Bus
893 Bus/DevPciRaw.cpp_INCS = Bus
894
895 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
896 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR) $(VBOX_GRAPHICS_INCS)
897 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
898
899 $(call VBOX_SET_VER_INFO_DLL,VBoxDD,VirtualBox VMM Devices and Drivers) # (last!)
900
901
902 ifdef VBOX_WITH_RAW_MODE
903 #
904 # VBoxDDRC (sysmod)
905 #
906 VBoxDDRC_TEMPLATE = VBoxRc
907 ifeq ($(KBUILD_TARGET_ARCH),x86)
908 VBoxDDRC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
909 endif
910 VBoxDDRC_DEFS = $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
911 VBoxDDRC_INCS = build $(VBOX_GRAPHICS_INCS)
912 VBoxDDRC_SOURCES = \
913 Bus/DevPCI.cpp \
914 Bus/DevPciIch9.cpp \
915 Bus/MsiCommon.cpp \
916 Bus/MsixCommon.cpp \
917 EFI/DevSmc.cpp \
918 Graphics/DevVGA.cpp \
919 Input/DevPS2.cpp \
920 Input/PS2K.cpp \
921 Input/PS2M.cpp \
922 PC/DevACPI.cpp \
923 PC/DevIoApic.cpp \
924 PC/DevPit-i8254.cpp \
925 PC/DevPIC.cpp \
926 PC/DevRTC.cpp \
927 PC/DevDMA.cpp \
928 PC/DevHPET.cpp \
929 Storage/DevATA.cpp \
930 Network/DevPCNet.cpp \
931 Serial/DevSerial.cpp \
932 Parallel/DevParallel.cpp \
933 VMMDev/VMMDevTesting.cpp
934
935 VBoxDDRC_DEFS += $(VBOX_AUDIO_DEFS)
936 VBoxDDRC_SOURCES += \
937 Audio/DevHDA.cpp \
938 Audio/DevHDACommon.cpp \
939 Audio/DevIchAc97.cpp
940
941 VBoxDDRC_DEFS += \
942 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
943 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
944 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
945
946 ifdef VBOX_WITH_E1000
947 VBoxDDRC_DEFS += VBOX_WITH_E1000
948 VBoxDDRC_SOURCES += \
949 Network/DevE1000.cpp \
950 Network/DevE1000Phy.cpp
951 endif
952
953 ifdef VBOX_WITH_VIRTIO
954 VBoxDDRC_DEFS += VBOX_WITH_VIRTIO
955 VBoxDDRC_SOURCES += \
956 VirtIO/Virtio.cpp \
957 Network/DevVirtioNet.cpp
958 endif
959
960 ifdef VBOX_WITH_HGSMI
961 VBoxDDRC_DEFS += VBOX_WITH_HGSMI
962 endif
963 ifdef VBOX_WITH_WDDM
964 VBoxDDRC_DEFS += VBOX_WITH_WDDM
965 endif
966 ifdef VBOX_WITH_VDMA
967 VBoxDDRC_DEFS += VBOX_WITH_VDMA
968 endif
969 ifdef VBOX_WITH_CRHGSMI
970 VBoxDDRC_DEFS += VBOX_WITH_CRHGSMI
971 endif
972 ifdef VBOXWDDM_WITH_VBVA
973 VBoxDDRC_DEFS += VBOXWDDM_WITH_VBVA
974 endif
975 ifdef VBOX_WITH_VMSVGA
976 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA
977 VBoxDDRC_SOURCES += \
978 Graphics/DevVGA-SVGA.cpp
979 endif
980 ifdef VBOX_WITH_VMSVGA3D
981 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA3D
982 endif
983 ifdef VBOX_VDMA_WITH_WATCHDOG
984 VBoxDDRC_DEFS += VBOX_VDMA_WITH_WATCHDOG
985 endif
986
987 ifdef VBOX_WITH_VUSB
988 VBoxDDRC_DEFS += VBOX_WITH_VUSB
989 VBoxDDRC_SOURCES += \
990 USB/DevOHCI.cpp
991 endif
992
993 ifdef VBOX_WITH_USB
994 VBoxDDRC_DEFS += VBOX_WITH_USB
995 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
996 VBoxDDRC_DEFS += VBOX_WITH_EHCI_IMPL
997 VBoxDDRC_SOURCES += \
998 USB/DevEHCI.cpp
999 endif
1000 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1001 VBoxDDRC_DEFS += VBOX_WITH_XHCI_IMPL
1002 VBoxDDRC_SOURCES += \
1003 USB/DevXHCI.cpp
1004 endif
1005 endif
1006
1007 ifdef VBOX_WITH_VIDEOHWACCEL
1008 VBoxDDRC_DEFS += VBOX_WITH_VIDEOHWACCEL
1009 endif
1010
1011 ifdef VBOX_WITH_AHCI
1012 VBoxDDRC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
1013 VBoxDDRC_SOURCES += \
1014 Storage/DevAHCI.cpp
1015 endif
1016
1017 ifdef VBOX_WITH_BUSLOGIC
1018 VBoxDDRC_DEFS += VBOX_WITH_BUSLOGIC
1019 VBoxDDRC_SOURCES += \
1020 Storage/DevBusLogic.cpp
1021 endif
1022
1023 ifdef VBOX_WITH_LSILOGIC
1024 VBoxDDRC_DEFS += VBOX_WITH_LSILOGIC
1025 VBoxDDRC_SOURCES += \
1026 Storage/DevLsiLogicSCSI.cpp
1027 endif
1028
1029 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1030 VBoxDDGC_DEFS += VBOX_WITH_NVME_IMPL
1031 VBoxDDGC_SOURCES += \
1032 Storage/DevNVMe.cpp
1033 endif
1034
1035 if1of ($(VBOX_LDR_FMT32), pe lx)
1036 VBoxDDRC_LIBS = \
1037 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1038 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1039 endif
1040 endif # VBOX_WITH_RAW_MODE
1041
1042 $(call VBOX_SET_VER_INFO_RC,VBoxDDRC,VirtualBox VMM Devices and Drivers$(COMMA) raw-mode) # last!
1043
1044
1045 #
1046 # VBoxDD2 (shared object)
1047 #
1048 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
1049 VBoxDD2_DEFS = \
1050 IN_VBOXDD2 \
1051 $(if $(VBOX_WITH_PXE_ROM),VBOX_WITH_PXE_ROM,) \
1052 $(if $(VBOX_WITH_NEW_LPC_DEVICE),VBOX_WITH_NEW_LPC_DEVICE,)
1053 VBoxDD2_INCS := \
1054 build \
1055 $(PATH_SUB_CURRENT)
1056 VBoxDD2_SOURCES = \
1057 build/VBoxDD2.cpp \
1058 $(if $(VBOX_WITH_NEW_LPC_DEVICE),,PC/DevLPC.cpp)
1059 VBoxDD2_LIBS = \
1060 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1061 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1062 $(if $(VBOX_WITH_PXE_ROM),\
1063 $(if $(VBOX_WITH_INTEL_PXE),\
1064 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB),\
1065 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1066 $(LIB_VMM) \
1067 $(LIB_RUNTIME)
1068 VBoxDD2_LIBS.darwin += $(LIB_REM)
1069 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1070 VBoxDD2_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED)
1071
1072 $(call VBOX_SET_VER_INFO_DLL,VBoxDD2,VirtualBox VMM Devices and Drivers 2) # (last!)
1073
1074 #
1075 # VBoxDDR0 (sysmod)
1076 #
1077 VBoxDDR0_TEMPLATE = VBoxR0
1078 VBoxDDR0_DEFS = IN_RT_R0 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) # - WTF is IN_RT_R0 doing here?
1079 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1080 VBoxDDR0_INCS = build $(VBOX_GRAPHICS_INCS)
1081 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1082 VBoxDDR0_SOURCES = \
1083 build/VBoxDDR0.cpp \
1084 Bus/DevPCI.cpp \
1085 Bus/DevPciIch9.cpp \
1086 Bus/MsiCommon.cpp \
1087 Bus/MsixCommon.cpp \
1088 EFI/DevSmc.cpp \
1089 Graphics/DevVGA.cpp \
1090 Input/DevPS2.cpp \
1091 Input/PS2K.cpp \
1092 Input/PS2M.cpp \
1093 PC/DevACPI.cpp \
1094 PC/DevIoApic.cpp \
1095 PC/DevPit-i8254.cpp \
1096 PC/DevPIC.cpp \
1097 PC/DevRTC.cpp \
1098 PC/DevDMA.cpp \
1099 PC/DevHPET.cpp \
1100 Storage/DevATA.cpp \
1101 Network/DevPCNet.cpp \
1102 Serial/DevSerial.cpp \
1103 Parallel/DevParallel.cpp \
1104 VMMDev/VMMDevTesting.cpp \
1105 Network/DrvIntNet.cpp \
1106 Network/DrvDedicatedNic.cpp
1107
1108 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1109
1110 VBoxDDR0_DEFS += \
1111 $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
1112 $(if $(VBOX_WITH_WDDM),VBOX_WITH_WDDM,) \
1113 $(if $(VBOX_WITH_VDMA),VBOX_WITH_VDMA,) \
1114 $(if $(VBOX_WITH_CRHGSMI),VBOX_WITH_CRHGSMI,) \
1115 $(if $(VBOXWDDM_WITH_VBVA),VBOXWDDM_WITH_VBVA,) \
1116 $(if $(VBOX_VDMA_WITH_WATCHDOG),VBOX_VDMA_WITH_WATCHDOG,) \
1117 $(if $(VBOX_WITH_HP_HDA),VBOX_WITH_HP_HDA,) \
1118 $(if $(VBOX_WITH_INTEL_HDA),VBOX_WITH_INTEL_HDA,) \
1119 $(if $(VBOX_WITH_NVIDIA_HDA),VBOX_WITH_NVIDIA_HDA,)
1120
1121 VBoxDDR0_DEFS += $(VBOX_AUDIO_DEFS)
1122 VBoxDDR0_SOURCES += \
1123 Audio/DevHDA.cpp \
1124 Audio/DevHDACommon.cpp \
1125 Audio/DevIchAc97.cpp
1126
1127 ifdef VBOX_WITH_E1000
1128 VBoxDDR0_DEFS += VBOX_WITH_E1000
1129 VBoxDDR0_SOURCES += \
1130 Network/DevE1000.cpp \
1131 Network/DevE1000Phy.cpp
1132 endif
1133
1134 ifdef VBOX_WITH_VIRTIO
1135 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1136 VBoxDDR0_SOURCES += \
1137 VirtIO/Virtio.cpp \
1138 Network/DevVirtioNet.cpp
1139 endif
1140
1141 ifdef VBOX_WITH_NETSHAPER
1142 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1143 VBoxDDR0_SOURCES += \
1144 Network/DrvNetShaper.cpp
1145 endif
1146
1147 ifdef VBOX_WITH_VMSVGA
1148 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1149 VBoxDDR0_SOURCES += \
1150 Graphics/DevVGA-SVGA.cpp
1151 endif
1152 ifdef VBOX_WITH_VMSVGA3D
1153 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1154 endif
1155
1156 ifdef VBOX_WITH_VUSB
1157 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1158 VBoxDDR0_SOURCES += \
1159 USB/DevOHCI.cpp
1160 endif
1161 ifdef VBOX_WITH_USB
1162 VBoxDDR0_DEFS += VBOX_WITH_USB
1163 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1164 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1165 VBoxDDR0_SOURCES += \
1166 USB/DevEHCI.cpp
1167 endif
1168 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1169 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1170 VBoxDDR0_SOURCES += \
1171 USB/DevXHCI.cpp
1172 endif
1173 endif
1174
1175 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1176 VBoxDDR0_SOURCES += \
1177 Bus/DevPciRaw.cpp
1178 endif
1179
1180 ifdef VBOX_WITH_AHCI
1181 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1182 VBoxDDR0_SOURCES += \
1183 Storage/DevAHCI.cpp
1184 endif
1185
1186 ifdef VBOX_WITH_BUSLOGIC
1187 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1188 VBoxDDR0_SOURCES += \
1189 Storage/DevBusLogic.cpp
1190 endif
1191
1192 ifdef VBOX_WITH_LSILOGIC
1193 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1194 VBoxDDR0_SOURCES += \
1195 Storage/DevLsiLogicSCSI.cpp
1196 endif
1197
1198 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1199 VBoxDDR0_DEFS += VBOX_WITH_NVME_IMPL
1200 VBoxDDR0_SOURCES += \
1201 Storage/DevNVMe.cpp
1202 endif
1203
1204 ifdef VBOX_WITH_HGSMI
1205 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1206 endif
1207 ifdef VBOX_WITH_VIDEOHWACCEL
1208 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1209 endif
1210
1211 if1of ($(VBOX_LDR_FMT), pe lx)
1212 VBoxDDR0_LIBS = \
1213 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1214 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1215 endif
1216
1217 $(call VBOX_SET_VER_INFO_R0,VBoxDDR0,VirtualBox VMM Devices and Drivers$(COMMA) ring-0) # (last!)
1218
1219
1220 ifdef VBOX_WITH_RAW_MODE
1221 #
1222 # VBoxDD2RC (LGPL sysmod)
1223 #
1224 VBoxDD2RC_TEMPLATE = VBoxRc
1225 VBoxDD2RC_INCS = build
1226 VBoxDD2RC_SOURCES = \
1227 build/VBoxDD2R0.cpp # Dummy to prevent linking errors.
1228 if1of ($(VBOX_LDR_FMT32), pe lx)
1229 VBoxDD2RC_LIBS = \
1230 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1231 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1232 endif
1233 $(call VBOX_SET_VER_INFO_RC,VBoxDD2RC,VirtualBox VMM Devices and Drivers 2$(COMMA) raw-mode)
1234 endif
1235
1236
1237 #
1238 # VBoxDD2R0 (LGPL sysmod)
1239 #
1240 VBoxDD2R0_TEMPLATE = VBoxR0
1241 VBoxDD2R0_DEFS = IN_RT_R0
1242 VBoxDD2R0_INCS = build
1243 VBoxDD2R0_SOURCES = \
1244 build/VBoxDD2R0.cpp
1245 if1of ($(VBOX_LDR_FMT), pe lx)
1246 VBoxDD2R0_LIBS = \
1247 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1248 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1249 endif
1250 $(call VBOX_SET_VER_INFO_R0,VBoxDD2R0,VirtualBox VMM Devices and Drivers 2$(COMMA) ring-0) # (last!)
1251
1252
1253 #
1254 # Ring-0 Services (library, linked into VMMR0.r0)
1255 #
1256 ServicesR0_TEMPLATE = VBoxR0
1257 ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0 \
1258 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1259 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1260 ServicesR0_SOURCES = \
1261 Network/SrvIntNetR0.cpp \
1262 $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1263 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1264
1265
1266 #
1267 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1268 #
1269 ifdef VBOX_WITH_TESTCASES
1270 PROGRAMS += tstIntNetR0
1271 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
1272 tstIntNetR0_DEFS = IN_INTNET_R0
1273 tstIntNetR0_SOURCES = \
1274 Network/testcase/tstIntNetR0.cpp
1275 ifneq ($(KBUILD_TARGET),win)
1276 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1277 endif
1278 endif
1279
1280
1281 #
1282 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1283 #
1284 ifdef VBOX_WITH_TESTCASES
1285 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1286 PROGRAMS += tstIntNetHardened-1
1287 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1288 tstIntNetHardened-1_NAME = tstIntNet-1
1289 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1290 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
1291
1292 DLLS += tstIntNet-1
1293 tstIntNet-1_TEMPLATE = VBoxR3HardenedTstDll
1294 else
1295 PROGRAMS += tstIntNet-1
1296 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
1297 endif
1298 tstIntNet-1_SOURCES = \
1299 Network/testcase/tstIntNet-1.cpp \
1300 Network/Pcap.cpp
1301 endif
1302
1303
1304 #
1305 # EEPROM device unit test requires cppunit
1306 #
1307 ifdef VBOX_WITH_CPPUNIT_TESTCASES
1308 ifdef VBOX_WITH_E1000
1309 PROGRAMS += tstDevEEPROM
1310 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1311 tstDevEEPROM_SOURCES = \
1312 Network/testcase/tstDevEEPROM.cpp
1313 tstDevEEPROM_LIBS = \
1314 $(TARGET_VBoxDD)
1315 PROGRAMS += tstDevPhy
1316 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1317 tstDevPhy_SOURCES = \
1318 Network/testcase/tstDevPhy.cpp \
1319 Network/DevE1000Phy.cpp
1320 tstDevPhy_DEFS = PHY_UNIT_TEST
1321 endif
1322 endif
1323
1324 #
1325 # Apple SMC Utility.
1326 #
1327 ifdef VBOX_WITH_TESTCASES
1328 PROGRAMS.darwin += VBoxSmcUtil-darwin
1329 VBoxSmcUtil-darwin_TEMPLATE = VBOXR3TSTEXE
1330 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1331 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1332 endif
1333
1334 #
1335 # PDM device testcase framework.
1336 #
1337 ifdef VBOX_WITH_TESTCASES_TSTDEV
1338 DLLS += tstDeviceVBoxVMMStubs
1339 tstDeviceVBoxVMMStubs_TEMPLATE = VBoxR3DllNoPic
1340 tstDeviceVBoxVMMStubs_SONAME.linux = tstDeviceVBoxVMMStubs.so
1341 tstDeviceVBoxVMMStubs_SONAME.darwin = tstDeviceVBoxVMMStubs.dylib
1342 tstDeviceVBoxVMMStubs_DEFS = IN_VMM_R3 IN_DIS IN_GMM_R3 IN_DBG $(VMM_COMMON_DEFS)
1343 tstDeviceVBoxVMMStubs_LIBS = $(LIB_RUNTIME)
1344
1345 tstDeviceVBoxVMMStubs_SOURCES = \
1346 testcase/tstDeviceVMMStubs.cpp
1347
1348 PROGRAMS += tstDevice
1349 tstDevice_TEMPLATE = VBOXR3TSTEXE
1350 tstDevice_DEFS += IN_SUP_R3
1351 tstDevice_LIBS.linux = $(PATH_STAGE_BIN)/tstDeviceVBoxVMMStubs.so
1352 tstDevice_LIBS.darwin = $(PATH_STAGE_BIN)/tstDeviceVBoxVMMStubs.dylib
1353 # Required on OS X to prevent resolving symbols in the real VBoxVMM.dylib when VBoxDD.dylib is loaded
1354 tstDevice_LDFLAGS.darwin += -force_flat_namespace
1355 tstDevice_SOURCES = \
1356 testcase/tstDevice.cpp \
1357 testcase/tstDevicePdmDevHlp.cpp \
1358 testcase/tstDeviceVMM.cpp \
1359 testcase/tstDeviceSUP.cpp
1360 endif
1361
1362endif # !VBOX_ONLY_EXTPACKS
1363
1364
1365if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
1366 #
1367 # The EHCI (USB 2.0) Extension Pack Modules.
1368 #
1369 if defined(VBOX_WITH_USB)
1370 DLLS += VBoxEhciR3
1371 VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
1372 VBoxEhciR3_SOURCES = \
1373 USB/DevEHCI.cpp \
1374 USB/DevXHCI.cpp
1375 $(call VBOX_SET_VER_INFO_DLL,VBoxEhciR3,PUEL Extension Pack - EHCI Device)
1376
1377 SYSMODS += VBoxEhciR0
1378 VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
1379 VBoxEhciR0_SOURCES = \
1380 USB/DevEHCI.cpp \
1381 USB/DevXHCI.cpp
1382 $(call VBOX_SET_VER_INFO_R0,VBoxEhciR0,PUEL Extension Pack - EHCI Device$(COMMA) ring-0)
1383
1384 ifdef VBOX_WITH_RAW_MODE
1385 SYSMODS += VBoxEhciRC
1386 VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
1387 VBoxEhciRC_SOURCES = \
1388 USB/DevEHCI.cpp \
1389 USB/DevXHCI.cpp
1390 $(call VBOX_SET_VER_INFO_RC,VBoxEhciRC,PUEL Extension Pack - EHCI Device$(COMMA) raw-mode)
1391 endif
1392
1393 # Hacky but MSI support *must* be enabled
1394 ifdef VBOX_WITH_MSI_DEVICES
1395 VBoxEhciR3_DEFS += VBOX_WITH_MSI_DEVICES
1396 VBoxEhciR0_DEFS += VBOX_WITH_MSI_DEVICES
1397 VBoxEhciRC_DEFS += VBOX_WITH_MSI_DEVICES
1398 endif
1399
1400 endif
1401
1402 if defined(VBOX_WITH_PCI_PASSTHROUGH)
1403 DLLS += VBoxPciRawR3
1404 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1405 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1406 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawR3,PUEL Extension Pack - PCI Passthrough Device)
1407
1408 DLLS += VBoxPciRawDrv
1409 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1410 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1411 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawDrv,PUEL Extension Pack - PCI Passthrough Driver)
1412
1413 SYSMODS += VBoxPciRawR0
1414 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1415 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1416 $(call VBOX_SET_VER_INFO_R0,VBoxPciRawR0,PUEL Extension Pack - PCI Passthrough Driver$(COMMA) ring-0)
1417
1418 Bus/DevPciRaw.cpp_INCS = Bus
1419 endif
1420
1421 #
1422 # The NVMe Extension Pack Modules.
1423 #
1424 if defined(VBOX_WITH_NVME_IMPL)
1425 DLLS += VBoxNvmeR3
1426 VBoxNvmeR3_TEMPLATE = VBoxR3ExtPackPuel
1427 VBoxNvmeR3_SOURCES = \
1428 Storage/DevNVMe.cpp
1429 $(call VBOX_SET_VER_INFO_DLL,VBoxNvmeR3,PUEL Extension Pack - NVMe Device)
1430
1431 SYSMODS += VBoxNvmeR0
1432 VBoxNvmeR0_TEMPLATE = VBoxR0ExtPackPuel
1433 VBoxNvmeR0_SOURCES = \
1434 Storage/DevNVMe.cpp
1435 $(call VBOX_SET_VER_INFO_R0,VBoxNvmeR0,PUEL Extension Pack - NVMe Device$(COMMA) ring-0)
1436
1437 ifdef VBOX_WITH_RAW_MODE
1438 SYSMODS += VBoxNvmeRC
1439 VBoxNvmeRC_TEMPLATE = VBoxRcExtPackPuel
1440 VBoxNvmeRC_SOURCES = \
1441 Storage/DevNVMe.cpp
1442 $(call VBOX_SET_VER_INFO_RC,VBoxNvmeRC,PUEL Extension Pack - NVMe Device$(COMMA) raw-mode)
1443 endif
1444
1445 # Hacky but MSI support *must* be enabled
1446 ifdef VBOX_WITH_MSI_DEVICES
1447 VBoxNvmeR3_DEFS += VBOX_WITH_MSI_DEVICES
1448 VBoxNvmeR0_DEFS += VBOX_WITH_MSI_DEVICES
1449 VBoxNvmeRC_DEFS += VBOX_WITH_MSI_DEVICES
1450 endif
1451
1452 endif
1453
1454
1455 #
1456 # The Intel PXE ROM.
1457 #
1458 INSTALLS += VBoxExtPackPuelInsRoms
1459 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1460 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1461endif # VBOX_WITH_EXTPACK_PUEL
1462
1463
1464if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
1465 #
1466 # Template used for VBoxSVGA3D. (Strips away compiler options.)
1467 #
1468 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1469 TEMPLATE_VBoxSVGA3D_EXTENDS := $(if-expr "$(KBUILD_TARGET)" == "darwin" && !defined(VBOX_WITH_NEW_XCODE),VBoxR3DllOsX107,VBOXR3)
1470 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1471 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1472 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1473 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1474 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_LDFLAGS.darwin) \
1475 -framework AppKit -framework OpenGL -framework IOKit
1476
1477 #
1478 # The shader library used by the SVGA3D implementation.
1479 #
1480 DLLS += VBoxSVGA3D
1481 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1482 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1483 VBoxSVGA3D_DEFS = \
1484 __WINESRC__ \
1485 WINE_UNICODE_API="" \
1486 _REENTRANT \
1487 WINE_NOWINSOCK \
1488 VBOX_WITH_VMSVGA \
1489 VBOX_WITH_VMSVGA3D \
1490 DLLDIR=\"\" \
1491 BINDIR=\"\" \
1492 LIB_TO_BINDIR=\"\" \
1493 LIB_TO_DLLDIR=\"\" \
1494 BIN_TO_DLLDIR=\"\" \
1495 LIB_TO_DATADIR=\"\" \
1496 BIN_TO_DATADIR=\"\" \
1497 _USE_MATH_DEFINES \
1498 VBOX_USING_WINDDK_W7_OR_LATER \
1499 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1500 IN_vmsvgashader_STATIC \
1501 IN_VMSVGA3D \
1502 VBOX_WINE_WITH_IPRT
1503 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1504 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1505 endif
1506 VBoxSVGA3D_DEFS.x86 += __i386__
1507 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1508 VBoxSVGA3D_DEFS.win += \
1509 USE_WIN32_OPENGL \
1510 VBOX_WINE_WITHOUT_LIBWINE
1511 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1512 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1513 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1514 else
1515 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1516 endif
1517
1518 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1519 VBoxSVGA3D_DEFS.darwin += \
1520 __builtin_ms_va_list=va_list \
1521 __stdcall= \
1522 ms_abi=
1523 VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS)
1524 VBoxSVGA3D_INCS.win := \
1525 Graphics/shaderlib/libWineStub/include
1526 VBoxSVGA3D_INCS.linux := \
1527 Graphics/shaderlib/wine/include
1528 VBoxSVGA3D_INCS.darwin := \
1529 Graphics/ \
1530 Graphics/shaderlib/wine/include
1531 VBoxSVGA3D_SOURCES := \
1532 Graphics/shaderlib/glsl_shader.c \
1533 Graphics/shaderlib/shader.c \
1534 Graphics/shaderlib/shader_sm1.c \
1535 Graphics/shaderlib/shader_sm4.c \
1536 Graphics/shaderlib/shaderapi.c \
1537 Graphics/shaderlib/utils.c \
1538 Graphics/shaderlib/stateblock.c \
1539 Graphics/shaderlib/directx.c \
1540 Graphics/shaderlib/libWineStub/debug.c
1541 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1542 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1543 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1544 VBoxSVGA3D_LIBS += GL
1545 endif
1546 VBoxSVGA3D_LDFLAGS.darwin += \
1547 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1548 $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
1549 # -wd4100: unreferenced format parameter
1550 # -wd4204: nonstandard extension used : non-constant initializer
1551 # -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
1552 # -wd4305: 'function' : truncation from 'double' to 'GLclampf'
1553 VBoxSVGA3D_CFLAGS.win = -wd4100 -wd4204 -wd4245 -wd4305
1554 ifneq ($(KBUILD_TARGET),win)
1555 VBoxSVGA3D_CFLAGS += -Wno-unused-parameter -Wno-unused-function
1556 endif
1557
1558 #
1559 # The Objective C code needs to be separate since the shaderlib redefines most
1560 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1561 # functions directly. This module must be compiled for 10.7 or later, thus it
1562 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1563 #
1564 DLLS.darwin += VBoxSVGA3DObjC
1565 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1566 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS) IN_VMSVGA3DCOCOA
1567 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1568 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1569 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1570 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1571 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1572 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1573 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1574 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1575 -framework OpenGL
1576 if 1
1577 VBoxSVGA3DObjC_SOURCES.darwin += \
1578 Graphics/DevVGA-SVGA3d-cocoa.m
1579 else
1580 VBoxSVGA3DObjC_SOURCES.darwin += \
1581 ../HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m \
1582 ../HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp
1583 endif
1584
1585
1586endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
1587
1588include $(FILE_KBUILD_SUB_FOOTER)
1589
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