VirtualBox

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

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

Devices/Makefile.kmk: Make it possible to work with the OpenGL backend for SVGA3D on Windows.

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