VirtualBox

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

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

Devices/vmsvga: enabled 3D and a few warning fixes

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