VirtualBox

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

Last change on this file since 50667 was 50550, checked in by vboxsync, 11 years ago

DevVGA/HGSMI: use RTList

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