VirtualBox

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

Last change on this file since 51856 was 51560, checked in by vboxsync, 11 years ago

VMM/GIM: Mapping of GIM MMIO2 regions and Hyper-V provider work.

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