VirtualBox

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

Last change on this file since 85561 was 85507, checked in by vboxsync, 4 years ago

SUP,*: Some changes to the SUP_IOCTL_LDR_OPEN and SUP_IOCTL_LDR_LOAD interfaces adding memory protection regions for better WX compliance. Preps for linux 5.8 where we'll be using RTR0MemObjAllocPage rather than RTMemExecAlloc for images, switch from relocatable ELF files to shared objects. bugref:9801

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