VirtualBox

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

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

Force EHCI extpack to be built with MSI support (xHCI requirement).

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