VirtualBox

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

Last change on this file since 58466 was 57990, checked in by vboxsync, 9 years ago

Removed the 'temporary' VBOX_WITH_NEW_USB_CODE_ON_DARWIN define (r29740, 7 years ago).

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