VirtualBox

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

Last change on this file since 57520 was 57446, checked in by vboxsync, 9 years ago

VMM: Removing VBOX_WITH_HYBRID_32BIT_KERNEL and other 32-bit darwin fun.

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