VirtualBox

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

Last change on this file since 57398 was 57296, checked in by vboxsync, 9 years ago

Disable host block device handling for Windows for now as some users experience problems with it

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