VirtualBox

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

Last change on this file since 56743 was 56733, checked in by vboxsync, 9 years ago

SUPHardNt: Allow hardened exectuable binaries in the 'testcase' subdirectory.

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