VirtualBox

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

Last change on this file since 59381 was 59317, checked in by vboxsync, 9 years ago

Devices/Makefile.kmk: intendentation fixes

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