VirtualBox

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

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

Main/Serial+Devices/Serial: new TCP backend for serial port. Contributed by Alexey Eromenko. Thanks!
Frontends/VirtualBox+VBoxManage: adapted accordingly

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