VirtualBox

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

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

Removed VBoxSVGA3D_CFLAGS, looks like nonsense to me.

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