VirtualBox

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

Last change on this file since 55747 was 55432, checked in by vboxsync, 10 years ago

G/c VBOX_WITH_NEW_LWIP. This option only affects DevINIP/DrvVD (as
NAT Network always uses the new one) and it has been on since 4.3 was
released. Old lwip sources will be removed in a separate commit.

Same object code is produced modulo a few LINE changes.

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