VirtualBox

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

Last change on this file since 54558 was 54273, checked in by vboxsync, 10 years ago

PDM/Audio: Work on CoreAudio backend.

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