VirtualBox

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

Last change on this file since 55998 was 55840, checked in by vboxsync, 10 years ago

vmsvga3d/mac: Fixed problem with missing back/front buffers. Stop use renderspu_cocoa_helper.m and use DevVGA-SVGA3d-cocoa.m, only now its even more stripped down that earlier.

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette