VirtualBox

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

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

USB: Integrate USB sniffer. Make it possible to specify a file to dump the traffic to when attaching a USB device with VBoxManage

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 36.5 KB
Line 
1# $Id: Makefile.kmk 53062 2014-10-15 12:34:18Z 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)/vmsvgashader$(VBOX_SUFF_DLL)
249 endif
250 VBoxDD_LIBS.win += d3d9.lib
251 VBoxDD_LIBS.linux += GL X11
252 endif
253
254 ifdef VBOX_WITH_VDMA
255 VBoxDD_DEFS += VBOX_WITH_VDMA
256 VBoxDD_SOURCES += \
257 Graphics/DevVGA_VDMA.cpp
258 endif
259
260 ifdef VBOX_VDMA_WITH_WATCHDOG
261 VBoxDD_DEFS += VBOX_VDMA_WITH_WATCHDOG
262 endif
263
264 ifdef VBOX_WITH_PXE_ROM
265 VBoxDD_DEFS += VBOX_WITH_PXE_ROM
266 endif
267
268 # --- USB bits. ---
269
270 ifdef VBOX_WITH_USB
271 VBoxDD_DEFS += VBOX_WITH_USB
272 VBoxDD_SOURCES += \
273 USB/vrdp/USBProxyDevice-vrdp.cpp
274
275 VBoxDD_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
276 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
277 VBoxDD_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
278 endif
279 VBoxDD_SOURCES.darwin += \
280 USB/USBProxyDevice.cpp \
281 USB/darwin/USBProxyDevice-darwin.cpp
282
283 VBoxDD_DEFS.linux += \
284 VUSB_HAVE_USBPROXY_DEVICE \
285 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
286 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
287 VBoxDD_SOURCES.linux += \
288 USB/USBProxyDevice.cpp \
289 USB/linux/USBProxyDevice-linux.cpp
290
291 VBoxDD_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
292 VBoxDD_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
293 VBoxDD_SOURCES.os2 += \
294 USB/USBProxyDevice.cpp \
295 USB/os2/USBProxyDevice-os2.cpp
296
297 VBoxDD_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
298 VBoxDD_SOURCES.win += \
299 USB/USBProxyDevice.cpp \
300 USB/win/USBProxyDevice-win.cpp
301
302 VBoxDD_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
303 VBoxDD_SOURCES.solaris+= \
304 USB/USBProxyDevice.cpp \
305 USB/solaris/USBProxyDevice-solaris.cpp
306
307 VBoxDD_DEFS.freebsd += VUSB_HAVE_USBPROXY_DEVICE
308 VBoxDD_SOURCES.freebsd+= \
309 USB/USBProxyDevice.cpp \
310 USB/freebsd/USBProxyDevice-freebsd.cpp
311
312 ifdef VBOX_WITH_SCSI
313 VBoxDD_SOURCES += \
314 Storage/UsbMsd.cpp
315 endif
316
317 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
318 VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
319 VBoxDD_SOURCES += \
320 USB/DevEHCI.cpp
321 endif
322
323 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
324 VBoxDD_DEFS += VBOX_WITH_XHCI_IMPL
325 VBoxDD_SOURCES += \
326 USB/DevXHCI.cpp
327 endif
328
329 if defined(VBOX_WITH_USB_VIDEO_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
330 if1of ($(KBUILD_TARGET), linux)
331 VBoxDD_DEFS += VBOX_WITH_USB_VIDEO_IMPL
332 VBoxDD_SOURCES += \
333 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcam.cpp \
334 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcamDesc.cpp \
335 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/jpggen.cpp \
336 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/DrvHostWebcam.cpp \
337 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp
338 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp_INCS = \
339 $(PATH_ROOT)/src/libs/jpeg-8a
340 VBoxDD_SOURCES.linux += \
341 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/HostWebcam-v4l2.cpp
342 VBoxDD_LIBS += \
343 $(PATH_STAGE_LIB)/VBox-libjpeg$(VBOX_SUFF_LIB)
344 endif
345 endif
346
347 endif # VBOX_WITH_USB
348
349 ifdef VBOX_WITH_VUSB
350 VBoxDD_DEFS += VBOX_WITH_VUSB
351 VBoxDD_SOURCES += \
352 USB/DevOHCI.cpp \
353 USB/DrvVUSBRootHub.cpp \
354 USB/VUSBDevice.cpp \
355 USB/VUSBReadAhead.cpp \
356 USB/VUSBUrb.cpp \
357 USB/VUSBSniffer.cpp
358 endif
359
360 # --- Networking bits. ---
361
362 ifdef VBOX_WITH_INIP
363 VBoxDD_DEFS += VBOX_WITH_INIP
364 VBoxDD_SOURCES += \
365 Network/DevINIP.cpp
366 ifndef VBOX_WITH_NEW_LWIP
367 include $(PATH_SUB_CURRENT)/Network/lwip/Makefile.kmk
368 VBoxDD_INCS += $(LWIP_INCS)
369 VBoxDD_SOURCES += $(LWIP_SOURCES)
370 else
371 # XXX: do not depend on order
372 ifndef LWIP_SOURCES
373 include $(PATH_SUB_CURRENT)/Network/lwip-new/Makefile.kmk
374 endif
375 Network/DevINIP.cpp_DEFS += VBOX_WITH_NEW_LWIP
376 VBoxDD_LWIP_INCS += Network # for lwipopts.h
377 $(eval $(call def_vbox_lwip_private, \
378 VBoxDD, Network/lwip-new))
379 $(eval $(call def_vbox_lwip_flags, \
380 VBoxDD, Network/DevINIP.cpp, Network/lwip-new))
381 endif
382 endif # VBOX_WITH_INIP
383
384 ifdef VBOX_WITH_E1000
385 VBoxDD_DEFS += VBOX_WITH_E1000
386 VBoxDD_SOURCES += \
387 Network/DevE1000.cpp \
388 Network/DevE1000Phy.cpp \
389 Network/DevEEPROM.cpp
390 endif
391
392 ifdef VBOX_WITH_VIRTIO
393 VBoxDD_DEFS += VBOX_WITH_VIRTIO
394 VBoxDD_SOURCES += \
395 VirtIO/Virtio.cpp \
396 Network/DevVirtioNet.cpp
397 endif
398
399 ifdef VBOX_WITH_UDPTUNNEL
400 VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
401 VBoxDD_SOURCES += \
402 Network/DrvUDPTunnel.cpp
403 endif
404
405 ifdef VBOX_WITH_VDE
406 VBoxDD_DEFS += VBOX_WITH_VDE
407 VBoxDD_SOURCES += \
408 Network/DrvVDE.cpp \
409 Network/VDEPlug.cpp
410 endif
411
412 ifdef VBOX_WITH_NETSHAPER
413 VBoxDD_DEFS += VBOX_WITH_NETSHAPER
414 VBoxDD_SOURCES += \
415 Network/DrvNetShaper.cpp
416 endif
417
418 # --- Storage bits. ---
419
420 ifdef VBOX_WITH_AHCI
421 VBoxDD_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
422 VBoxDD_SOURCES += \
423 Storage/DevAHCI.cpp
424 endif
425
426 ifdef VBOX_WITH_BUSLOGIC
427 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
428 VBoxDD_SOURCES += \
429 Storage/DevBusLogic.cpp \
430 Storage/VBoxSCSI.cpp
431 endif
432
433 ifdef VBOX_WITH_LSILOGIC
434 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
435 VBoxDD_SOURCES += \
436 Storage/DevLsiLogicSCSI.cpp
437 endif
438
439 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
440 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
441 endif
442
443 ifdef VBOX_WITH_SCSI
444 VBoxDD_DEFS += VBOX_WITH_SCSI
445 VBoxDD_SOURCES += \
446 Storage/DrvSCSI.cpp
447 VBoxDD_SOURCES.linux += \
448 Storage/DrvSCSIHost.cpp
449 endif
450
451 ifdef VBOX_WITH_ISCSI
452 ifdef VBOX_WITH_NEW_LWIP
453 Storage/DrvVD.cpp_DEFS += VBOX_WITH_NEW_LWIP
454 $(eval $(call def_vbox_lwip_flags, \
455 VBoxDD, Storage/DrvVD.cpp, Network/lwip-new))
456 else
457 Storage/DrvVD.cpp_INCS = $(LWIP_INCS)
458 endif
459 endif
460
461 ifdef VBOX_WITH_DRV_DISK_INTEGRITY
462 VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
463 VBoxDD_SOURCES += \
464 Storage/DrvDiskIntegrity.cpp
465 VBoxDD_LIBS += \
466 $(PATH_STAGE_LIB)/StorageDbgLib$(VBOX_SUFF_LIB)
467 endif
468
469 ifdef VBOX_WITH_EFI
470 VBoxDD_DEFS += VBOX_WITH_EFI
471 VBoxDD_SOURCES += EFI/DevEFI.cpp
472 EFI/DevEFI.cpp_INCS += EFI/Firmware/BaseTools/Source/C/Include
473 EFI/DevEFI.cpp_INCS.x86 += EFI/Firmware/BaseTools/Source/C/Include/Ia32
474 EFI/DevEFI.cpp_INCS.amd64 += EFI/Firmware/BaseTools/Source/C/Include/X64
475 endif
476
477 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
478 VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
479 VBoxDD_SOURCES += \
480 Bus/DevPciRaw.cpp \
481 Bus/DrvPciRaw.cpp
482 endif
483
484 ifdef VBOX_WITH_MSI_DEVICES
485 VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
486 endif
487
488 ifdef VBOX_WITH_DYNAMIC_DSDT
489 VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
490 endif
491
492
493 # --- Input bits. ---
494
495 ifdef VBOX_WITH_NEW_PS2M
496 VBoxDD_DEFS += VBOX_WITH_NEW_PS2M
497 endif
498
499
500 # --- Audio bits. ---
501
502 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
503 VBoxDD_DEFS +=VBOX_WITH_PDM_AUDIO_DRIVER
504 endif
505 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
506 VBoxDD_SOURCES += Audio/DrvAudio.c \
507 Audio/DrvAudioUtil.c \
508 Audio/DrvHostNullAudio.c
509 else
510 VBoxDD_SOURCES += Audio/audio.c \
511 Audio/audiosniffer.c \
512 Audio/noaudio.c \
513 Audio/filteraudio.c
514 endif
515
516 ifdef VBOX_WITH_ALSA
517 VBoxDD_DEFS.linux += VBOX_WITH_ALSA
518 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
519 VBoxDD_DEFS.linux += VBOX_WITH_WITH_PDM_AUDIO_DRIVER
520 VBoxDD_SOURCES.linux += \
521 Audio/DrvHostAlsaAudio.c \
522 Audio/alsa_stubs.c
523 else
524 VBoxDD_SOURCES.linux += \
525 Audio/alsaaudio.c \
526 Audio/alsa_stubs.c
527 endif
528 endif
529
530 ifdef VBOX_WITH_PULSE
531 VBoxDD_DEFS.linux += VBOX_WITH_PULSE
532 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
533 VBoxDD_DEFS.linux += VBOX_WITH_PDM_AUDIO_DRIVER
534 VBoxDD_SOURCES.linux += \
535 Audio/DrvHostPulseAudio.c \
536 Audio/pulse_stubs.c
537 else
538 VBoxDD_SOURCES.linux += \
539 Audio/pulseaudio.c \
540 Audio/pulse_stubs.c
541 endif
542 VBoxDD_DEFS.freebsd += VBOX_WITH_PULSE
543 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
544 VBoxDD_SOURCES.freebsd+= \
545 Audio/DrvHostPulseAudio.c \
546 Audio/pulse_stubs.c
547 else
548 VBoxDD_SOURCES.freebsd+= \
549 Audio/pulseaudio.c \
550 Audio/pulse_stubs.c
551 endif
552 endif
553
554
555 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
556 VBOX_SLIRP_SOURCES = \
557 Network/DrvNAT.cpp \
558 Network/slirp/bootp.c \
559 Network/slirp/debug.c \
560 Network/slirp/ip_icmp.c \
561 Network/slirp/ip_input.c \
562 Network/slirp/ip_output.c \
563 Network/slirp/misc.c \
564 Network/slirp/sbuf.c \
565 Network/slirp/slirp.c \
566 Network/slirp/slirp_dns.c \
567 Network/slirp/socket.c \
568 Network/slirp/tcp_input.c \
569 Network/slirp/tcp_output.c \
570 Network/slirp/tcp_subr.c \
571 Network/slirp/tcp_timer.c \
572 Network/slirp/udp.c \
573 Network/slirp/dnsproxy/hash.c \
574 Network/slirp/tftp.c \
575 Network/slirp/dnsproxy/dnsproxy.c
576
577 ifneq ($(KBUILD_TARGET), win)
578 VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
579 endif
580
581 ifdef VBOX_WITH_SLIRP_BSD_SBUF
582 VBOX_SLIRP_SOURCES += Network/slirp/bsd/kern/subr_sbuf.c
583 endif
584 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
585 VBOX_SLIRP_BSD_SOURCES += \
586 Network/slirp/bsd/kern/kern_mbuf.c \
587 Network/slirp/bsd/kern/uipc_mbuf.c \
588 Network/slirp/bsd/kern/uipc_mbuf2.c \
589 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
590 VBOX_SLIRP_ALIAS_SOURCES = \
591 Network/slirp/libalias/alias.c \
592 Network/slirp/libalias/alias_db.c \
593 Network/slirp/libalias/alias_mod.c \
594 Network/slirp/libalias/alias_proxy.c \
595 Network/slirp/libalias/alias_ftp.c \
596 Network/slirp/libalias/alias_dns.c \
597 Network/slirp/libalias/alias_nbt.c \
598 Network/slirp/libalias/alias_util.c
599
600 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
601 # $(file)_DEFS or clean the code disabled with this definition.
602 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER=1
603
604 # dump memory related operations.
605 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
606
607 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
608 define def_vbox_slirp_cflags
609 $(file)_DEFS += \
610 $(if $(VBOX_WITH_SLIRP_BSD_SBUF),VBOX_WITH_SLIRP_BSD_SBUF,) \
611 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
612 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
613 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
614 $(if $(VBOX_WITH_NAT_UDP_SOCKET_CLONE),VBOX_WITH_NAT_UDP_SOCKET_CLONE,) \
615 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
616 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
617 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
618 $(file)_INCS += \
619 $(1)/slirp/bsd/sys \
620 $(1)/slirp/bsd/sys/sys \
621 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
622 $(1)/slirp/bsd/netinet \
623 $(1)/slirp \
624 $(1)/slirp/libalias
625 ifeq ($(KBUILD_TARGET),win)
626 $(file)_CFLAGS = -wd4018
627 else
628 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
629 endif
630 endef
631
632 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
633
634 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
635 define def_vbox_slirp_alias_cflags
636 $(file)_DEFS += VBOX_SLIRP_ALIAS \
637 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
638 $(file)_INCS += \
639 $(1)/slirp/libalias \
640 $(1)/slirp \
641 $(1)/slirp/dnsproxy
642 ifneq ($(KBUILD_TARGET),win)
643 $(file)_CFLAGS += -Wno-shadow
644 endif
645 endef
646 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
647 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
648
649 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
650 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
651 define def_vbox_slirp_bsd_cflags
652 $(file)_DEFS += VBOX_SLIRP_BSD
653 $(file)_INCS += $(1)/slirp/dnsproxy
654 endef
655 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
656 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
657
658
659 # --- OS specific driver hacks. ---
660
661 ifeq ($(KBUILD_TARGET),darwin)
662 VBoxDD_SOURCES := \
663 $(filter-out Storage/DrvHostRaw% Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
664 Audio/coreaudio.c
665 VBoxDD_SOURCES.darwin += \
666 Serial/DrvHostSerial.cpp
667 endif # darwin
668
669 ifeq ($(KBUILD_TARGET),freebsd)
670 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
671 VBoxDD_SOURCES := \
672 $(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
673 Audio/DrvHostOssAudio.c \
674 Serial/DrvHostSerial.cpp
675 VBoxDD_SOURCES.freebsd += \
676 Network/DrvTAP.cpp
677 else
678 VBoxDD_SOURCES := \
679 $(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
680 Audio/ossaudio.c \
681 Serial/DrvHostSerial.cpp
682 VBoxDD_SOURCES.freebsd += \
683 Network/DrvTAP.cpp
684 endif
685 endif # freebsd
686
687 VBoxDD_SOURCES.linux += \
688 Network/DrvTAP.cpp \
689 Parallel/DrvHostParallel.cpp \
690 Serial/DrvHostSerial.cpp
691
692 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
693 VBoxDD_SOURCES.linux += \
694 Audio/DrvHostOssAudio.c
695 else
696 VBoxDD_SOURCES.linux += \
697 Audio/ossaudio.c
698 endif
699
700 ifeq ($(KBUILD_TARGET),os2)
701 VBoxDD_SOURCES := $(filter-out Storage/DrvHost%, $(VBoxDD_SOURCES))
702 endif
703
704 ifeq ($(KBUILD_TARGET),solaris)
705 VBoxDD_SOURCES := $(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES))
706 VBoxDD_SOURCES.solaris += \
707 Serial/DrvHostSerial.cpp
708 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
709 VBoxDD_SOURCES.solaris += \
710 Audio/DrvHostSolAudio.c
711 else
712 VBoxDD_SOURCES.solaris += \
713 Audio/solaudio.c
714 endif
715 ifdef VBOX_WITH_SOLARIS_OSS
716 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
717 VBoxDD_SOURCES += Audio/DrvHostOssAudio.c
718 else
719 VBoxDD_SOURCES += Audio/ossaudio.c
720 endif
721 VBoxDD_DEFS += VBOX_WITH_SOLARIS_OSS
722 endif
723 ifdef VBOX_WITH_SUID_WRAPPER
724 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
725 endif
726 endif
727
728 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
729 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
730 VBoxDD_DEFS.win += VBOX_WITH_PDM_AUDIO_DRIVER
731 endif
732 VBoxDD_SOURCES.win += \
733 Serial/DrvHostSerial.cpp \
734 Parallel/DrvHostParallel.cpp
735
736 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
737 VBoxDD_SOURCES.win += \
738 Audio/DrvHostDSound.c
739 else
740 VBoxDD_SOURCES.win += \
741 Audio/dsoundaudio.c
742 endif
743
744 ifdef VBOX_WITH_VIRTUALKD
745 VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
746 VBoxDD_SOURCES.win += \
747 Misc/VirtualKD.cpp
748 endif
749
750 if defined(VBOX_WITH_NETFLT)
751 VBoxDD_DEFS += VBOX_WITH_NETFLT
752 if defined(VBOX_NETFLT_ONDEMAND_BIND)
753 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
754 endif
755 endif
756
757
758 # --- Final bits, mostly libraries for order dependant linkers. ---
759
760 VBoxDD_LIBS += \
761 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
762 $(LIB_VMM) \
763 $(LIB_RUNTIME)
764 ifeq ($(KBUILD_TARGET),win)
765 VBoxDD_LIBS += \
766 $(LIB_DDU) \
767 $(PATH_STAGE_LIB)/VBoxDD2.lib \
768 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
769 else
770 VBoxDD_LIBS += \
771 $(VBoxDDU_1_STAGE_TARGET) \
772 $(VBoxDD2_1_STAGE_TARGET)
773 endif
774
775 ifdef VBOX_WITH_NETFLT
776 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.lib
777 endif
778
779 ifeq ($(KBUILD_TARGET),solaris)
780 VBoxDD_LIBS += adm
781 ifdef VBOX_WITH_SUID_WRAPPER
782 VBoxDD_LIBS += secdb
783 endif
784 ifdef VBOX_WITH_USB
785 VBoxDD_LIBS += aio
786 endif
787 endif
788
789 VBoxDD_LIBS.darwin += \
790 $(LIB_REM)
791
792
793 ifdef VBOX_WITH_DYNAMIC_DSDT
794 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
795 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
796
797 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
798 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
799 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
800
801 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
802
803 else # !VBOX_WITH_DYNAMIC_DSDT
804 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
805 VBoxDD_CLEAN += \
806 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
807 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
808 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
809 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml \
810 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml.tmp \
811 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex \
812 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml \
813 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.tmp \
814 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.pre
815 PC/ACPI/VBoxAcpi.cpp_DEPS = \
816 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
817 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
818 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
819
820 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
821 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
822 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
823
824 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
825
826 $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
827 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
828 $(QUIET)$(RM) -f $@ $@.tmp
829 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
830 $(QUIET)$(MV) -f $@ $@.tmp
831 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtStandard/g" \
832 --output $@ $@.tmp
833 $(QUIET)$(RM) -f $@.tmp
834
835
836 vboxssdt-standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex
837
838 $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
839 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
840 $(QUIET)$(RM) -f $@ $@.tmp $@.pre
841 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o $@.pre $<
842 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $@.pre
843 $(QUIET)$(MV) -f $@ $@.tmp
844 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtCpuHotPlug/g" \
845 --output $@ $@.tmp
846 $(QUIET)$(RM) -f $@.tmp $@.pre
847
848
849 vboxssdt-cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
850
851 endif # !VBOX_WITH_DYNAMIC_DSDT
852 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
853
854 # For finding PCIInternal.h from VBox/pci.h.
855 Bus/DevPCI.cpp_INCS = Bus
856 Bus/DevPciIch9.cpp_INCS = Bus
857 Bus/MsiCommon.cpp_INCS = Bus
858 Bus/MsixCommon.cpp_INCS = Bus
859 Bus/DevPciRaw.cpp_INCS = Bus
860
861 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
862 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR)
863 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
864
865
866 ifdef VBOX_WITH_RAW_MODE
867 #
868 # VBoxDDGC (sysmod)
869 #
870 VBoxDDGC_TEMPLATE = VBoxRc
871 ifeq ($(KBUILD_TARGET_ARCH),x86)
872 VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
873 endif
874 VBoxDDGC_DEFS = $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
875 VBoxDDGC_INCS = build
876 VBoxDDGC_SOURCES = \
877 Audio/DevIchHda.cpp \
878 Bus/DevPCI.cpp \
879 Bus/DevPciIch9.cpp \
880 Bus/MsiCommon.cpp \
881 Bus/MsixCommon.cpp \
882 EFI/DevSmc.cpp \
883 Graphics/DevVGA.cpp \
884 Input/DevPS2.cpp \
885 Input/PS2K.cpp \
886 Input/PS2M.cpp \
887 PC/DevACPI.cpp \
888 PC/DevPit-i8254.cpp \
889 PC/DevPIC.cpp \
890 PC/DevRTC.cpp \
891 PC/DevHPET.cpp \
892 Storage/DevATA.cpp \
893 Network/DevPCNet.cpp \
894 Serial/DevSerial.cpp \
895 Parallel/DevParallel.cpp \
896 VMMDev/VMMDevTesting.cpp
897
898 ifdef VBOX_WITH_E1000
899 VBoxDDGC_DEFS += VBOX_WITH_E1000
900 VBoxDDGC_SOURCES += \
901 Network/DevE1000.cpp \
902 Network/DevE1000Phy.cpp
903 endif
904
905 ifdef VBOX_WITH_VIRTIO
906 VBoxDDGC_DEFS += VBOX_WITH_VIRTIO
907 VBoxDDGC_SOURCES += \
908 VirtIO/Virtio.cpp \
909 Network/DevVirtioNet.cpp
910 endif
911
912 ifdef VBOX_WITH_HGSMI
913 VBoxDDGC_DEFS += VBOX_WITH_HGSMI
914 endif
915 ifdef VBOX_WITH_WDDM
916 VBoxDDGC_DEFS += VBOX_WITH_WDDM
917 endif
918 ifdef VBOX_WITH_VDMA
919 VBoxDDGC_DEFS += VBOX_WITH_VDMA
920 endif
921 ifdef VBOX_WITH_CRHGSMI
922 VBoxDDGC_DEFS += VBOX_WITH_CRHGSMI
923 endif
924 ifdef VBOXWDDM_WITH_VBVA
925 VBoxDDGC_DEFS += VBOXWDDM_WITH_VBVA
926 endif
927 ifdef VBOX_WITH_VMSVGA
928 VBoxDDGC_DEFS += VBOX_WITH_VMSVGA
929 VBoxDDGC_SOURCES += \
930 Graphics/DevVGA-SVGA.cpp
931 endif
932 ifdef VBOX_WITH_VMSVGA3D
933 VBoxDDGC_DEFS += VBOX_WITH_VMSVGA3D
934 endif
935 ifdef VBOX_VDMA_WITH_WATCHDOG
936 VBoxDDGC_DEFS += VBOX_VDMA_WITH_WATCHDOG
937 endif
938
939 ifdef VBOX_WITH_VUSB
940 VBoxDDGC_DEFS += VBOX_WITH_VUSB
941 VBoxDDGC_SOURCES += \
942 USB/DevOHCI.cpp
943 endif
944
945 ifdef VBOX_WITH_USB
946 VBoxDDGC_DEFS += VBOX_WITH_USB
947 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
948 VBoxDDGC_DEFS += VBOX_WITH_EHCI_IMPL
949 VBoxDDGC_SOURCES += \
950 USB/DevEHCI.cpp
951 endif
952 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
953 VBoxDDGC_DEFS += VBOX_WITH_XHCI_IMPL
954 VBoxDDGC_SOURCES += \
955 USB/DevXHCI.cpp
956 endif
957 endif
958
959 ifdef VBOX_WITH_VIDEOHWACCEL
960 VBoxDDGC_DEFS += VBOX_WITH_VIDEOHWACCEL
961 endif
962
963 ifdef VBOX_WITH_AHCI
964 VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
965 VBoxDDGC_SOURCES += \
966 Storage/DevAHCI.cpp
967 endif
968
969 ifdef VBOX_WITH_BUSLOGIC
970 VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
971 VBoxDDGC_SOURCES += \
972 Storage/DevBusLogic.cpp
973 endif
974
975 ifdef VBOX_WITH_LSILOGIC
976 VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
977 VBoxDDGC_SOURCES += \
978 Storage/DevLsiLogicSCSI.cpp
979 endif
980
981 ifdef VBOX_WITH_NEW_PS2M
982 VBoxDDGC_DEFS += VBOX_WITH_NEW_PS2M
983 endif
984
985 if1of ($(VBOX_LDR_FMT32), pe lx)
986 VBoxDDGC_LIBS = \
987 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
988 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
989 endif
990 endif # VBOX_WITH_RAW_MODE
991
992
993 #
994 # VBoxDD2 (shared object)
995 #
996 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
997 VBoxDD2_DEFS = IN_VBOXDD2
998 VBoxDD2_INCS := \
999 build \
1000 $(PATH_SUB_CURRENT)
1001 VBoxDD2_SOURCES = \
1002 build/VBoxDD2.cpp \
1003 PC/DevAPIC.cpp \
1004 PC/DevIoApic.cpp \
1005 PC/DevLPC.cpp
1006 VBoxDD2_LIBS = \
1007 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1008 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1009 $(if $(VBOX_WITH_PXE_ROM),\
1010 $(if $(VBOX_WITH_INTEL_PXE),\
1011 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB),\
1012 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1013 $(LIB_VMM) \
1014 $(LIB_RUNTIME)
1015 VBoxDD2_LIBS.darwin += $(LIB_REM)
1016 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1017 VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
1018
1019 ifdef VBOX_WITH_PXE_ROM
1020 VBoxDD2_DEFS += VBOX_WITH_PXE_ROM
1021 endif
1022
1023
1024 #
1025 # VBoxDDR0 (sysmod)
1026 #
1027 VBoxDDR0_TEMPLATE = VBoxR0
1028 VBoxDDR0_DEFS.darwin.x86= VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
1029 VBoxDDR0_DEFS = IN_RT_R0 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) # - WTF is IN_RT_R0 doing here?
1030 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1031 VBoxDDR0_INCS = build
1032 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1033 VBoxDDR0_SOURCES = \
1034 build/VBoxDDR0.cpp \
1035 Audio/DevIchHda.cpp \
1036 Bus/DevPCI.cpp \
1037 Bus/DevPciIch9.cpp \
1038 Bus/MsiCommon.cpp \
1039 Bus/MsixCommon.cpp \
1040 EFI/DevSmc.cpp \
1041 Graphics/DevVGA.cpp \
1042 Input/DevPS2.cpp \
1043 Input/PS2K.cpp \
1044 Input/PS2M.cpp \
1045 PC/DevACPI.cpp \
1046 PC/DevPit-i8254.cpp \
1047 PC/DevPIC.cpp \
1048 PC/DevRTC.cpp \
1049 PC/DevHPET.cpp \
1050 Storage/DevATA.cpp \
1051 Network/DevPCNet.cpp \
1052 Serial/DevSerial.cpp \
1053 Parallel/DevParallel.cpp \
1054 VMMDev/VMMDevTesting.cpp \
1055 \
1056 Network/DrvIntNet.cpp \
1057 Network/DrvDedicatedNic.cpp
1058
1059 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1060
1061 ifdef VBOX_WITH_E1000
1062 VBoxDDR0_DEFS += VBOX_WITH_E1000
1063 VBoxDDR0_SOURCES += \
1064 Network/DevE1000.cpp \
1065 Network/DevE1000Phy.cpp
1066 endif
1067
1068 ifdef VBOX_WITH_VIRTIO
1069 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1070 VBoxDDR0_SOURCES += \
1071 VirtIO/Virtio.cpp \
1072 Network/DevVirtioNet.cpp
1073 endif
1074
1075 ifdef VBOX_WITH_NETSHAPER
1076 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1077 VBoxDDR0_SOURCES += \
1078 Network/DrvNetShaper.cpp
1079 endif
1080
1081 ifdef VBOX_WITH_VMSVGA
1082 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1083 VBoxDDR0_SOURCES += \
1084 Graphics/DevVGA-SVGA.cpp
1085 endif
1086 ifdef VBOX_WITH_VMSVGA3D
1087 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1088 endif
1089
1090 ifdef VBOX_WITH_HGSMI
1091 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1092 endif
1093 ifdef VBOX_WITH_WDDM
1094 VBoxDDR0_DEFS += VBOX_WITH_WDDM
1095 endif
1096 ifdef VBOX_WITH_VDMA
1097 VBoxDDR0_DEFS += VBOX_WITH_VDMA
1098 endif
1099 ifdef VBOX_WITH_CRHGSMI
1100 VBoxDDR0_DEFS += VBOX_WITH_CRHGSMI
1101 endif
1102 ifdef VBOXWDDM_WITH_VBVA
1103 VBoxDDR0_DEFS += VBOXWDDM_WITH_VBVA
1104 endif
1105 ifdef VBOX_VDMA_WITH_WATCHDOG
1106 VBoxDDR0_DEFS += VBOX_VDMA_WITH_WATCHDOG
1107 endif
1108
1109 ifdef VBOX_WITH_VUSB
1110 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1111 VBoxDDR0_SOURCES += \
1112 USB/DevOHCI.cpp
1113 endif
1114 ifdef VBOX_WITH_USB
1115 VBoxDDR0_DEFS += VBOX_WITH_USB
1116 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1117 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1118 VBoxDDR0_SOURCES += \
1119 USB/DevEHCI.cpp
1120 endif
1121 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1122 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1123 VBoxDDR0_SOURCES += \
1124 USB/DevXHCI.cpp
1125 endif
1126 endif
1127
1128 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1129 VBoxDDR0_SOURCES += \
1130 Bus/DevPciRaw.cpp
1131 endif
1132
1133 ifdef VBOX_WITH_AHCI
1134 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1135 VBoxDDR0_SOURCES += \
1136 Storage/DevAHCI.cpp
1137 endif
1138
1139 ifdef VBOX_WITH_BUSLOGIC
1140 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1141 VBoxDDR0_SOURCES += \
1142 Storage/DevBusLogic.cpp
1143 endif
1144
1145 ifdef VBOX_WITH_LSILOGIC
1146 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1147 VBoxDDR0_SOURCES += \
1148 Storage/DevLsiLogicSCSI.cpp
1149 endif
1150
1151 ifdef VBOX_WITH_NEW_PS2M
1152 VBoxDDR0_DEFS += VBOX_WITH_NEW_PS2M
1153 endif
1154
1155 ifdef VBOX_WITH_HGSMI
1156 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1157 endif
1158 ifdef VBOX_WITH_VIDEOHWACCEL
1159 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1160 endif
1161
1162 if1of ($(VBOX_LDR_FMT), pe lx)
1163 VBoxDDR0_LIBS = \
1164 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1165 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1166 endif
1167
1168
1169 ifdef VBOX_WITH_RAW_MODE
1170 #
1171 # VBoxDD2GC (LGPL sysmod)
1172 #
1173 VBoxDD2GC_TEMPLATE = VBoxRc
1174 VBoxDD2GC_INCS = build
1175 VBoxDD2GC_SOURCES = \
1176 PC/DevAPIC.cpp \
1177 PC/DevIoApic.cpp
1178 if1of ($(VBOX_LDR_FMT32), pe lx)
1179 VBoxDD2GC_LIBS = \
1180 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1181 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1182 endif
1183 endif
1184
1185
1186 #
1187 # VBoxDD2R0 (LGPL sysmod)
1188 #
1189 VBoxDD2R0_TEMPLATE = VBoxR0
1190 VBoxDD2R0_DEFS = IN_RT_R0
1191 VBoxDD2R0_INCS = build
1192 VBoxDD2R0_SOURCES = \
1193 build/VBoxDD2R0.cpp \
1194 PC/DevAPIC.cpp \
1195 PC/DevIoApic.cpp \
1196
1197 if1of ($(VBOX_LDR_FMT), pe lx)
1198 VBoxDD2R0_LIBS = \
1199 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1200 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1201 endif
1202
1203
1204 #
1205 # Ring-0 Services (library, linked into VMMR0.r0)
1206 #
1207 ServicesR0_TEMPLATE = VBoxR0
1208 ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0 \
1209 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1210 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1211 ServicesR0_SOURCES = \
1212 Network/SrvIntNetR0.cpp \
1213 $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1214 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1215
1216
1217 #
1218 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1219 #
1220 ifdef VBOX_WITH_TESTCASES
1221 PROGRAMS += tstIntNetR0
1222 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
1223 tstIntNetR0_DEFS = IN_INTNET_R0
1224 tstIntNetR0_SOURCES = \
1225 Network/testcase/tstIntNetR0.cpp
1226 ifneq ($(KBUILD_TARGET),win)
1227 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1228 endif
1229 endif
1230
1231
1232 #
1233 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1234 #
1235 ifdef VBOX_WITH_TESTCASES
1236 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1237 PROGRAMS += tstIntNetHardened-1
1238 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1239 tstIntNetHardened-1_NAME = tstIntNet-1
1240 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1241 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
1242
1243 DLLS += tstIntNet-1
1244 tstIntNet-1_TEMPLATE = VBoxR3TstDll
1245 else
1246 PROGRAMS += tstIntNet-1
1247 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
1248 endif
1249 tstIntNet-1_SOURCES = \
1250 Network/testcase/tstIntNet-1.cpp \
1251 Network/Pcap.cpp
1252 endif
1253
1254
1255 #
1256 # EEPROM device unit test requires cppunit
1257 #
1258 ifdef VBOX_WITH_CPPUNIT_TESTCASES
1259 ifdef VBOX_WITH_E1000
1260 PROGRAMS += tstDevEEPROM
1261 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1262 tstDevEEPROM_SOURCES = \
1263 Network/testcase/tstDevEEPROM.cpp
1264 tstDevEEPROM_LIBS = \
1265 $(TARGET_VBoxDD)
1266 PROGRAMS += tstDevPhy
1267 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1268 tstDevPhy_SOURCES = \
1269 Network/testcase/tstDevPhy.cpp \
1270 Network/DevE1000Phy.cpp
1271 tstDevPhy_DEFS = PHY_UNIT_TEST
1272 endif
1273 endif
1274
1275 #
1276 # Apple SMC Utility.
1277 #
1278 ifdef VBOX_WITH_TESTCASES
1279 PROGRAMS.darwin += VBoxSmcUtil-darwin
1280 VBoxSmcUtil-darwin_TEMPLATE = VBOXR3TSTEXE
1281 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1282 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1283 endif
1284
1285endif # !VBOX_ONLY_EXTPACKS
1286
1287
1288if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
1289 #
1290 # The EHCI (USB 2.0) Extension Pack Modules.
1291 #
1292 if defined(VBOX_WITH_USB)
1293 DLLS += VBoxEhciR3
1294 VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
1295 VBoxEhciR3_SOURCES = \
1296 USB/DevEHCI.cpp \
1297 USB/DevXHCI.cpp
1298
1299 SYSMODS += VBoxEhciR0
1300 VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
1301 VBoxEhciR0_SOURCES = \
1302 USB/DevEHCI.cpp \
1303 USB/DevXHCI.cpp
1304
1305 ifdef VBOX_WITH_RAW_MODE
1306 SYSMODS += VBoxEhciRC
1307 VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
1308 VBoxEhciRC_SOURCES = \
1309 USB/DevEHCI.cpp \
1310 USB/DevXHCI.cpp
1311 endif
1312
1313 # Hacky but MSI support *must* be enabled
1314 ifdef VBOX_WITH_MSI_DEVICES
1315 VBoxEhciR3_DEFS += VBOX_WITH_MSI_DEVICES
1316 VBoxEhciR0_DEFS += VBOX_WITH_MSI_DEVICES
1317 VBoxEhciRC_DEFS += VBOX_WITH_MSI_DEVICES
1318 endif
1319
1320 endif
1321
1322 if defined(VBOX_WITH_PCI_PASSTHROUGH)
1323 DLLS += VBoxPciRawR3
1324 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1325 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1326
1327 DLLS += VBoxPciRawDrv
1328 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1329 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1330
1331 SYSMODS += VBoxPciRawR0
1332 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1333 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1334
1335 Bus/DevPciRaw.cpp_INCS = Bus
1336 endif
1337
1338
1339 #
1340 # The Intel PXE rom.
1341 #
1342 INSTALLS += VBoxExtPackPuelInsRoms
1343 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1344 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1345endif # VBOX_WITH_EXTPACK_PUEL
1346
1347include $(FILE_KBUILD_SUB_FOOTER)
1348
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