VirtualBox

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

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

NAT: Fix previous - compile ip_icmpwin.c only on Windows.

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