VirtualBox

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

Last change on this file since 59457 was 59448, checked in by vboxsync, 9 years ago

Devices/Storage: More work on the new I/O interface

Implement a new memory manager for allocating I/O buffers using a modified buddy algorithm.
The difference is that when both buddies are freed they don't coalesce automatically. This is to avoid
always splitting blocks up when the guest just wants to do 4KB transfers all the time. The defragmentation
will be done in one step if they allocator notices that it can't allocate enough memory from the correct bin
or bins which contain bigger blocks even though there is enough free memory (needs to be implemented).
The amount of I/O memory is static while the VM is running which makes the memory consumption by the I/O
stack more predictable. If requests can't allocate enough memory they need to chop up the transfer into smaller
parts. In case they can't allocate any I/O memory they are placed on a waiting list and are processed
when there is memory again.
The amount of usable I/O memory can be tuned with the "IoBufMax" CFGM key to accomodate for different workloads
and defaults to 5MB.

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