VirtualBox

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

Last change on this file since 57583 was 57522, checked in by vboxsync, 9 years ago

USB/IP: Fixes and enable building it

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