VirtualBox

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

Last change on this file since 60961 was 60957, checked in by vboxsync, 9 years ago

Devices/Makefile.kmk: Adjustments for new Xcode version.

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