VirtualBox

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

Last change on this file since 57776 was 57736, checked in by vboxsync, 9 years ago

DrvHostDSound: dynamically load dsound.dll

  • 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 57736 2015-09-14 13:11:50Z 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 endif
562
563 ifeq ($(KBUILD_TARGET),linux)
564 VBoxDD_SOURCES += \
565 Audio/DrvHostOSSAudio.cpp
566
567 ifdef VBOX_WITH_PULSE
568 VBoxDD_DEFS += VBOX_WITH_PULSE
569 VBoxDD_SOURCES += \
570 Audio/DrvHostPulseAudio.cpp \
571 Audio/pulse_stubs.c
572 endif
573
574 ifdef VBOX_WITH_ALSA
575 VBoxDD_DEFS += VBOX_WITH_ALSA
576 VBoxDD_SOURCES += \
577 Audio/DrvHostALSAAudio.cpp \
578 Audio/alsa_stubs.c
579 endif
580 endif
581
582 ifeq ($(KBUILD_TARGET),freebsd)
583 VBoxDD_SOURCES += \
584 Audio/DrvHostOSSAudio.cpp
585 ifdef VBOX_WITH_PULSE
586 VBoxDD_DEFS += VBOX_WITH_PULSE
587 VBoxDD_SOURCES += \
588 Audio/DrvHostPulseAudio.cpp \
589 Audio/pulse_stubs.c
590 endif
591 endif
592
593 ifeq ($(KBUILD_TARGET),solaris)
594 ifdef VBOX_WITH_SOLARIS_OSS
595 VBoxDD_SOURCES += Audio/DrvHostOSSAudio.cpp
596 VBoxDD_DEFS += VBOX_WITH_SOLARIS_OSS
597 endif
598 endif
599
600 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
601 VBOX_SLIRP_SOURCES = \
602 Network/DrvNAT.cpp \
603 Network/slirp/bootp.c \
604 Network/slirp/debug.c \
605 Network/slirp/ip_icmp.c \
606 Network/slirp/ip_input.c \
607 Network/slirp/ip_output.c \
608 Network/slirp/misc.c \
609 Network/slirp/sbuf.c \
610 Network/slirp/slirp.c \
611 Network/slirp/slirp_dns.c \
612 Network/slirp/socket.c \
613 Network/slirp/tcp_input.c \
614 Network/slirp/tcp_output.c \
615 Network/slirp/tcp_subr.c \
616 Network/slirp/tcp_timer.c \
617 Network/slirp/udp.c \
618 Network/slirp/dnsproxy/hash.c \
619 Network/slirp/tftp.c \
620 Network/slirp/dnsproxy/dnsproxy.c
621
622 ifeq ($(KBUILD_TARGET), win)
623 VBOX_SLIRP_SOURCES += Network/slirp/ip_icmpwin.c
624 else ifneq ($(KBUILD_TARGET),darwin)
625 # helper for debugging unprivileged
626# Network/slirp/ip_icmp.c_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
627# VBOX_SLIRP_SOURCES += ../NetworkServices/NAT/getrawsock.c
628 endif
629
630 ifneq ($(KBUILD_TARGET), win)
631 VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
632 endif
633
634 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
635 VBOX_SLIRP_BSD_SOURCES += \
636 Network/slirp/bsd/kern/kern_mbuf.c \
637 Network/slirp/bsd/kern/uipc_mbuf.c \
638 Network/slirp/bsd/kern/uipc_mbuf2.c \
639 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
640 VBOX_SLIRP_ALIAS_SOURCES = \
641 Network/slirp/libalias/alias.c \
642 Network/slirp/libalias/alias_db.c \
643 Network/slirp/libalias/alias_mod.c \
644 Network/slirp/libalias/alias_proxy.c \
645 Network/slirp/libalias/alias_ftp.c \
646 Network/slirp/libalias/alias_dns.c \
647 Network/slirp/libalias/alias_nbt.c \
648 Network/slirp/libalias/alias_util.c
649
650 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
651 # $(file)_DEFS or clean the code disabled with this definition.
652 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER=1
653
654 # dump memory related operations.
655 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
656
657 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
658 define def_vbox_slirp_cflags
659 $(file)_DEFS += \
660 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
661 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
662 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
663 $(if $(VBOX_WITH_NAT_UDP_SOCKET_CLONE),VBOX_WITH_NAT_UDP_SOCKET_CLONE,) \
664 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
665 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
666 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
667 $(file)_INCS += \
668 $(1)/slirp/bsd/sys \
669 $(1)/slirp/bsd/sys/sys \
670 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
671 $(1)/slirp/bsd/netinet \
672 $(1)/slirp \
673 $(1)/slirp/libalias
674 ifeq ($(KBUILD_TARGET),win)
675 $(file)_CFLAGS = -wd4018
676 else
677 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
678 endif
679 endef
680
681 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
682
683 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
684 define def_vbox_slirp_alias_cflags
685 $(file)_DEFS += VBOX_SLIRP_ALIAS \
686 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
687 $(file)_INCS += \
688 $(1)/slirp/libalias \
689 $(1)/slirp \
690 $(1)/slirp/dnsproxy
691 ifneq ($(KBUILD_TARGET),win)
692 $(file)_CFLAGS += -Wno-shadow
693 endif
694 endef
695 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
696 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
697
698 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
699 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
700 define def_vbox_slirp_bsd_cflags
701 $(file)_DEFS += VBOX_SLIRP_BSD
702 $(file)_INCS += $(1)/slirp/dnsproxy
703 endef
704 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
705 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
706
707
708 # --- OS specific driver hacks. ---
709
710 ifeq ($(KBUILD_TARGET),darwin)
711 VBoxDD_SOURCES.darwin += Serial/DrvHostSerial.cpp
712 endif # darwin
713
714 ifeq ($(KBUILD_TARGET),freebsd)
715 VBoxDD_SOURCES += Serial/DrvHostSerial.cpp
716 VBoxDD_SOURCES.freebsd += Network/DrvTAP.cpp
717 endif # freebsd
718
719 VBoxDD_SOURCES.linux += \
720 Network/DrvTAP.cpp \
721 Parallel/DrvHostParallel.cpp \
722 Serial/DrvHostSerial.cpp
723
724 ifeq ($(KBUILD_TARGET),solaris)
725 VBoxDD_SOURCES.solaris += Serial/DrvHostSerial.cpp
726 ifdef VBOX_WITH_SUID_WRAPPER
727 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
728 endif
729 endif
730
731 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
732 VBoxDD_SOURCES.win += \
733 Serial/DrvHostSerial.cpp \
734 Parallel/DrvHostParallel.cpp
735
736 ifdef VBOX_WITH_VIRTUALKD
737 VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
738 VBoxDD_SOURCES.win += \
739 Misc/VirtualKD.cpp
740 endif
741
742 if defined(VBOX_WITH_NETFLT)
743 VBoxDD_DEFS += VBOX_WITH_NETFLT
744 if defined(VBOX_NETFLT_ONDEMAND_BIND)
745 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
746 endif
747 endif
748
749
750 # --- Final bits, mostly libraries for order dependant linkers. ---
751
752 VBoxDD_LIBS += \
753 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
754 $(LIB_VMM) \
755 $(LIB_RUNTIME)
756 ifeq ($(KBUILD_TARGET),win)
757 VBoxDD_LIBS += \
758 $(LIB_DDU) \
759 $(PATH_STAGE_LIB)/VBoxDD2.lib \
760 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
761 else
762 VBoxDD_LIBS += \
763 $(VBoxDDU_1_STAGE_TARGET) \
764 $(VBoxDD2_1_STAGE_TARGET)
765 endif
766
767 ifdef VBOX_WITH_NETFLT
768 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.lib
769 endif
770
771 ifeq ($(KBUILD_TARGET),solaris)
772 VBoxDD_LIBS += adm
773 ifdef VBOX_WITH_SUID_WRAPPER
774 VBoxDD_LIBS += secdb
775 endif
776 ifdef VBOX_WITH_USB
777 VBoxDD_LIBS += aio
778 endif
779 endif
780
781 VBoxDD_LIBS.darwin += \
782 $(LIB_REM)
783
784
785 ifdef VBOX_WITH_DYNAMIC_DSDT
786 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
787 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
788
789 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
790 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
791 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
792
793 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
794
795 else # !VBOX_WITH_DYNAMIC_DSDT
796 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
797 VBoxDD_CLEAN += \
798 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
799 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
800 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
801 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml \
802 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml.tmp \
803 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex \
804 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml \
805 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.tmp \
806 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.pre
807 PC/ACPI/VBoxAcpi.cpp_DEPS = \
808 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
809 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
810 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
811
812 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
813 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
814 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
815
816 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
817
818 $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
819 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
820 $(QUIET)$(RM) -f $@ [email protected]
821 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
822 $(QUIET)$(MV) -f $@ [email protected]
823 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtStandard/g" \
824 --output $@ [email protected]
825 $(QUIET)$(RM) -f [email protected]
826
827
828 vboxssdt-standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex
829
830 $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
831 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
832 $(QUIET)$(RM) -f $@ [email protected] [email protected]
833 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o [email protected] $<
834 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ [email protected]
835 $(QUIET)$(MV) -f $@ [email protected]
836 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtCpuHotPlug/g" \
837 --output $@ [email protected]
838 $(QUIET)$(RM) -f [email protected] [email protected]
839
840
841 vboxssdt-cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
842
843 endif # !VBOX_WITH_DYNAMIC_DSDT
844 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
845
846 # For finding PCIInternal.h from VBox/pci.h.
847 Bus/DevPCI.cpp_INCS = Bus
848 Bus/DevPciIch9.cpp_INCS = Bus
849 Bus/MsiCommon.cpp_INCS = Bus
850 Bus/MsixCommon.cpp_INCS = Bus
851 Bus/DevPciRaw.cpp_INCS = Bus
852
853 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
854 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR)
855 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
856
857 $(call VBOX_SET_VER_INFO_DLL,VBoxDD,VirtualBox VMM Devices and Drivers) # (last!)
858
859
860 ifdef VBOX_WITH_RAW_MODE
861 #
862 # VBoxDDRC (sysmod)
863 #
864 VBoxDDRC_TEMPLATE = VBoxRc
865 ifeq ($(KBUILD_TARGET_ARCH),x86)
866 VBoxDDRC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
867 endif
868 VBoxDDRC_DEFS = $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
869 VBoxDDRC_INCS = build
870 VBoxDDRC_SOURCES = \
871 Audio/DevIchHda.cpp \
872 Bus/DevPCI.cpp \
873 Bus/DevPciIch9.cpp \
874 Bus/MsiCommon.cpp \
875 Bus/MsixCommon.cpp \
876 EFI/DevSmc.cpp \
877 Graphics/DevVGA.cpp \
878 Input/DevPS2.cpp \
879 Input/PS2K.cpp \
880 Input/PS2M.cpp \
881 PC/DevACPI.cpp \
882 PC/DevPit-i8254.cpp \
883 PC/DevPIC.cpp \
884 PC/DevRTC.cpp \
885 PC/DevHPET.cpp \
886 Storage/DevATA.cpp \
887 Network/DevPCNet.cpp \
888 Serial/DevSerial.cpp \
889 Parallel/DevParallel.cpp \
890 VMMDev/VMMDevTesting.cpp
891
892 ifdef VBOX_WITH_E1000
893 VBoxDDRC_DEFS += VBOX_WITH_E1000
894 VBoxDDRC_SOURCES += \
895 Network/DevE1000.cpp \
896 Network/DevE1000Phy.cpp
897 endif
898
899 ifdef VBOX_WITH_VIRTIO
900 VBoxDDRC_DEFS += VBOX_WITH_VIRTIO
901 VBoxDDRC_SOURCES += \
902 VirtIO/Virtio.cpp \
903 Network/DevVirtioNet.cpp
904 endif
905
906 ifdef VBOX_WITH_HGSMI
907 VBoxDDRC_DEFS += VBOX_WITH_HGSMI
908 endif
909 ifdef VBOX_WITH_WDDM
910 VBoxDDRC_DEFS += VBOX_WITH_WDDM
911 endif
912 ifdef VBOX_WITH_VDMA
913 VBoxDDRC_DEFS += VBOX_WITH_VDMA
914 endif
915 ifdef VBOX_WITH_CRHGSMI
916 VBoxDDRC_DEFS += VBOX_WITH_CRHGSMI
917 endif
918 ifdef VBOXWDDM_WITH_VBVA
919 VBoxDDRC_DEFS += VBOXWDDM_WITH_VBVA
920 endif
921 ifdef VBOX_WITH_VMSVGA
922 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA
923 VBoxDDRC_SOURCES += \
924 Graphics/DevVGA-SVGA.cpp
925 endif
926 ifdef VBOX_WITH_VMSVGA3D
927 VBoxDDRC_DEFS += VBOX_WITH_VMSVGA3D
928 endif
929 ifdef VBOX_VDMA_WITH_WATCHDOG
930 VBoxDDRC_DEFS += VBOX_VDMA_WITH_WATCHDOG
931 endif
932
933 ifdef VBOX_WITH_VUSB
934 VBoxDDRC_DEFS += VBOX_WITH_VUSB
935 VBoxDDRC_SOURCES += \
936 USB/DevOHCI.cpp
937 endif
938
939 ifdef VBOX_WITH_USB
940 VBoxDDRC_DEFS += VBOX_WITH_USB
941 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
942 VBoxDDRC_DEFS += VBOX_WITH_EHCI_IMPL
943 VBoxDDRC_SOURCES += \
944 USB/DevEHCI.cpp
945 endif
946 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
947 VBoxDDRC_DEFS += VBOX_WITH_XHCI_IMPL
948 VBoxDDRC_SOURCES += \
949 USB/DevXHCI.cpp
950 endif
951 endif
952
953 ifdef VBOX_WITH_VIDEOHWACCEL
954 VBoxDDRC_DEFS += VBOX_WITH_VIDEOHWACCEL
955 endif
956
957 ifdef VBOX_WITH_AHCI
958 VBoxDDRC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
959 VBoxDDRC_SOURCES += \
960 Storage/DevAHCI.cpp
961 endif
962
963 ifdef VBOX_WITH_BUSLOGIC
964 VBoxDDRC_DEFS += VBOX_WITH_BUSLOGIC
965 VBoxDDRC_SOURCES += \
966 Storage/DevBusLogic.cpp
967 endif
968
969 ifdef VBOX_WITH_LSILOGIC
970 VBoxDDRC_DEFS += VBOX_WITH_LSILOGIC
971 VBoxDDRC_SOURCES += \
972 Storage/DevLsiLogicSCSI.cpp
973 endif
974
975 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
976 VBoxDDGC_DEFS += VBOX_WITH_NVME_IMPL
977 VBoxDDGC_SOURCES += \
978 Storage/DevNVMe.cpp
979 endif
980
981 ifdef VBOX_WITH_NEW_PS2M
982 VBoxDDRC_DEFS += VBOX_WITH_NEW_PS2M
983 endif
984
985 if1of ($(VBOX_LDR_FMT32), pe lx)
986 VBoxDDRC_LIBS = \
987 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
988 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
989 endif
990 endif # VBOX_WITH_RAW_MODE
991
992 $(call VBOX_SET_VER_INFO_RC,VBoxDDRC,VirtualBox VMM Devices and Drivers$(COMMA) raw-mode) # last!
993
994
995 #
996 # VBoxDD2 (shared object)
997 #
998 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
999 VBoxDD2_DEFS = IN_VBOXDD2
1000 VBoxDD2_INCS := \
1001 build \
1002 $(PATH_SUB_CURRENT)
1003 VBoxDD2_SOURCES = \
1004 build/VBoxDD2.cpp \
1005 PC/DevAPIC.cpp \
1006 PC/DevIoApic.cpp \
1007 PC/DevLPC.cpp
1008 VBoxDD2_LIBS = \
1009 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1010 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1011 $(if $(VBOX_WITH_PXE_ROM),\
1012 $(if $(VBOX_WITH_INTEL_PXE),\
1013 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB),\
1014 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1015 $(LIB_VMM) \
1016 $(LIB_RUNTIME)
1017 VBoxDD2_LIBS.darwin += $(LIB_REM)
1018 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1019 VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
1020
1021 ifdef VBOX_WITH_PXE_ROM
1022 VBoxDD2_DEFS += VBOX_WITH_PXE_ROM
1023 endif
1024
1025 $(call VBOX_SET_VER_INFO_DLL,VBoxDD2,VirtualBox VMM Devices and Drivers 2) # (last!)
1026
1027 #
1028 # VBoxDDR0 (sysmod)
1029 #
1030 VBoxDDR0_TEMPLATE = VBoxR0
1031 VBoxDDR0_DEFS = IN_RT_R0 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) # - WTF is IN_RT_R0 doing here?
1032 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1033 VBoxDDR0_INCS = build
1034 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1035 VBoxDDR0_SOURCES = \
1036 build/VBoxDDR0.cpp \
1037 Audio/DevIchHda.cpp \
1038 Bus/DevPCI.cpp \
1039 Bus/DevPciIch9.cpp \
1040 Bus/MsiCommon.cpp \
1041 Bus/MsixCommon.cpp \
1042 EFI/DevSmc.cpp \
1043 Graphics/DevVGA.cpp \
1044 Input/DevPS2.cpp \
1045 Input/PS2K.cpp \
1046 Input/PS2M.cpp \
1047 PC/DevACPI.cpp \
1048 PC/DevPit-i8254.cpp \
1049 PC/DevPIC.cpp \
1050 PC/DevRTC.cpp \
1051 PC/DevHPET.cpp \
1052 Storage/DevATA.cpp \
1053 Network/DevPCNet.cpp \
1054 Serial/DevSerial.cpp \
1055 Parallel/DevParallel.cpp \
1056 VMMDev/VMMDevTesting.cpp \
1057 \
1058 Network/DrvIntNet.cpp \
1059 Network/DrvDedicatedNic.cpp
1060
1061 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1062
1063 ifdef VBOX_WITH_E1000
1064 VBoxDDR0_DEFS += VBOX_WITH_E1000
1065 VBoxDDR0_SOURCES += \
1066 Network/DevE1000.cpp \
1067 Network/DevE1000Phy.cpp
1068 endif
1069
1070 ifdef VBOX_WITH_VIRTIO
1071 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1072 VBoxDDR0_SOURCES += \
1073 VirtIO/Virtio.cpp \
1074 Network/DevVirtioNet.cpp
1075 endif
1076
1077 ifdef VBOX_WITH_NETSHAPER
1078 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1079 VBoxDDR0_SOURCES += \
1080 Network/DrvNetShaper.cpp
1081 endif
1082
1083 ifdef VBOX_WITH_VMSVGA
1084 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1085 VBoxDDR0_SOURCES += \
1086 Graphics/DevVGA-SVGA.cpp
1087 endif
1088 ifdef VBOX_WITH_VMSVGA3D
1089 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1090 endif
1091
1092 ifdef VBOX_WITH_HGSMI
1093 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1094 endif
1095 ifdef VBOX_WITH_WDDM
1096 VBoxDDR0_DEFS += VBOX_WITH_WDDM
1097 endif
1098 ifdef VBOX_WITH_VDMA
1099 VBoxDDR0_DEFS += VBOX_WITH_VDMA
1100 endif
1101 ifdef VBOX_WITH_CRHGSMI
1102 VBoxDDR0_DEFS += VBOX_WITH_CRHGSMI
1103 endif
1104 ifdef VBOXWDDM_WITH_VBVA
1105 VBoxDDR0_DEFS += VBOXWDDM_WITH_VBVA
1106 endif
1107 ifdef VBOX_VDMA_WITH_WATCHDOG
1108 VBoxDDR0_DEFS += VBOX_VDMA_WITH_WATCHDOG
1109 endif
1110
1111 ifdef VBOX_WITH_VUSB
1112 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1113 VBoxDDR0_SOURCES += \
1114 USB/DevOHCI.cpp
1115 endif
1116 ifdef VBOX_WITH_USB
1117 VBoxDDR0_DEFS += VBOX_WITH_USB
1118 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1119 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1120 VBoxDDR0_SOURCES += \
1121 USB/DevEHCI.cpp
1122 endif
1123 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1124 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1125 VBoxDDR0_SOURCES += \
1126 USB/DevXHCI.cpp
1127 endif
1128 endif
1129
1130 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1131 VBoxDDR0_SOURCES += \
1132 Bus/DevPciRaw.cpp
1133 endif
1134
1135 ifdef VBOX_WITH_AHCI
1136 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1137 VBoxDDR0_SOURCES += \
1138 Storage/DevAHCI.cpp
1139 endif
1140
1141 ifdef VBOX_WITH_BUSLOGIC
1142 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1143 VBoxDDR0_SOURCES += \
1144 Storage/DevBusLogic.cpp
1145 endif
1146
1147 ifdef VBOX_WITH_LSILOGIC
1148 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1149 VBoxDDR0_SOURCES += \
1150 Storage/DevLsiLogicSCSI.cpp
1151 endif
1152
1153 if defined(VBOX_WITH_NVME_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1154 VBoxDDR0_DEFS += VBOX_WITH_NVME_IMPL
1155 VBoxDDR0_SOURCES += \
1156 Storage/DevNVMe.cpp
1157 endif
1158
1159 ifdef VBOX_WITH_NEW_PS2M
1160 VBoxDDR0_DEFS += VBOX_WITH_NEW_PS2M
1161 endif
1162
1163 ifdef VBOX_WITH_HGSMI
1164 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1165 endif
1166 ifdef VBOX_WITH_VIDEOHWACCEL
1167 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1168 endif
1169
1170 if1of ($(VBOX_LDR_FMT), pe lx)
1171 VBoxDDR0_LIBS = \
1172 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1173 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1174 endif
1175
1176 $(call VBOX_SET_VER_INFO_R0,VBoxDDR0,VirtualBox VMM Devices and Drivers$(COMMA) ring-0) # (last!)
1177
1178
1179 ifdef VBOX_WITH_RAW_MODE
1180 #
1181 # VBoxDD2RC (LGPL sysmod)
1182 #
1183 VBoxDD2RC_TEMPLATE = VBoxRc
1184 VBoxDD2RC_INCS = build
1185 VBoxDD2RC_SOURCES = \
1186 PC/DevAPIC.cpp \
1187 PC/DevIoApic.cpp
1188 if1of ($(VBOX_LDR_FMT32), pe lx)
1189 VBoxDD2RC_LIBS = \
1190 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1191 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1192 endif
1193 $(call VBOX_SET_VER_INFO_RC,VBoxDD2RC,VirtualBox VMM Devices and Drivers 2$(COMMA) raw-mode)
1194 endif
1195
1196
1197 #
1198 # VBoxDD2R0 (LGPL sysmod)
1199 #
1200 VBoxDD2R0_TEMPLATE = VBoxR0
1201 VBoxDD2R0_DEFS = IN_RT_R0
1202 VBoxDD2R0_INCS = build
1203 VBoxDD2R0_SOURCES = \
1204 build/VBoxDD2R0.cpp \
1205 PC/DevAPIC.cpp \
1206 PC/DevIoApic.cpp \
1207
1208 if1of ($(VBOX_LDR_FMT), pe lx)
1209 VBoxDD2R0_LIBS = \
1210 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1211 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1212 endif
1213 $(call VBOX_SET_VER_INFO_R0,VBoxDD2R0,VirtualBox VMM Devices and Drivers 2$(COMMA) ring-0) # (last!)
1214
1215
1216 #
1217 # Ring-0 Services (library, linked into VMMR0.r0)
1218 #
1219 ServicesR0_TEMPLATE = VBoxR0
1220 ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0 \
1221 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1222 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1223 ServicesR0_SOURCES = \
1224 Network/SrvIntNetR0.cpp \
1225 $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1226 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1227
1228
1229 #
1230 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1231 #
1232 ifdef VBOX_WITH_TESTCASES
1233 PROGRAMS += tstIntNetR0
1234 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
1235 tstIntNetR0_DEFS = IN_INTNET_R0
1236 tstIntNetR0_SOURCES = \
1237 Network/testcase/tstIntNetR0.cpp
1238 ifneq ($(KBUILD_TARGET),win)
1239 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1240 endif
1241 endif
1242
1243
1244 #
1245 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1246 #
1247 ifdef VBOX_WITH_TESTCASES
1248 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1249 PROGRAMS += tstIntNetHardened-1
1250 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1251 tstIntNetHardened-1_NAME = tstIntNet-1
1252 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1253 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
1254
1255 DLLS += tstIntNet-1
1256 tstIntNet-1_TEMPLATE = VBoxR3HardenedTstDll
1257 else
1258 PROGRAMS += tstIntNet-1
1259 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
1260 endif
1261 tstIntNet-1_SOURCES = \
1262 Network/testcase/tstIntNet-1.cpp \
1263 Network/Pcap.cpp
1264 endif
1265
1266
1267 #
1268 # EEPROM device unit test requires cppunit
1269 #
1270 ifdef VBOX_WITH_CPPUNIT_TESTCASES
1271 ifdef VBOX_WITH_E1000
1272 PROGRAMS += tstDevEEPROM
1273 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1274 tstDevEEPROM_SOURCES = \
1275 Network/testcase/tstDevEEPROM.cpp
1276 tstDevEEPROM_LIBS = \
1277 $(TARGET_VBoxDD)
1278 PROGRAMS += tstDevPhy
1279 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1280 tstDevPhy_SOURCES = \
1281 Network/testcase/tstDevPhy.cpp \
1282 Network/DevE1000Phy.cpp
1283 tstDevPhy_DEFS = PHY_UNIT_TEST
1284 endif
1285 endif
1286
1287 #
1288 # Apple SMC Utility.
1289 #
1290 ifdef VBOX_WITH_TESTCASES
1291 PROGRAMS.darwin += VBoxSmcUtil-darwin
1292 VBoxSmcUtil-darwin_TEMPLATE = VBOXR3TSTEXE
1293 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1294 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1295 endif
1296
1297endif # !VBOX_ONLY_EXTPACKS
1298
1299
1300if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
1301 #
1302 # The EHCI (USB 2.0) Extension Pack Modules.
1303 #
1304 if defined(VBOX_WITH_USB)
1305 DLLS += VBoxEhciR3
1306 VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
1307 VBoxEhciR3_SOURCES = \
1308 USB/DevEHCI.cpp \
1309 USB/DevXHCI.cpp
1310 $(call VBOX_SET_VER_INFO_DLL,VBoxEhciR3,PUEL Extension Pack - EHCI Device)
1311
1312 SYSMODS += VBoxEhciR0
1313 VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
1314 VBoxEhciR0_SOURCES = \
1315 USB/DevEHCI.cpp \
1316 USB/DevXHCI.cpp
1317 $(call VBOX_SET_VER_INFO_R0,VBoxEhciR0,PUEL Extension Pack - EHCI Device$(COMMA) ring-0)
1318
1319 ifdef VBOX_WITH_RAW_MODE
1320 SYSMODS += VBoxEhciRC
1321 VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
1322 VBoxEhciRC_SOURCES = \
1323 USB/DevEHCI.cpp \
1324 USB/DevXHCI.cpp
1325 $(call VBOX_SET_VER_INFO_RC,VBoxEhciRC,PUEL Extension Pack - EHCI Device$(COMMA) raw-mode)
1326 endif
1327
1328 # Hacky but MSI support *must* be enabled
1329 ifdef VBOX_WITH_MSI_DEVICES
1330 VBoxEhciR3_DEFS += VBOX_WITH_MSI_DEVICES
1331 VBoxEhciR0_DEFS += VBOX_WITH_MSI_DEVICES
1332 VBoxEhciRC_DEFS += VBOX_WITH_MSI_DEVICES
1333 endif
1334
1335 endif
1336
1337 if defined(VBOX_WITH_PCI_PASSTHROUGH)
1338 DLLS += VBoxPciRawR3
1339 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1340 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1341 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawR3,PUEL Extension Pack - PCI Passthrough Device)
1342
1343 DLLS += VBoxPciRawDrv
1344 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1345 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1346 $(call VBOX_SET_VER_INFO_DLL,VBoxPciRawDrv,PUEL Extension Pack - PCI Passthrough Driver)
1347
1348 SYSMODS += VBoxPciRawR0
1349 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1350 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1351 $(call VBOX_SET_VER_INFO_R0,VBoxPciRawR0,PUEL Extension Pack - PCI Passthrough Driver$(COMMA) ring-0)
1352
1353 Bus/DevPciRaw.cpp_INCS = Bus
1354 endif
1355
1356 #
1357 # The NVMe Extension Pack Modules.
1358 #
1359 if defined(VBOX_WITH_NVME_IMPL)
1360 DLLS += VBoxNvmeR3
1361 VBoxNvmeR3_TEMPLATE = VBoxR3ExtPackPuel
1362 VBoxNvmeR3_SOURCES = \
1363 Storage/DevNVMe.cpp
1364 VBoxNvmeR3_SOURCES.win = \
1365 build/VBoxNvmeR3.rc
1366
1367 SYSMODS += VBoxNvmeR0
1368 VBoxNvmeR0_TEMPLATE = VBoxR0ExtPackPuel
1369 VBoxNvmeR0_SOURCES = \
1370 Storage/DevNVMe.cpp
1371
1372 ifdef VBOX_WITH_RAW_MODE
1373 SYSMODS += VBoxNvmeRC
1374 VBoxNvmeRC_TEMPLATE = VBoxRcExtPackPuel
1375 VBoxNvmeRC_SOURCES = \
1376 Storage/DevNVMe.cpp
1377 endif
1378
1379 # Hacky but MSI support *must* be enabled
1380 ifdef VBOX_WITH_MSI_DEVICES
1381 VBoxNvmeR3_DEFS += VBOX_WITH_MSI_DEVICES
1382 VBoxNvmeR0_DEFS += VBOX_WITH_MSI_DEVICES
1383 VBoxNvmeRC_DEFS += VBOX_WITH_MSI_DEVICES
1384 endif
1385
1386 endif
1387
1388
1389 #
1390 # The Intel PXE ROM.
1391 #
1392 INSTALLS += VBoxExtPackPuelInsRoms
1393 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1394 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1395endif # VBOX_WITH_EXTPACK_PUEL
1396
1397
1398if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
1399 #
1400 # Template used for VBoxSVGA3D. (Stips away compiler options.)
1401 #
1402 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1403 TEMPLATE_VBoxSVGA3D_EXTENDS := $(if-expr "$(KBUILD_TARGET)" == "darwin",VBoxR3DllOsX107,VBOXR3)
1404 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1405 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1406 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1407 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1408 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_VBoxR3DllOsX107_LDFLAGS.darwin) \
1409 -framework AppKit -framework OpenGL -framework IOKit
1410
1411 #
1412 # The shader library used by the SVGA3D implementation.
1413 #
1414 DLLS += VBoxSVGA3D
1415 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1416 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1417 VBoxSVGA3D_DEFS = \
1418 __WINESRC__ \
1419 WINE_UNICODE_API="" \
1420 _REENTRANT \
1421 WINE_NOWINSOCK \
1422 VBOX_WITH_VMSVGA \
1423 VBOX_WITH_VMSVGA3D \
1424 DLLDIR=\"\" \
1425 BINDIR=\"\" \
1426 LIB_TO_BINDIR=\"\" \
1427 LIB_TO_DLLDIR=\"\" \
1428 BIN_TO_DLLDIR=\"\" \
1429 LIB_TO_DATADIR=\"\" \
1430 BIN_TO_DATADIR=\"\" \
1431 _USE_MATH_DEFINES \
1432 VBOX_USING_WINDDK_W7_OR_LATER \
1433 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1434 IN_vmsvgashader_STATIC \
1435 IN_VMSVGA3D \
1436 VBOX_WINE_WITH_IPRT
1437 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1438 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1439 endif
1440 VBoxSVGA3D_DEFS.x86 += __i386__
1441 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1442 VBoxSVGA3D_DEFS.win += \
1443 USE_WIN32_OPENGL \
1444 VBOX_WINE_WITHOUT_LIBWINE
1445 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1446 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1447 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1448 else
1449 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1450 endif
1451
1452 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1453 VBoxSVGA3D_DEFS.darwin += \
1454 __builtin_ms_va_list=va_list \
1455 __stdcall= \
1456 ms_abi=
1457 VBoxSVGA3D_INCS.win := \
1458 Graphics/shaderlib/libWineStub/include
1459 VBoxSVGA3D_INCS.linux := \
1460 Graphics/shaderlib/wine/include
1461 VBoxSVGA3D_INCS.darwin := \
1462 Graphics/ \
1463 Graphics/shaderlib/wine/include
1464 VBoxSVGA3D_SOURCES := \
1465 Graphics/shaderlib/glsl_shader.c \
1466 Graphics/shaderlib/shader.c \
1467 Graphics/shaderlib/shader_sm1.c \
1468 Graphics/shaderlib/shader_sm4.c \
1469 Graphics/shaderlib/shaderapi.c \
1470 Graphics/shaderlib/utils.c \
1471 Graphics/shaderlib/stateblock.c \
1472 Graphics/shaderlib/directx.c \
1473 Graphics/shaderlib/libWineStub/debug.c
1474 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1475 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1476 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1477 VBoxSVGA3D_LIBS += GL
1478 endif
1479 VBoxSVGA3D_LDFLAGS.darwin += \
1480 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1481 $(call VBOX_SET_VER_INFO_DLL,VBoxSVGA3D,VirtualBox VMSVGA 3D)
1482
1483 #
1484 # The Objective C code needs to be separate since the shaderlib redefines most
1485 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1486 # functions directly. This module must be compiled for 10.7 or later, thus it
1487 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1488 #
1489 DLLS.darwin += VBoxSVGA3DObjC
1490 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1491 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS) IN_VMSVGA3DCOCOA
1492 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1493 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1494 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1495 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1496 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1497 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1498 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1499 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1500 -framework OpenGL
1501 if 1
1502 VBoxSVGA3DObjC_SOURCES.darwin += \
1503 Graphics/DevVGA-SVGA3d-cocoa.m
1504 else
1505 VBoxSVGA3DObjC_SOURCES.darwin += \
1506 ../HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m \
1507 ../HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp
1508 endif
1509
1510
1511
1512endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
1513
1514include $(FILE_KBUILD_SUB_FOOTER)
1515
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