VirtualBox

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

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

USB: Initial xHCI device commit (WIP).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 36.7 KB
Line 
1# $Id: Makefile.kmk 52249 2014-07-31 19:40:11Z vboxsync $
2## @file
3# Top-level sub-makefile for the devices, drivers and services.
4#
5
6#
7# Copyright (C) 2006-2013 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# Enable the new SMC code.
22VBOX_WITH_SMC_NEW = 1
23
24# Make sure our Config.kmk is included.
25ifndef VBOX_DEVICES_CONFIG_KMK_INCLUDED
26 include $(PATH_SUB_CURRENT)/Config.kmk
27endif
28
29# Include sub-makefiles.
30include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
31include $(PATH_SUB_CURRENT)/Input/testcase/Makefile.kmk
32if defined(VBOX_WITH_INTEL_PXE) || defined(VBOX_ONLY_EXTPACKS)
33 include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
34else if defined(VBOX_WITH_PXE_ROM)
35 if !defined(VBOX_WITHOUT_IPXE)
36 include $(PATH_SUB_CURRENT)/PC/ipxe/Makefile.kmk
37 endif
38endif
39if !defined(VBOX_ONLY_EXTPACKS) # Goes on almost to the end of the file.
40 include $(PATH_SUB_CURRENT)/BiosCommonCode/Makefile.kmk
41 include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
42 include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
43
44 #
45 # Main targets.
46 #
47 LIBRARIES += ServicesR0
48 DLLS += VBoxDDU VBoxDD VBoxDD2
49 SYSMODS += VBoxDDR0 VBoxDD2R0
50 ifdef VBOX_WITH_RAW_MODE
51 SYSMODS += VBoxDDGC VBoxDD2GC
52 endif
53
54
55 #
56 # VBoxDDU (shared object)
57 #
58 VBoxDDU_TEMPLATE = VBoxR3DllWarnNoPic
59 VBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
60 VBoxDDU_INST.darwin = $(INST_DLL) $(INST_TESTCASE)
61 VBoxDDU_DEFS = IN_VBOXDDU
62 ifdef VBOX_WITH_VUSB
63 VBoxDDU_DEFS += VBOX_WITH_VUSB
64 endif
65 ifdef VBOX_WITH_USB
66 VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
67 VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
68 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
69 VBoxDDU_DEFS += VBOX_WITH_EHCI_IMPL
70 endif
71 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
72 VBoxDDU_DEFS += VBOX_WITH_XHCI_IMPL
73 endif
74 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
75 VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
76 endif
77 else
78 VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK)
79 endif
80 VBoxDDU_SOURCES = \
81 Storage/VSCSI/VSCSIDevice.cpp \
82 Storage/VSCSI/VSCSILun.cpp \
83 Storage/VSCSI/VSCSILunSbc.cpp \
84 Storage/VSCSI/VSCSILunMmc.cpp \
85 Storage/VSCSI/VSCSISense.cpp \
86 Storage/VSCSI/VSCSIIoReq.cpp \
87 Storage/VSCSI/VSCSIVpdPagePool.cpp \
88 build/VBoxDDUDeps.cpp
89 ifdef VBOX_WITH_USB
90 VBoxDDU_INCS.os2 += \
91 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
92 endif
93 VBoxDDU_LIBS = \
94 $(LIB_RUNTIME) \
95 $(PATH_STAGE_LIB)/StorageLib$(VBOX_SUFF_LIB)
96 ifdef VBOX_WITH_USB
97 VBoxDDU_LIBS += \
98 $(PATH_STAGE_LIB)/USBLib$(VBOX_SUFF_LIB)
99 VBoxDDU_LIBS.win += \
100 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
101 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib
102 endif
103 VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
104 ifdef VBOX_WITH_USB
105 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
106 VBoxDDU_LDFLAGS.darwin += -framework IOKit
107 endif
108 endif
109
110 VBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
111
112 #
113 # VBoxDD (shared object)
114 #
115 VBoxDD_TEMPLATE = VBoxR3DllWarnNoPic
116 VBoxDD_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
117 Storage/DrvHostDVD.cpp_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK)
118 VBoxDD_INCS = \
119 build \
120 Network/slirp
121 VBoxDD_DEFS = \
122 VBOX_ACPI \
123 VBOX_HGCM_HOST_CODE \
124 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
125 $(if $(VBOX_BIOS_DMI_FALLBACK),VBOX_BIOS_DMI_FALLBACK,) \
126 VBOX_WITH_DMI_CHASSIS \
127 VBOX_WITH_DMI_OEMSTRINGS \
128 $(if $(VBOX_WITH_SMC_NEW),VBOX_WITH_SMC_NEW,)
129 VBoxDD_DEFS.win = _WIN32_WINNT=0x0510
130 ifeq ($(KBUILD_TARGET_ARCH),x86)
131 VBoxDD_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
132 endif
133 VBoxDD_SOURCES = \
134 build/VBoxDD.cpp \
135 \
136 Input/DevPS2.cpp \
137 Input/PS2K.cpp \
138 Input/PS2M.cpp \
139 Input/UsbKbd.cpp \
140 Input/UsbMouse.cpp \
141 Bus/DevPCI.cpp \
142 Bus/DevPciIch9.cpp \
143 Bus/MsiCommon.cpp \
144 Bus/MsixCommon.cpp \
145 $(if $(VBOX_WITH_SMC_NEW),EFI/DevSmc.cpp,) \
146 Graphics/DevVGA.cpp \
147 Storage/DevATA.cpp \
148 PC/DevPit-i8254.cpp \
149 PC/DevPIC.cpp \
150 PC/DevACPI.cpp \
151 PC/ACPI/VBoxAcpi.cpp \
152 PC/DevRTC.cpp \
153 PC/DevPcBios.cpp \
154 PC/DevFwCommon.cpp \
155 PC/DevPcArch.cpp \
156 GIMDev/GIMDev.cpp \
157 VMMDev/VMMDev.cpp \
158 $(if $(VBOX_WITH_HGCM),VMMDev/VMMDevHGCM.cpp,) \
159 VMMDev/VMMDevTesting.cpp \
160 Network/DevPCNet.cpp \
161 Audio/DevIchAc97.cpp \
162 Audio/DevSB16.cpp \
163 Audio/DevIchHda.cpp \
164 Audio/DevIchHdaCodec.cpp \
165 PC/DevDMA.cpp \
166 PC/DevHPET.cpp \
167 Storage/DevFdc.cpp \
168 Serial/DevSerial.cpp \
169 Parallel/DevParallel.cpp \
170 \
171 Audio/mixeng.c \
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/DrvRawFile.cpp \
181 Storage/DrvBlock.cpp \
182 Storage/DrvHostBase.cpp \
183 Storage/DrvHostDVD.cpp \
184 Storage/DrvHostFloppy.cpp \
185 Storage/DrvMediaISO.cpp \
186 Storage/DrvRawImage.cpp \
187 Storage/Debug.cpp \
188 Storage/DrvVD.cpp \
189 Storage/ATAPIPassthrough.cpp \
190 Network/DrvNetSniffer.cpp \
191 Network/Pcap.cpp
192 VBoxDD_LIBS = # more later.
193 VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \
194 -framework CoreAudio \
195 -framework AudioUnit \
196 -framework AudioToolbox \
197 -framework IOKit \
198 -framework Carbon \
199 -framework DiskArbitration \
200 -framework SystemConfiguration
201 VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
202
203 # --- Tracing bits. ---
204
205 ifdef VBOX_WITH_DTRACE_R3
206 VBoxDD_DEFS += VBOX_WITH_DTRACE
207 VBoxDD_USES += dtrace
208 VBoxDD_SOURCES += build/VBoxDD.d
209 endif
210
211 # --- Graphics bits. ---
212
213 ifdef VBOX_WITH_CRHGSMI
214 VBoxDD_DEFS += VBOX_WITH_CRHGSMI
215 endif
216 ifdef VBOXWDDM_TEST_UHGSMI
217 VBoxDD_DEFS += VBOXWDDM_TEST_UHGSMI
218 endif
219 ifdef VBOXWDDM_WITH_VBVA
220 VBoxDD_DEFS += VBOXWDDM_WITH_VBVA
221 endif
222 ifdef VBOX_WITH_VIDEOHWACCEL
223 VBoxDD_DEFS += VBOX_WITH_VIDEOHWACCEL
224 endif
225
226 ifdef VBOX_WITH_HGSMI
227 VBoxDD_DEFS += VBOX_WITH_HGSMI
228 VBoxDD_SOURCES += \
229 Graphics/DevVGA_VBVA.cpp \
230 Graphics/HGSMI/HGSMIHost.cpp
231 VBoxDD_LIBS += \
232 $(PATH_STAGE_LIB)/HGSMIHostR3Lib$(VBOX_SUFF_LIB)
233 endif
234
235 ifdef VBOX_WITH_WDDM
236 VBoxDD_DEFS += VBOX_WITH_WDDM
237 VBoxDD_SOURCES += \
238 Graphics/HGSMI/SHGSMIHost.cpp
239 endif
240
241 ifdef VBOX_WITH_VMSVGA
242 VBoxDD_DEFS += VBOX_WITH_VMSVGA
243 VBoxDD_SOURCES += Graphics/DevVGA-SVGA.cpp
244 endif
245 ifdef VBOX_WITH_VMSVGA3D
246 VBoxDD_DEFS += VBOX_WITH_VMSVGA3D
247 VBoxDD_SOURCES += Graphics/DevVGA-SVGA3d-shared.cpp
248 ifeq ($(KBUILD_TARGET),win)
249 VBoxDD_SOURCES += Graphics/DevVGA-SVGA3d-win.cpp
250 else
251 VBoxDD_SOURCES += Graphics/DevVGA-SVGA3d-ogl.cpp
252 VBoxDD_LIBS += $(PATH_STAGE_BIN)/vmsvgashader$(VBOX_SUFF_DLL)
253 endif
254 VBoxDD_LIBS.win += d3d9.lib
255 VBoxDD_LIBS.linux += GL X11
256 endif
257
258 ifdef VBOX_WITH_VDMA
259 VBoxDD_DEFS += VBOX_WITH_VDMA
260 VBoxDD_SOURCES += \
261 Graphics/DevVGA_VDMA.cpp
262 endif
263
264 ifdef VBOX_VDMA_WITH_WATCHDOG
265 VBoxDD_DEFS += VBOX_VDMA_WITH_WATCHDOG
266 endif
267
268 ifdef VBOX_WITH_PXE_ROM
269 VBoxDD_DEFS += VBOX_WITH_PXE_ROM
270 endif
271
272 # --- USB bits. ---
273
274 ifdef VBOX_WITH_USB
275 VBoxDD_DEFS += VBOX_WITH_USB
276 VBoxDD_SOURCES += \
277 USB/vrdp/USBProxyDevice-vrdp.cpp
278
279 VBoxDD_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
280 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
281 VBoxDD_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
282 endif
283 VBoxDD_SOURCES.darwin += \
284 USB/USBProxyDevice.cpp \
285 USB/darwin/USBProxyDevice-darwin.cpp
286
287 VBoxDD_DEFS.linux += \
288 VUSB_HAVE_USBPROXY_DEVICE \
289 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
290 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
291 VBoxDD_SOURCES.linux += \
292 USB/USBProxyDevice.cpp \
293 USB/linux/USBProxyDevice-linux.cpp
294
295 VBoxDD_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
296 VBoxDD_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
297 VBoxDD_SOURCES.os2 += \
298 USB/USBProxyDevice.cpp \
299 USB/os2/USBProxyDevice-os2.cpp
300
301 VBoxDD_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
302 VBoxDD_SOURCES.win += \
303 USB/USBProxyDevice.cpp \
304 USB/win/USBProxyDevice-win.cpp
305
306 VBoxDD_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
307 VBoxDD_SOURCES.solaris+= \
308 USB/USBProxyDevice.cpp \
309 USB/solaris/USBProxyDevice-solaris.cpp
310
311 VBoxDD_DEFS.freebsd += VUSB_HAVE_USBPROXY_DEVICE
312 VBoxDD_SOURCES.freebsd+= \
313 USB/USBProxyDevice.cpp \
314 USB/freebsd/USBProxyDevice-freebsd.cpp
315
316 ifdef VBOX_WITH_SCSI
317 VBoxDD_SOURCES += \
318 Storage/UsbMsd.cpp
319 endif
320
321 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
322 VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
323 VBoxDD_SOURCES += \
324 USB/DevEHCI.cpp
325 endif
326
327 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
328 VBoxDD_DEFS += VBOX_WITH_XHCI_IMPL
329 VBoxDD_SOURCES += \
330 USB/DevXHCI.cpp
331 endif
332
333 if defined(VBOX_WITH_USB_VIDEO_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
334 if1of ($(KBUILD_TARGET), linux)
335 VBoxDD_DEFS += VBOX_WITH_USB_VIDEO_IMPL
336 VBoxDD_SOURCES += \
337 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcam.cpp \
338 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcamDesc.cpp \
339 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/jpggen.cpp \
340 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/DrvHostWebcam.cpp \
341 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp
342 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp_INCS = \
343 $(PATH_ROOT)/src/libs/jpeg-8a
344 VBoxDD_SOURCES.linux += \
345 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/HostWebcam-v4l2.cpp
346 VBoxDD_LIBS += \
347 $(PATH_STAGE_LIB)/VBox-libjpeg$(VBOX_SUFF_LIB)
348 endif
349 endif
350
351 endif # VBOX_WITH_USB
352
353 ifdef VBOX_WITH_VUSB
354 VBoxDD_DEFS += VBOX_WITH_VUSB
355 VBoxDD_SOURCES += \
356 USB/DevOHCI.cpp \
357 USB/DrvVUSBRootHub.cpp \
358 USB/VUSBDevice.cpp \
359 USB/VUSBReadAhead.cpp \
360 USB/VUSBUrb.cpp
361 endif
362
363 # --- Networking bits. ---
364
365 ifdef VBOX_WITH_INIP
366 VBoxDD_DEFS += VBOX_WITH_INIP
367 VBoxDD_SOURCES += \
368 Network/DevINIP.cpp
369 ifndef VBOX_WITH_NEW_LWIP
370 include $(PATH_SUB_CURRENT)/Network/lwip/Makefile.kmk
371 VBoxDD_INCS += $(LWIP_INCS)
372 VBoxDD_SOURCES += $(LWIP_SOURCES)
373 else
374 # XXX: do not depend on order
375 ifndef LWIP_SOURCES
376 include $(PATH_SUB_CURRENT)/Network/lwip-new/Makefile.kmk
377 endif
378 Network/DevINIP.cpp_DEFS += VBOX_WITH_NEW_LWIP
379 VBoxDD_LWIP_INCS += Network # for lwipopts.h
380 $(eval $(call def_vbox_lwip_private, \
381 VBoxDD, Network/lwip-new))
382 $(eval $(call def_vbox_lwip_flags, \
383 VBoxDD, Network/DevINIP.cpp, Network/lwip-new))
384 endif
385 endif # VBOX_WITH_INIP
386
387 ifdef VBOX_WITH_E1000
388 VBoxDD_DEFS += VBOX_WITH_E1000
389 VBoxDD_SOURCES += \
390 Network/DevE1000.cpp \
391 Network/DevE1000Phy.cpp \
392 Network/DevEEPROM.cpp
393 endif
394
395 ifdef VBOX_WITH_VIRTIO
396 VBoxDD_DEFS += VBOX_WITH_VIRTIO
397 VBoxDD_SOURCES += \
398 VirtIO/Virtio.cpp \
399 Network/DevVirtioNet.cpp
400 endif
401
402 ifdef VBOX_WITH_UDPTUNNEL
403 VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
404 VBoxDD_SOURCES += \
405 Network/DrvUDPTunnel.cpp
406 endif
407
408 ifdef VBOX_WITH_VDE
409 VBoxDD_DEFS += VBOX_WITH_VDE
410 VBoxDD_SOURCES += \
411 Network/DrvVDE.cpp \
412 Network/VDEPlug.cpp
413 endif
414
415 ifdef VBOX_WITH_NETSHAPER
416 VBoxDD_DEFS += VBOX_WITH_NETSHAPER
417 VBoxDD_SOURCES += \
418 Network/DrvNetShaper.cpp
419 endif
420
421 # --- Storage bits. ---
422
423 ifdef VBOX_WITH_AHCI
424 VBoxDD_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
425 VBoxDD_SOURCES += \
426 Storage/DevAHCI.cpp
427 endif
428
429 ifdef VBOX_WITH_BUSLOGIC
430 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
431 VBoxDD_SOURCES += \
432 Storage/DevBusLogic.cpp \
433 Storage/VBoxSCSI.cpp
434 endif
435
436 ifdef VBOX_WITH_LSILOGIC
437 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
438 VBoxDD_SOURCES += \
439 Storage/DevLsiLogicSCSI.cpp
440 endif
441
442 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
443 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
444 endif
445
446 ifdef VBOX_WITH_SCSI
447 VBoxDD_DEFS += VBOX_WITH_SCSI
448 VBoxDD_SOURCES += \
449 Storage/DrvSCSI.cpp
450 VBoxDD_SOURCES.linux += \
451 Storage/DrvSCSIHost.cpp
452 endif
453
454 ifdef VBOX_WITH_ISCSI
455 ifdef VBOX_WITH_NEW_LWIP
456 Storage/DrvVD.cpp_DEFS += VBOX_WITH_NEW_LWIP
457 $(eval $(call def_vbox_lwip_flags, \
458 VBoxDD, Storage/DrvVD.cpp, Network/lwip-new))
459 else
460 Storage/DrvVD.cpp_INCS = $(LWIP_INCS)
461 endif
462 endif
463
464 ifdef VBOX_WITH_DRV_DISK_INTEGRITY
465 VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
466 VBoxDD_SOURCES += \
467 Storage/DrvDiskIntegrity.cpp
468 VBoxDD_LIBS += \
469 $(PATH_STAGE_LIB)/StorageDbgLib$(VBOX_SUFF_LIB)
470 endif
471
472 ifdef VBOX_WITH_EFI
473 VBoxDD_DEFS += VBOX_WITH_EFI
474 VBoxDD_SOURCES += EFI/DevEFI.cpp
475 EFI/DevEFI.cpp_INCS += EFI/Firmware/BaseTools/Source/C/Include
476 EFI/DevEFI.cpp_INCS.x86 += EFI/Firmware/BaseTools/Source/C/Include/Ia32
477 EFI/DevEFI.cpp_INCS.amd64 += EFI/Firmware/BaseTools/Source/C/Include/X64
478 endif
479
480 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
481 VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
482 VBoxDD_SOURCES += \
483 Bus/DevPciRaw.cpp \
484 Bus/DrvPciRaw.cpp
485 endif
486
487 ifdef VBOX_WITH_MSI_DEVICES
488 VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
489 endif
490
491 ifdef VBOX_WITH_DYNAMIC_DSDT
492 VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
493 endif
494
495
496 # --- Input bits. ---
497
498 ifdef VBOX_WITH_NEW_PS2M
499 VBoxDD_DEFS += VBOX_WITH_NEW_PS2M
500 endif
501
502
503 # --- Audio bits. ---
504
505 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
506 VBoxDD_DEFS +=VBOX_WITH_PDM_AUDIO_DRIVER
507 endif
508 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
509 VBoxDD_SOURCES += Audio/DrvAudio.c \
510 Audio/DrvAudioUtil.c \
511 Audio/DrvHostNullAudio.c
512 else
513 VBoxDD_SOURCES += Audio/audio.c \
514 Audio/audiosniffer.c \
515 Audio/noaudio.c \
516 Audio/filteraudio.c
517 endif
518
519 ifdef VBOX_WITH_ALSA
520 VBoxDD_DEFS.linux += VBOX_WITH_ALSA
521 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
522 VBoxDD_DEFS.linux += VBOX_WITH_WITH_PDM_AUDIO_DRIVER
523 VBoxDD_SOURCES.linux += \
524 Audio/DrvHostAlsaAudio.c \
525 Audio/alsa_stubs.c
526 else
527 VBoxDD_SOURCES.linux += \
528 Audio/alsaaudio.c \
529 Audio/alsa_stubs.c
530 endif
531 endif
532
533 ifdef VBOX_WITH_PULSE
534 VBoxDD_DEFS.linux += VBOX_WITH_PULSE
535 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
536 VBoxDD_DEFS.linux += VBOX_WITH_PDM_AUDIO_DRIVER
537 VBoxDD_SOURCES.linux += \
538 Audio/DrvHostPulseAudio.c \
539 Audio/pulse_stubs.c
540 else
541 VBoxDD_SOURCES.linux += \
542 Audio/pulseaudio.c \
543 Audio/pulse_stubs.c
544 endif
545 VBoxDD_DEFS.freebsd += VBOX_WITH_PULSE
546 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
547 VBoxDD_SOURCES.freebsd+= \
548 Audio/DrvHostPulseAudio.c \
549 Audio/pulse_stubs.c
550 else
551 VBoxDD_SOURCES.freebsd+= \
552 Audio/pulseaudio.c \
553 Audio/pulse_stubs.c
554 endif
555 endif
556
557
558 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
559 VBOX_SLIRP_SOURCES = \
560 Network/DrvNAT.cpp \
561 Network/slirp/bootp.c \
562 Network/slirp/debug.c \
563 Network/slirp/ip_icmp.c \
564 Network/slirp/ip_input.c \
565 Network/slirp/ip_output.c \
566 Network/slirp/misc.c \
567 Network/slirp/sbuf.c \
568 Network/slirp/slirp.c \
569 Network/slirp/slirp_dns.c \
570 Network/slirp/socket.c \
571 Network/slirp/tcp_input.c \
572 Network/slirp/tcp_output.c \
573 Network/slirp/tcp_subr.c \
574 Network/slirp/tcp_timer.c \
575 Network/slirp/udp.c \
576 Network/slirp/dnsproxy/hash.c \
577 Network/slirp/tftp.c \
578 Network/slirp/dnsproxy/dnsproxy.c
579
580 ifneq ($(KBUILD_TARGET), win)
581 VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
582 endif
583
584 ifdef VBOX_WITH_SLIRP_BSD_SBUF
585 VBOX_SLIRP_SOURCES += Network/slirp/bsd/kern/subr_sbuf.c
586 endif
587 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
588 VBOX_SLIRP_BSD_SOURCES += \
589 Network/slirp/bsd/kern/kern_mbuf.c \
590 Network/slirp/bsd/kern/uipc_mbuf.c \
591 Network/slirp/bsd/kern/uipc_mbuf2.c \
592 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
593 VBOX_SLIRP_ALIAS_SOURCES = \
594 Network/slirp/libalias/alias.c \
595 Network/slirp/libalias/alias_db.c \
596 Network/slirp/libalias/alias_mod.c \
597 Network/slirp/libalias/alias_proxy.c \
598 Network/slirp/libalias/alias_ftp.c \
599 Network/slirp/libalias/alias_dns.c \
600 Network/slirp/libalias/alias_nbt.c \
601 Network/slirp/libalias/alias_util.c
602
603 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
604 # $(file)_DEFS or clean the code disabled with this definition.
605 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER=1
606
607 # dump memory related operations.
608 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
609
610 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
611 define def_vbox_slirp_cflags
612 $(file)_DEFS += \
613 $(if $(VBOX_WITH_SLIRP_BSD_SBUF),VBOX_WITH_SLIRP_BSD_SBUF,) \
614 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
615 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
616 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
617 $(if $(VBOX_WITH_NAT_UDP_SOCKET_CLONE),VBOX_WITH_NAT_UDP_SOCKET_CLONE,) \
618 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
619 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
620 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
621 $(file)_INCS += \
622 $(1)/slirp/bsd/sys \
623 $(1)/slirp/bsd/sys/sys \
624 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
625 $(1)/slirp/bsd/netinet \
626 $(1)/slirp \
627 $(1)/slirp/libalias
628 ifeq ($(KBUILD_TARGET),win)
629 $(file)_CFLAGS = -wd4018
630 else
631 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
632 endif
633 endef
634
635 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
636
637 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
638 define def_vbox_slirp_alias_cflags
639 $(file)_DEFS += VBOX_SLIRP_ALIAS \
640 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
641 $(file)_INCS += \
642 $(1)/slirp/libalias \
643 $(1)/slirp \
644 $(1)/slirp/dnsproxy
645 ifneq ($(KBUILD_TARGET),win)
646 $(file)_CFLAGS += -Wno-shadow
647 endif
648 endef
649 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
650 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
651
652 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
653 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
654 define def_vbox_slirp_bsd_cflags
655 $(file)_DEFS += VBOX_SLIRP_BSD
656 $(file)_INCS += $(1)/slirp/dnsproxy
657 endef
658 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
659 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
660
661
662 # --- OS specific driver hacks. ---
663
664 ifeq ($(KBUILD_TARGET),darwin)
665 VBoxDD_SOURCES := \
666 $(filter-out Storage/DrvHostRaw% Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
667 Audio/coreaudio.c
668 VBoxDD_SOURCES.darwin += \
669 Serial/DrvHostSerial.cpp
670 endif # darwin
671
672 ifeq ($(KBUILD_TARGET),freebsd)
673 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
674 VBoxDD_SOURCES := \
675 $(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
676 Audio/DrvHostOssAudio.c \
677 Serial/DrvHostSerial.cpp
678 VBoxDD_SOURCES.freebsd += \
679 Network/DrvTAP.cpp
680 else
681 VBoxDD_SOURCES := \
682 $(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
683 Audio/ossaudio.c \
684 Serial/DrvHostSerial.cpp
685 VBoxDD_SOURCES.freebsd += \
686 Network/DrvTAP.cpp
687 endif
688 endif # freebsd
689
690 VBoxDD_SOURCES.linux += \
691 Network/DrvTAP.cpp \
692 Parallel/DrvHostParallel.cpp \
693 Serial/DrvHostSerial.cpp
694
695 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
696 VBoxDD_SOURCES.linux += \
697 Audio/DrvHostOssAudio.c
698 else
699 VBoxDD_SOURCES.linux += \
700 Audio/ossaudio.c
701 endif
702
703 ifeq ($(KBUILD_TARGET),os2)
704 VBoxDD_SOURCES := $(filter-out Storage/DrvHost%, $(VBoxDD_SOURCES))
705 endif
706
707 ifeq ($(KBUILD_TARGET),solaris)
708 VBoxDD_SOURCES := $(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES))
709 VBoxDD_SOURCES.solaris += \
710 Serial/DrvHostSerial.cpp
711 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
712 VBoxDD_SOURCES.solaris += \
713 Audio/DrvHostSolAudio.c
714 else
715 VBoxDD_SOURCES.solaris += \
716 Audio/solaudio.c
717 endif
718 ifdef VBOX_WITH_SOLARIS_OSS
719 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
720 VBoxDD_SOURCES += Audio/DrvHostOssAudio.c
721 else
722 VBoxDD_SOURCES += Audio/ossaudio.c
723 endif
724 VBoxDD_DEFS += VBOX_WITH_SOLARIS_OSS
725 endif
726 ifdef VBOX_WITH_SUID_WRAPPER
727 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
728 endif
729 endif
730
731 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
732 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
733 VBoxDD_DEFS.win += VBOX_WITH_PDM_AUDIO_DRIVER
734 endif
735 VBoxDD_SOURCES.win += \
736 Serial/DrvHostSerial.cpp \
737 Parallel/DrvHostParallel.cpp
738
739 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
740 VBoxDD_SOURCES.win += \
741 Audio/DrvHostDSound.c
742 else
743 VBoxDD_SOURCES.win += \
744 Audio/dsoundaudio.c
745 endif
746
747 if defined(VBOX_WITH_NETFLT)
748 VBoxDD_DEFS += VBOX_WITH_NETFLT
749 if defined(VBOX_NETFLT_ONDEMAND_BIND)
750 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
751 endif
752 endif
753
754
755 # --- Final bits, mostly libraries for order dependant linkers. ---
756
757 VBoxDD_LIBS += \
758 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
759 $(LIB_VMM) \
760 $(LIB_RUNTIME)
761 ifeq ($(KBUILD_TARGET),win)
762 VBoxDD_LIBS += \
763 $(LIB_DDU) \
764 $(PATH_STAGE_LIB)/VBoxDD2.lib \
765 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
766 else
767 VBoxDD_LIBS += \
768 $(VBoxDDU_1_STAGE_TARGET) \
769 $(VBoxDD2_1_STAGE_TARGET)
770 endif
771
772 ifdef VBOX_WITH_NETFLT
773 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.lib
774 endif
775
776 ifeq ($(KBUILD_TARGET),solaris)
777 VBoxDD_LIBS += adm
778 ifdef VBOX_WITH_SUID_WRAPPER
779 VBoxDD_LIBS += secdb
780 endif
781 ifdef VBOX_WITH_USB
782 VBoxDD_LIBS += aio
783 endif
784 endif
785
786 VBoxDD_LIBS.darwin += \
787 $(LIB_REM)
788
789
790 ifdef VBOX_WITH_DYNAMIC_DSDT
791 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
792 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
793
794 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
795 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
796 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
797
798 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
799
800 else # !VBOX_WITH_DYNAMIC_DSDT
801 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
802 VBoxDD_CLEAN += \
803 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
804 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
805 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
806 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml \
807 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml.tmp \
808 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex \
809 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml \
810 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.tmp \
811 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.pre
812 PC/ACPI/VBoxAcpi.cpp_DEPS = \
813 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
814 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
815 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
816
817 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
818 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
819 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
820
821 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
822
823 $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
824 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
825 $(QUIET)$(RM) -f $@ $@.tmp
826 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
827 $(QUIET)$(MV) -f $@ $@.tmp
828 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtStandard/g" \
829 --output $@ $@.tmp
830 $(QUIET)$(RM) -f $@.tmp
831
832
833 vboxssdt-standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex
834
835 $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
836 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
837 $(QUIET)$(RM) -f $@ $@.tmp $@.pre
838 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o $@.pre $<
839 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $@.pre
840 $(QUIET)$(MV) -f $@ $@.tmp
841 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtCpuHotPlug/g" \
842 --output $@ $@.tmp
843 $(QUIET)$(RM) -f $@.tmp $@.pre
844
845
846 vboxssdt-cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
847
848 endif # !VBOX_WITH_DYNAMIC_DSDT
849 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
850
851 # For finding PCIInternal.h from VBox/pci.h.
852 Bus/DevPCI.cpp_INCS = Bus
853 Bus/DevPciIch9.cpp_INCS = Bus
854 Bus/MsiCommon.cpp_INCS = Bus
855 Bus/MsixCommon.cpp_INCS = Bus
856 Bus/DevPciRaw.cpp_INCS = Bus
857
858 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
859 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR)
860 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
861
862
863 ifdef VBOX_WITH_RAW_MODE
864 #
865 # VBoxDDGC (sysmod)
866 #
867 VBoxDDGC_TEMPLATE = VBoxRc
868 ifeq ($(KBUILD_TARGET_ARCH),x86)
869 VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
870 endif
871 VBoxDDGC_DEFS = $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
872 VBoxDDGC_INCS = build
873 VBoxDDGC_SOURCES = \
874 Audio/DevIchHda.cpp \
875 Bus/DevPCI.cpp \
876 Bus/DevPciIch9.cpp \
877 Bus/MsiCommon.cpp \
878 Bus/MsixCommon.cpp \
879 $(if $(VBOX_WITH_SMC_NEW),EFI/DevSmc.cpp,) \
880 Graphics/DevVGA.cpp \
881 Input/DevPS2.cpp \
882 Input/PS2K.cpp \
883 Input/PS2M.cpp \
884 PC/DevACPI.cpp \
885 PC/DevPit-i8254.cpp \
886 PC/DevPIC.cpp \
887 PC/DevRTC.cpp \
888 PC/DevHPET.cpp \
889 Storage/DevATA.cpp \
890 Network/DevPCNet.cpp \
891 Serial/DevSerial.cpp \
892 Parallel/DevParallel.cpp \
893 VMMDev/VMMDevTesting.cpp
894
895 ifdef VBOX_WITH_E1000
896 VBoxDDGC_DEFS += VBOX_WITH_E1000
897 VBoxDDGC_SOURCES += \
898 Network/DevE1000.cpp \
899 Network/DevE1000Phy.cpp
900 endif
901
902 ifdef VBOX_WITH_VIRTIO
903 VBoxDDGC_DEFS += VBOX_WITH_VIRTIO
904 VBoxDDGC_SOURCES += \
905 VirtIO/Virtio.cpp \
906 Network/DevVirtioNet.cpp
907 endif
908
909 ifdef VBOX_WITH_HGSMI
910 VBoxDDGC_DEFS += VBOX_WITH_HGSMI
911 endif
912 ifdef VBOX_WITH_WDDM
913 VBoxDDGC_DEFS += VBOX_WITH_WDDM
914 endif
915 ifdef VBOX_WITH_VDMA
916 VBoxDDGC_DEFS += VBOX_WITH_VDMA
917 endif
918 ifdef VBOX_WITH_CRHGSMI
919 VBoxDDGC_DEFS += VBOX_WITH_CRHGSMI
920 endif
921 ifdef VBOXWDDM_WITH_VBVA
922 VBoxDDGC_DEFS += VBOXWDDM_WITH_VBVA
923 endif
924 ifdef VBOX_WITH_VMSVGA
925 VBoxDDGC_DEFS += VBOX_WITH_VMSVGA
926 VBoxDDGC_SOURCES += \
927 Graphics/DevVGA-SVGA.cpp
928 endif
929 ifdef VBOX_WITH_VMSVGA3D
930 VBoxDDGC_DEFS += VBOX_WITH_VMSVGA3D
931 endif
932 ifdef VBOX_VDMA_WITH_WATCHDOG
933 VBoxDDGC_DEFS += VBOX_VDMA_WITH_WATCHDOG
934 endif
935
936 ifdef VBOX_WITH_VUSB
937 VBoxDDGC_DEFS += VBOX_WITH_VUSB
938 VBoxDDGC_SOURCES += \
939 USB/DevOHCI.cpp
940 endif
941
942 ifdef VBOX_WITH_USB
943 VBoxDDGC_DEFS += VBOX_WITH_USB
944 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
945 VBoxDDGC_DEFS += VBOX_WITH_EHCI_IMPL
946 VBoxDDGC_SOURCES += \
947 USB/DevEHCI.cpp
948 endif
949 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
950 VBoxDDGC_DEFS += VBOX_WITH_XHCI_IMPL
951 VBoxDDGC_SOURCES += \
952 USB/DevXHCI.cpp
953 endif
954 endif
955
956 ifdef VBOX_WITH_VIDEOHWACCEL
957 VBoxDDGC_DEFS += VBOX_WITH_VIDEOHWACCEL
958 endif
959
960 ifdef VBOX_WITH_AHCI
961 VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
962 VBoxDDGC_SOURCES += \
963 Storage/DevAHCI.cpp
964 endif
965
966 ifdef VBOX_WITH_BUSLOGIC
967 VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
968 VBoxDDGC_SOURCES += \
969 Storage/DevBusLogic.cpp
970 endif
971
972 ifdef VBOX_WITH_LSILOGIC
973 VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
974 VBoxDDGC_SOURCES += \
975 Storage/DevLsiLogicSCSI.cpp
976 endif
977
978 ifdef VBOX_WITH_NEW_PS2M
979 VBoxDDGC_DEFS += VBOX_WITH_NEW_PS2M
980 endif
981
982 if1of ($(VBOX_LDR_FMT32), pe lx)
983 VBoxDDGC_LIBS = \
984 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
985 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
986 endif
987 endif # VBOX_WITH_RAW_MODE
988
989
990 #
991 # VBoxDD2 (shared object)
992 #
993 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
994 VBoxDD2_DEFS = IN_VBOXDD2 $(if $(VBOX_WITH_SMC_NEW),VBOX_WITH_SMC_NEW,)
995 VBoxDD2_INCS := \
996 build \
997 $(PATH_SUB_CURRENT)
998 VBoxDD2_SOURCES = \
999 build/VBoxDD2.cpp \
1000 PC/DevAPIC.cpp \
1001 PC/DevIoApic.cpp \
1002 $(if $(VBOX_WITH_SMC_NEW),,PC/DevSMC.cpp) \
1003 PC/DevLPC.cpp
1004 VBoxDD2_LIBS = \
1005 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1006 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1007 $(if $(VBOX_WITH_PXE_ROM),\
1008 $(if $(VBOX_WITH_INTEL_PXE),\
1009 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB),\
1010 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1011 $(LIB_VMM) \
1012 $(LIB_RUNTIME)
1013 VBoxDD2_LIBS.darwin += $(LIB_REM)
1014 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1015 VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
1016
1017 ifdef VBOX_WITH_PXE_ROM
1018 VBoxDD2_DEFS += VBOX_WITH_PXE_ROM
1019 endif
1020
1021
1022 #
1023 # VBoxDDR0 (sysmod)
1024 #
1025 VBoxDDR0_TEMPLATE = VBoxR0
1026 VBoxDDR0_DEFS.darwin.x86= VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
1027 VBoxDDR0_DEFS = IN_RT_R0 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) # - WTF is IN_RT_R0 doing here?
1028 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1029 VBoxDDR0_INCS = build
1030 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1031 VBoxDDR0_SOURCES = \
1032 build/VBoxDDR0.cpp \
1033 Audio/DevIchHda.cpp \
1034 Bus/DevPCI.cpp \
1035 Bus/DevPciIch9.cpp \
1036 Bus/MsiCommon.cpp \
1037 Bus/MsixCommon.cpp \
1038 $(if $(VBOX_WITH_SMC_NEW),EFI/DevSmc.cpp,) \
1039 Graphics/DevVGA.cpp \
1040 Input/DevPS2.cpp \
1041 Input/PS2K.cpp \
1042 Input/PS2M.cpp \
1043 PC/DevACPI.cpp \
1044 PC/DevPit-i8254.cpp \
1045 PC/DevPIC.cpp \
1046 PC/DevRTC.cpp \
1047 PC/DevHPET.cpp \
1048 Storage/DevATA.cpp \
1049 Network/DevPCNet.cpp \
1050 Serial/DevSerial.cpp \
1051 Parallel/DevParallel.cpp \
1052 VMMDev/VMMDevTesting.cpp \
1053 \
1054 Network/DrvIntNet.cpp \
1055 Network/DrvDedicatedNic.cpp
1056
1057 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1058
1059 ifdef VBOX_WITH_E1000
1060 VBoxDDR0_DEFS += VBOX_WITH_E1000
1061 VBoxDDR0_SOURCES += \
1062 Network/DevE1000.cpp \
1063 Network/DevE1000Phy.cpp
1064 endif
1065
1066 ifdef VBOX_WITH_VIRTIO
1067 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1068 VBoxDDR0_SOURCES += \
1069 VirtIO/Virtio.cpp \
1070 Network/DevVirtioNet.cpp
1071 endif
1072
1073 ifdef VBOX_WITH_NETSHAPER
1074 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1075 VBoxDDR0_SOURCES += \
1076 Network/DrvNetShaper.cpp
1077 endif
1078
1079 ifdef VBOX_WITH_VMSVGA
1080 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1081 VBoxDDR0_SOURCES += \
1082 Graphics/DevVGA-SVGA.cpp
1083 endif
1084 ifdef VBOX_WITH_VMSVGA3D
1085 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1086 endif
1087
1088 ifdef VBOX_WITH_HGSMI
1089 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1090 endif
1091 ifdef VBOX_WITH_WDDM
1092 VBoxDDR0_DEFS += VBOX_WITH_WDDM
1093 endif
1094 ifdef VBOX_WITH_VDMA
1095 VBoxDDR0_DEFS += VBOX_WITH_VDMA
1096 endif
1097 ifdef VBOX_WITH_CRHGSMI
1098 VBoxDDR0_DEFS += VBOX_WITH_CRHGSMI
1099 endif
1100 ifdef VBOXWDDM_WITH_VBVA
1101 VBoxDDR0_DEFS += VBOXWDDM_WITH_VBVA
1102 endif
1103 ifdef VBOX_VDMA_WITH_WATCHDOG
1104 VBoxDDR0_DEFS += VBOX_VDMA_WITH_WATCHDOG
1105 endif
1106
1107 ifdef VBOX_WITH_VUSB
1108 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1109 VBoxDDR0_SOURCES += \
1110 USB/DevOHCI.cpp
1111 endif
1112 ifdef VBOX_WITH_USB
1113 VBoxDDR0_DEFS += VBOX_WITH_USB
1114 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1115 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1116 VBoxDDR0_SOURCES += \
1117 USB/DevEHCI.cpp
1118 endif
1119 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1120 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1121 VBoxDDR0_SOURCES += \
1122 USB/DevXHCI.cpp
1123 endif
1124 endif
1125
1126 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1127 VBoxDDR0_SOURCES += \
1128 Bus/DevPciRaw.cpp
1129 endif
1130
1131 ifdef VBOX_WITH_AHCI
1132 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1133 VBoxDDR0_SOURCES += \
1134 Storage/DevAHCI.cpp
1135 endif
1136
1137 ifdef VBOX_WITH_BUSLOGIC
1138 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1139 VBoxDDR0_SOURCES += \
1140 Storage/DevBusLogic.cpp
1141 endif
1142
1143 ifdef VBOX_WITH_LSILOGIC
1144 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1145 VBoxDDR0_SOURCES += \
1146 Storage/DevLsiLogicSCSI.cpp
1147 endif
1148
1149 ifdef VBOX_WITH_NEW_PS2M
1150 VBoxDDR0_DEFS += VBOX_WITH_NEW_PS2M
1151 endif
1152
1153 ifdef VBOX_WITH_HGSMI
1154 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1155 endif
1156 ifdef VBOX_WITH_VIDEOHWACCEL
1157 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1158 endif
1159
1160 if1of ($(VBOX_LDR_FMT), pe lx)
1161 VBoxDDR0_LIBS = \
1162 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1163 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1164 endif
1165
1166
1167 ifdef VBOX_WITH_RAW_MODE
1168 #
1169 # VBoxDD2GC (LGPL sysmod)
1170 #
1171 VBoxDD2GC_TEMPLATE = VBoxRc
1172 VBoxDD2GC_DEFS = $(if $(VBOX_WITH_SMC_NEW),VBOX_WITH_SMC_NEW,)
1173 VBoxDD2GC_INCS = build
1174 VBoxDD2GC_SOURCES = \
1175 PC/DevAPIC.cpp \
1176 PC/DevIoApic.cpp \
1177 $(if $(VBOX_WITH_SMC_NEW),,PC/DevSMC.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 $(if $(VBOX_WITH_SMC_NEW),VBOX_WITH_SMC_NEW,)
1191 VBoxDD2R0_INCS = build
1192 VBoxDD2R0_SOURCES = \
1193 build/VBoxDD2R0.cpp \
1194 PC/DevAPIC.cpp \
1195 PC/DevIoApic.cpp \
1196 $(if $(VBOX_WITH_SMC_NEW),,PC/DevSMC.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 endif
1314
1315 if defined(VBOX_WITH_PCI_PASSTHROUGH)
1316 DLLS += VBoxPciRawR3
1317 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1318 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1319
1320 DLLS += VBoxPciRawDrv
1321 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1322 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1323
1324 SYSMODS += VBoxPciRawR0
1325 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1326 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1327
1328 Bus/DevPciRaw.cpp_INCS = Bus
1329 endif
1330
1331
1332 #
1333 # The Intel PXE rom.
1334 #
1335 INSTALLS += VBoxExtPackPuelInsRoms
1336 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1337 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1338endif # VBOX_WITH_EXTPACK_PUEL
1339
1340include $(FILE_KBUILD_SUB_FOOTER)
1341
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