VirtualBox

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

Last change on this file since 48177 was 48169, checked in by vboxsync, 11 years ago

Move Devices bits to Devices makefile.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 30.5 KB
Line 
1# $Id: Makefile.kmk 48169 2013-08-29 17:47:09Z vboxsync $
2## @file
3# Top-level sub-makefile for the devices, drivers and services.
4#
5
6#
7# Copyright (C) 2006-2012 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 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
69 VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
70 endif
71 else
72 VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK)
73 endif
74 VBoxDDU_SOURCES = \
75 Storage/VSCSI/VSCSIDevice.cpp \
76 Storage/VSCSI/VSCSILun.cpp \
77 Storage/VSCSI/VSCSILunSbc.cpp \
78 Storage/VSCSI/VSCSILunMmc.cpp \
79 Storage/VSCSI/VSCSISense.cpp \
80 Storage/VSCSI/VSCSIIoReq.cpp \
81 Storage/VSCSI/VSCSIVpdPagePool.cpp \
82 build/VBoxDDUDeps.cpp
83 ifdef VBOX_WITH_USB
84 VBoxDDU_INCS.os2 += \
85 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
86 endif
87 VBoxDDU_LIBS = \
88 $(LIB_RUNTIME) \
89 $(PATH_STAGE_LIB)/StorageLib$(VBOX_SUFF_LIB)
90 ifdef VBOX_WITH_USB
91 VBoxDDU_LIBS += \
92 $(PATH_STAGE_LIB)/USBLib$(VBOX_SUFF_LIB)
93 VBoxDDU_LIBS.win += \
94 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
95 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib
96 endif
97 VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
98 ifdef VBOX_WITH_USB
99 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
100 VBoxDDU_LDFLAGS.darwin += -framework IOKit
101 endif
102 endif
103
104 VBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
105
106 #
107 # VBoxDD (shared object)
108 #
109 VBoxDD_TEMPLATE = VBoxR3DllWarnNoPic
110 VBoxDD_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
111 Storage/DrvHostDVD.cpp_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK)
112 VBoxDD_INCS = \
113 build \
114 Network/slirp
115 VBoxDD_DEFS = \
116 VBOX_ACPI \
117 VBOX_HGCM_HOST_CODE \
118 VBOX_WITH_HGCM \
119 $(if $(VBOX_BIOS_DMI_FALLBACK),VBOX_BIOS_DMI_FALLBACK,) \
120 VBOX_WITH_DMI_CHASSIS \
121 VBOX_WITH_DMI_OEMSTRINGS
122 VBoxDD_DEFS.win = _WIN32_WINNT=0x0510
123 ifeq ($(KBUILD_TARGET_ARCH),x86)
124 VBoxDD_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
125 endif
126 VBoxDD_SOURCES = \
127 build/VBoxDD.cpp \
128 \
129 Input/DevPS2.cpp \
130 Input/PS2K.cpp \
131 Input/UsbKbd.cpp \
132 Input/UsbMouse.cpp \
133 Bus/DevPCI.cpp \
134 Bus/DevPciIch9.cpp \
135 Bus/MsiCommon.cpp \
136 Bus/MsixCommon.cpp \
137 Graphics/DevVGA.cpp \
138 Storage/DevATA.cpp \
139 PC/DevPit-i8254.cpp \
140 PC/DevPIC.cpp \
141 PC/DevACPI.cpp \
142 PC/ACPI/VBoxAcpi.cpp \
143 PC/DevRTC.cpp \
144 PC/DevPcBios.cpp \
145 PC/DevFwCommon.cpp \
146 PC/DevPcArch.cpp \
147 VMMDev/VMMDev.cpp \
148 VMMDev/VMMDevHGCM.cpp \
149 VMMDev/VMMDevTesting.cpp \
150 Network/DevPCNet.cpp \
151 Audio/DevIchAc97.cpp \
152 Audio/DevSB16.cpp \
153 Audio/DevIchHda.cpp \
154 Audio/DevIchHdaCodec.cpp \
155 PC/DevDMA.cpp \
156 PC/DevHPET.cpp \
157 PC/DevSMC.cpp \
158 PC/DevLPC.cpp \
159 Storage/DevFdc.cpp \
160 Serial/DevSerial.cpp \
161 Parallel/DevParallel.cpp \
162 \
163 Audio/audio.c \
164 Audio/audiosniffer.c \
165 Audio/mixeng.c \
166 Audio/noaudio.c \
167 Audio/filteraudio.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 Graphics/HGSMI/HGSMIHostHlp.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_VDMA
239 VBoxDD_DEFS += VBOX_WITH_VDMA
240 VBoxDD_SOURCES += \
241 Graphics/DevVGA_VDMA.cpp
242 endif
243
244 ifdef VBOX_VDMA_WITH_WATCHDOG
245 VBoxDD_DEFS += VBOX_VDMA_WITH_WATCHDOG
246 endif
247
248 ifdef VBOX_WITH_PXE_ROM
249 VBoxDD_DEFS += VBOX_WITH_PXE_ROM
250 endif
251
252 # --- USB bits. ---
253
254 ifdef VBOX_WITH_USB
255 VBoxDD_DEFS += VBOX_WITH_USB
256 VBoxDD_SOURCES += \
257 USB/vrdp/USBProxyDevice-vrdp.cpp
258
259 VBoxDD_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
260 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
261 VBoxDD_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
262 endif
263 VBoxDD_SOURCES.darwin += \
264 USB/USBProxyDevice.cpp \
265 USB/darwin/USBProxyDevice-darwin.cpp
266
267 VBoxDD_DEFS.linux += \
268 VUSB_HAVE_USBPROXY_DEVICE \
269 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
270 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
271 VBoxDD_SOURCES.linux += \
272 USB/USBProxyDevice.cpp \
273 USB/linux/USBProxyDevice-linux.cpp
274
275 VBoxDD_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
276 VBoxDD_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
277 VBoxDD_SOURCES.os2 += \
278 USB/USBProxyDevice.cpp \
279 USB/os2/USBProxyDevice-os2.cpp
280
281 VBoxDD_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
282 VBoxDD_SOURCES.win += \
283 USB/USBProxyDevice.cpp \
284 USB/win/USBProxyDevice-win.cpp
285
286 VBoxDD_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
287 VBoxDD_SOURCES.solaris+= \
288 USB/USBProxyDevice.cpp \
289 USB/solaris/USBProxyDevice-solaris.cpp
290
291 VBoxDD_DEFS.freebsd += VUSB_HAVE_USBPROXY_DEVICE
292 VBoxDD_SOURCES.freebsd+= \
293 USB/USBProxyDevice.cpp \
294 USB/freebsd/USBProxyDevice-freebsd.cpp
295
296 ifdef VBOX_WITH_SCSI
297 VBoxDD_SOURCES += \
298 Storage/UsbMsd.cpp
299 endif
300
301 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
302 VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
303 endif
304 VBoxDD_DEFS += VBOX_WITH_USB
305 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
306 VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
307 VBoxDD_SOURCES += \
308 USB/DevEHCI.cpp
309 endif
310
311 endif # VBOX_WITH_USB
312
313 ifdef VBOX_WITH_VUSB
314 VBoxDD_DEFS += VBOX_WITH_VUSB
315 VBoxDD_SOURCES += \
316 USB/DevOHCI.cpp \
317 USB/DrvVUSBRootHub.cpp \
318 USB/VUSBDevice.cpp \
319 USB/VUSBReadAhead.cpp \
320 USB/VUSBUrb.cpp
321 endif
322
323 # --- Networking bits. ---
324
325 ifdef VBOX_WITH_INIP
326 ifndef VBOX_WITH_NEW_LWIP
327 include $(PATH_SUB_CURRENT)/Network/lwip/Makefile.kmk
328 else
329 include $(PATH_SUB_CURRENT)/Network/lwip-new/Makefile.kmk
330 endif
331 VBoxDD_DEFS += VBOX_WITH_INIP
332 VBoxDD_INCS += $(LWIP_INCS)
333 VBoxDD_SOURCES += $(LWIP_SOURCES)
334 VBoxDD_SOURCES += \
335 Network/DevINIP.cpp
336 ifdef VBOX_WITH_NEW_LWIP
337 Network/DevINIP.cpp_DEFS += VBOX_WITH_NEW_LWIP
338 endif
339 endif
340
341 ifdef VBOX_WITH_E1000
342 VBoxDD_DEFS += VBOX_WITH_E1000
343 VBoxDD_SOURCES += \
344 Network/DevE1000.cpp \
345 Network/DevE1000Phy.cpp \
346 Network/DevEEPROM.cpp
347 endif
348
349 ifdef VBOX_WITH_VIRTIO
350 VBoxDD_DEFS += VBOX_WITH_VIRTIO
351 VBoxDD_SOURCES += \
352 VirtIO/Virtio.cpp \
353 Network/DevVirtioNet.cpp
354 endif
355
356 ifdef VBOX_WITH_UDPTUNNEL
357 VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
358 VBoxDD_SOURCES += \
359 Network/DrvUDPTunnel.cpp
360 endif
361
362 ifdef VBOX_WITH_VDE
363 VBoxDD_DEFS += VBOX_WITH_VDE
364 VBoxDD_SOURCES += \
365 Network/DrvVDE.cpp \
366 Network/VDEPlug.cpp
367 endif
368
369 ifdef VBOX_WITH_NETSHAPER
370 VBoxDD_DEFS += VBOX_WITH_NETSHAPER
371 VBoxDD_SOURCES += \
372 Network/DrvNetShaper.cpp
373 endif
374
375 # --- Storage bits. ---
376
377 ifdef VBOX_WITH_AHCI
378 VBoxDD_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
379 VBoxDD_SOURCES += \
380 Storage/DevAHCI.cpp
381 endif
382
383 ifdef VBOX_WITH_BUSLOGIC
384 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
385 VBoxDD_SOURCES += \
386 Storage/DevBusLogic.cpp \
387 Storage/VBoxSCSI.cpp
388 endif
389
390 ifdef VBOX_WITH_LSILOGIC
391 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
392 VBoxDD_SOURCES += \
393 Storage/DevLsiLogicSCSI.cpp
394 endif
395
396 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
397 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
398 endif
399
400 ifdef VBOX_WITH_SCSI
401 VBoxDD_DEFS += VBOX_WITH_SCSI
402 VBoxDD_SOURCES += \
403 Storage/DrvSCSI.cpp
404 VBoxDD_SOURCES.linux += \
405 Storage/DrvSCSIHost.cpp
406 endif
407
408 ifdef VBOX_WITH_ISCSI
409 Storage/DrvVD.cpp_INCS = $(LWIP_INCS)
410 ifdef VBOX_WITH_NEW_LWIP
411 Storage/DrvVD.cpp_DEFS += VBOX_WITH_NEW_LWIP
412 endif
413 endif
414
415 ifdef VBOX_WITH_DRV_DISK_INTEGRITY
416 VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
417 VBoxDD_SOURCES += \
418 Storage/DrvDiskIntegrity.cpp
419 VBoxDD_LIBS += \
420 $(PATH_STAGE_LIB)/StorageDbgLib$(VBOX_SUFF_LIB)
421 endif
422
423 ifdef VBOX_WITH_EFI
424 VBoxDD_DEFS += VBOX_WITH_EFI
425 VBoxDD_SOURCES += EFI/DevEFI.cpp
426 EFI/DevEFI.cpp_INCS += EFI/tools/include
427 EFI/DevEFI.cpp_INCS.x86 += EFI/tools/include/Ia32
428 EFI/DevEFI.cpp_INCS.amd64 += EFI/tools/include/X64
429 endif
430
431 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
432 VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
433 VBoxDD_SOURCES += \
434 Bus/DevPciRaw.cpp \
435 Bus/DrvPciRaw.cpp
436 endif
437
438 ifdef VBOX_WITH_MSI_DEVICES
439 VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
440 endif
441
442 ifdef VBOX_WITH_DYNAMIC_DSDT
443 VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
444 endif
445
446
447 # --- Audio bits. ---
448
449 ifdef VBOX_WITH_ALSA
450 VBoxDD_DEFS.linux += VBOX_WITH_ALSA
451 VBoxDD_SOURCES.linux += \
452 Audio/alsaaudio.c \
453 Audio/alsa_stubs.c
454 endif
455
456 ifdef VBOX_WITH_PULSE
457 VBoxDD_DEFS.linux += VBOX_WITH_PULSE
458 VBoxDD_SOURCES.linux += \
459 Audio/pulseaudio.c \
460 Audio/pulse_stubs.c
461 VBoxDD_DEFS.freebsd += VBOX_WITH_PULSE
462 VBoxDD_SOURCES.freebsd+= \
463 Audio/pulseaudio.c \
464 Audio/pulse_stubs.c
465 endif
466
467
468 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
469 VBOX_SLIRP_SOURCES = \
470 Network/DrvNAT.cpp \
471 Network/slirp/bootp.c \
472 Network/slirp/debug.c \
473 Network/slirp/ip_icmp.c \
474 Network/slirp/ip_input.c \
475 Network/slirp/ip_output.c \
476 Network/slirp/misc.c \
477 Network/slirp/sbuf.c \
478 Network/slirp/slirp.c \
479 Network/slirp/slirp_dns.c \
480 Network/slirp/socket.c \
481 Network/slirp/tcp_input.c \
482 Network/slirp/tcp_output.c \
483 Network/slirp/tcp_subr.c \
484 Network/slirp/tcp_timer.c \
485 Network/slirp/udp.c \
486 Network/slirp/dnsproxy/hash.c \
487 Network/slirp/tftp.c \
488 Network/slirp/dnsproxy/dnsproxy.c
489 ifdef VBOX_WITH_SLIRP_BSD_SBUF
490 VBOX_SLIRP_SOURCES += Network/slirp/bsd/kern/subr_sbuf.c
491 endif
492 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
493 VBOX_SLIRP_BSD_SOURCES += \
494 Network/slirp/bsd/kern/kern_mbuf.c \
495 Network/slirp/bsd/kern/uipc_mbuf.c \
496 Network/slirp/bsd/kern/uipc_mbuf2.c \
497 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
498 VBOX_SLIRP_ALIAS_SOURCES = \
499 Network/slirp/libalias/alias.c \
500 Network/slirp/libalias/alias_db.c \
501 Network/slirp/libalias/alias_mod.c \
502 Network/slirp/libalias/alias_proxy.c \
503 Network/slirp/libalias/alias_ftp.c \
504 Network/slirp/libalias/alias_dns.c \
505 Network/slirp/libalias/alias_nbt.c \
506 Network/slirp/libalias/alias_util.c
507
508 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
509 # $(file)_DEFS or clean the code disabled with this definition.
510 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER=1
511
512 # dump memory related operations.
513 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
514
515 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
516 define def_vbox_slirp_cflags
517 $(file)_DEFS += \
518 $(if $(VBOX_WITH_SLIRP_BSD_SBUF),VBOX_WITH_SLIRP_BSD_SBUF,) \
519 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
520 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
521 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
522 $(if $(VBOX_WITH_NAT_UDP_SOCKET_CLONE),VBOX_WITH_NAT_UDP_SOCKET_CLONE,) \
523 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
524 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
525 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
526 $(file)_INCS += \
527 $(1)/slirp/bsd/sys \
528 $(1)/slirp/bsd/sys/sys \
529 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
530 $(1)/slirp/bsd/netinet \
531 $(1)/slirp \
532 $(1)/slirp/libalias
533 ifeq ($(KBUILD_TARGET),win)
534 $(file)_CFLAGS = -wd4018
535 else
536 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
537 endif
538 endef
539
540 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
541
542 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
543 define def_vbox_slirp_alias_cflags
544 $(file)_DEFS += VBOX_SLIRP_ALIAS \
545 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
546 $(file)_INCS += \
547 $(1)/slirp/libalias \
548 $(1)/slirp \
549 $(1)/slirp/dnsproxy
550 ifneq ($(KBUILD_TARGET),win)
551 $(file)_CFLAGS += -Wno-shadow
552 endif
553 endef
554 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
555 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
556
557 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
558 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
559 define def_vbox_slirp_bsd_cflags
560 $(file)_DEFS += VBOX_SLIRP_BSD
561 $(file)_INCS += $(1)/slirp/dnsproxy
562 endef
563 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
564 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
565
566
567 # --- OS specific driver hacks. ---
568
569 ifeq ($(KBUILD_TARGET),darwin)
570 VBoxDD_SOURCES := \
571 $(filter-out Storage/DrvHostRaw% Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
572 Audio/coreaudio.c
573 VBoxDD_SOURCES.darwin += \
574 Serial/DrvHostSerial.cpp
575 endif # darwin
576
577 ifeq ($(KBUILD_TARGET),freebsd)
578 VBoxDD_SOURCES := \
579 $(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES)) \
580 Audio/ossaudio.c \
581 Serial/DrvHostSerial.cpp
582 VBoxDD_SOURCES.freebsd += \
583 Network/DrvTAP.cpp
584 endif # freebsd
585
586 VBoxDD_SOURCES.linux += \
587 Network/DrvTAP.cpp \
588 Audio/ossaudio.c \
589 Parallel/DrvHostParallel.cpp \
590 Serial/DrvHostSerial.cpp
591
592 ifeq ($(KBUILD_TARGET),os2)
593 VBoxDD_SOURCES := $(filter-out Storage/DrvHost%, $(VBoxDD_SOURCES))
594 endif
595
596 ifeq ($(KBUILD_TARGET),solaris)
597 VBoxDD_SOURCES := $(filter-out Storage/DrvHostFloppy%, $(VBoxDD_SOURCES))
598 VBoxDD_SOURCES.solaris += \
599 Audio/solaudio.c \
600 Serial/DrvHostSerial.cpp
601 ifdef VBOX_WITH_SOLARIS_OSS
602 VBoxDD_SOURCES += Audio/ossaudio.c
603 VBoxDD_DEFS += VBOX_WITH_SOLARIS_OSS
604 endif
605 ifdef VBOX_WITH_SUID_WRAPPER
606 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
607 endif
608 endif
609
610 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
611 VBoxDD_SOURCES.win += \
612 Audio/dsoundaudio.c \
613 Serial/DrvHostSerial.cpp \
614 Parallel/DrvHostParallel.cpp
615
616 if defined(VBOX_WITH_NETFLT)
617 VBoxDD_DEFS += VBOX_WITH_NETFLT
618 if defined(VBOX_NETFLT_ONDEMAND_BIND)
619 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
620 endif
621 endif
622
623
624 # --- Final bits, mostly libraries for order dependant linkers. ---
625
626 VBoxDD_LIBS += \
627 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
628 $(LIB_VMM) \
629 $(LIB_RUNTIME)
630 ifeq ($(KBUILD_TARGET),win)
631 VBoxDD_LIBS += \
632 $(LIB_DDU) \
633 $(PATH_STAGE_LIB)/VBoxDD2.lib \
634 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
635 else
636 VBoxDD_LIBS += \
637 $(VBoxDDU_1_STAGE_TARGET) \
638 $(VBoxDD2_1_STAGE_TARGET)
639 endif
640
641 ifdef VBOX_WITH_NETFLT
642 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.lib
643 endif
644
645 ifeq ($(KBUILD_TARGET),solaris)
646 VBoxDD_LIBS += adm
647 ifdef VBOX_WITH_SUID_WRAPPER
648 VBoxDD_LIBS += secdb
649 endif
650 ifdef VBOX_WITH_USB
651 VBoxDD_LIBS += aio
652 endif
653 endif
654
655 VBoxDD_LIBS.darwin += \
656 $(LIB_REM)
657
658
659 ifdef VBOX_WITH_DYNAMIC_DSDT
660 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
661 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
662
663 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
664 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
665 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
666
667 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
668
669 else # !VBOX_WITH_DYNAMIC_DSDT
670 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
671 VBoxDD_CLEAN += \
672 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
673 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
674 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
675 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml \
676 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml.tmp \
677 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex \
678 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml \
679 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.tmp \
680 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.pre
681 PC/ACPI/VBoxAcpi.cpp_DEPS = \
682 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
683 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
684 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
685
686 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
687 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
688 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
689
690 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
691
692 $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
693 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
694 $(QUIET)$(RM) -f $@ [email protected]
695 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
696 $(QUIET)$(MV) -f $@ [email protected]
697 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtStandard/g" \
698 --output $@ [email protected]
699 $(QUIET)$(RM) -f [email protected]
700
701
702 vboxssdt-standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex
703
704 $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
705 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
706 $(QUIET)$(RM) -f $@ [email protected] [email protected]
707 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o [email protected] $<
708 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ [email protected]
709 $(QUIET)$(MV) -f $@ [email protected]
710 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtCpuHotPlug/g" \
711 --output $@ [email protected]
712 $(QUIET)$(RM) -f [email protected] [email protected]
713
714
715 vboxssdt-cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
716
717 endif # !VBOX_WITH_DYNAMIC_DSDT
718 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
719
720 # For finding PCIInternal.h from VBox/pci.h.
721 Bus/DevPCI.cpp_INCS = Bus
722 Bus/DevPciIch9.cpp_INCS = Bus
723 Bus/MsiCommon.cpp_INCS = Bus
724 Bus/MsixCommon.cpp_INCS = Bus
725 Bus/DevPciRaw.cpp_INCS = Bus
726
727 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
728 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR)
729 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
730
731
732 ifdef VBOX_WITH_RAW_MODE
733 #
734 # VBoxDDGC (sysmod)
735 #
736 VBoxDDGC_TEMPLATE = VBoxRc
737 ifeq ($(KBUILD_TARGET_ARCH),x86)
738 VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
739 endif
740 VBoxDDGC_DEFS = VBOX_WITH_HGCM
741 VBoxDDGC_INCS = build
742 VBoxDDGC_SOURCES = \
743 Audio/DevIchHda.cpp \
744 Bus/DevPCI.cpp \
745 Bus/DevPciIch9.cpp \
746 Bus/MsiCommon.cpp \
747 Bus/MsixCommon.cpp \
748 Graphics/DevVGA.cpp \
749 Input/DevPS2.cpp \
750 Input/PS2K.cpp \
751 PC/DevACPI.cpp \
752 PC/DevPit-i8254.cpp \
753 PC/DevPIC.cpp \
754 PC/DevRTC.cpp \
755 PC/DevHPET.cpp \
756 Storage/DevATA.cpp \
757 Network/DevPCNet.cpp \
758 Serial/DevSerial.cpp \
759 Parallel/DevParallel.cpp \
760 VMMDev/VMMDevTesting.cpp
761
762 ifdef VBOX_WITH_E1000
763 VBoxDDGC_DEFS += VBOX_WITH_E1000
764 VBoxDDGC_SOURCES += \
765 Network/DevE1000.cpp \
766 Network/DevE1000Phy.cpp
767 endif
768
769 ifdef VBOX_WITH_VIRTIO
770 VBoxDDGC_DEFS += VBOX_WITH_VIRTIO
771 VBoxDDGC_SOURCES += \
772 VirtIO/Virtio.cpp \
773 Network/DevVirtioNet.cpp
774 endif
775
776 ifdef VBOX_WITH_HGSMI
777 VBoxDDGC_DEFS += VBOX_WITH_HGSMI
778 endif
779 ifdef VBOX_WITH_WDDM
780 VBoxDDGC_DEFS += VBOX_WITH_WDDM
781 endif
782 ifdef VBOX_WITH_VDMA
783 VBoxDDGC_DEFS += VBOX_WITH_VDMA
784 endif
785 ifdef VBOX_WITH_CRHGSMI
786 VBoxDDGC_DEFS += VBOX_WITH_CRHGSMI
787 endif
788 ifdef VBOXWDDM_WITH_VBVA
789 VBoxDDGC_DEFS += VBOXWDDM_WITH_VBVA
790 endif
791 ifdef VBOX_VDMA_WITH_WATCHDOG
792 VBoxDDGC_DEFS += VBOX_VDMA_WITH_WATCHDOG
793 endif
794
795 ifdef VBOX_WITH_VUSB
796 VBoxDDGC_DEFS += VBOX_WITH_VUSB
797 VBoxDDGC_SOURCES += \
798 USB/DevOHCI.cpp
799 endif
800
801 ifdef VBOX_WITH_USB
802 VBoxDDGC_DEFS += VBOX_WITH_USB
803 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
804 VBoxDDGC_DEFS += VBOX_WITH_EHCI_IMPL
805 VBoxDDGC_SOURCES += \
806 USB/DevEHCI.cpp
807 endif
808 endif
809
810 ifdef VBOX_WITH_VIDEOHWACCEL
811 VBoxDDGC_DEFS += VBOX_WITH_VIDEOHWACCEL
812 endif
813
814 ifdef VBOX_WITH_AHCI
815 VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
816 VBoxDDGC_SOURCES += \
817 Storage/DevAHCI.cpp
818 endif
819
820 ifdef VBOX_WITH_BUSLOGIC
821 VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
822 VBoxDDGC_SOURCES += \
823 Storage/DevBusLogic.cpp
824 endif
825
826 ifdef VBOX_WITH_LSILOGIC
827 VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
828 VBoxDDGC_SOURCES += \
829 Storage/DevLsiLogicSCSI.cpp
830 endif
831
832 if1of ($(VBOX_LDR_FMT32), pe lx)
833 VBoxDDGC_LIBS = \
834 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
835 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
836 endif
837 endif # VBOX_WITH_RAW_MODE
838
839
840 #
841 # VBoxDD2 (shared object)
842 #
843 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
844 VBoxDD2_DEFS = IN_VBOXDD2
845 VBoxDD2_INCS := \
846 build \
847 $(PATH_SUB_CURRENT)
848 VBoxDD2_SOURCES = \
849 build/VBoxDD2.cpp \
850 PC/DevAPIC.cpp \
851 PC/DevIoApic.cpp \
852 PC/DevSMC.cpp \
853 PC/DevLPC.cpp
854 VBoxDD2_LIBS = \
855 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
856 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
857 $(if $(VBOX_WITH_PXE_ROM),$(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB),) \
858 $(LIB_VMM) \
859 $(LIB_RUNTIME)
860 VBoxDD2_LIBS.darwin += $(LIB_REM)
861 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
862 VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
863
864 ifdef VBOX_WITH_PXE_ROM
865 VBoxDD2_DEFS += VBOX_WITH_PXE_ROM
866 endif
867
868
869 #
870 # VBoxDDR0 (sysmod)
871 #
872 VBoxDDR0_TEMPLATE = VBoxR0
873 VBoxDDR0_DEFS.darwin.x86= VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
874 VBoxDDR0_DEFS = IN_RT_R0 VBOX_WITH_HGCM # - WTF is IN_RT_R0 doing here?
875 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
876 VBoxDDR0_INCS = build
877 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
878 VBoxDDR0_SOURCES = \
879 build/VBoxDDR0.cpp \
880 Audio/DevIchHda.cpp \
881 Bus/DevPCI.cpp \
882 Bus/DevPciIch9.cpp \
883 Bus/MsiCommon.cpp \
884 Bus/MsixCommon.cpp \
885 Graphics/DevVGA.cpp \
886 Input/DevPS2.cpp \
887 Input/PS2K.cpp \
888 PC/DevACPI.cpp \
889 PC/DevPit-i8254.cpp \
890 PC/DevPIC.cpp \
891 PC/DevRTC.cpp \
892 PC/DevHPET.cpp \
893 Storage/DevATA.cpp \
894 Network/DevPCNet.cpp \
895 Serial/DevSerial.cpp \
896 Parallel/DevParallel.cpp \
897 VMMDev/VMMDevTesting.cpp \
898 \
899 Network/DrvIntNet.cpp \
900 Network/DrvDedicatedNic.cpp
901
902 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
903
904 ifdef VBOX_WITH_E1000
905 VBoxDDR0_DEFS += VBOX_WITH_E1000
906 VBoxDDR0_SOURCES += \
907 Network/DevE1000.cpp \
908 Network/DevE1000Phy.cpp
909 endif
910
911 ifdef VBOX_WITH_VIRTIO
912 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
913 VBoxDDR0_SOURCES += \
914 VirtIO/Virtio.cpp \
915 Network/DevVirtioNet.cpp
916 endif
917
918 ifdef VBOX_WITH_NETSHAPER
919 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
920 VBoxDDR0_SOURCES += \
921 Network/DrvNetShaper.cpp
922 endif
923
924 ifdef VBOX_WITH_HGSMI
925 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
926 endif
927 ifdef VBOX_WITH_WDDM
928 VBoxDDR0_DEFS += VBOX_WITH_WDDM
929 endif
930 ifdef VBOX_WITH_VDMA
931 VBoxDDR0_DEFS += VBOX_WITH_VDMA
932 endif
933 ifdef VBOX_WITH_CRHGSMI
934 VBoxDDR0_DEFS += VBOX_WITH_CRHGSMI
935 endif
936 ifdef VBOXWDDM_WITH_VBVA
937 VBoxDDR0_DEFS += VBOXWDDM_WITH_VBVA
938 endif
939 ifdef VBOX_VDMA_WITH_WATCHDOG
940 VBoxDDR0_DEFS += VBOX_VDMA_WITH_WATCHDOG
941 endif
942
943 ifdef VBOX_WITH_VUSB
944 VBoxDDR0_DEFS += VBOX_WITH_VUSB
945 VBoxDDR0_SOURCES += \
946 USB/DevOHCI.cpp
947 endif
948 ifdef VBOX_WITH_USB
949 VBoxDDR0_DEFS += VBOX_WITH_USB
950 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
951 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
952 VBoxDDR0_SOURCES += \
953 USB/DevEHCI.cpp
954 endif
955 endif
956
957 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
958 VBoxDDR0_SOURCES += \
959 Bus/DevPciRaw.cpp
960 endif
961
962 ifdef VBOX_WITH_AHCI
963 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
964 VBoxDDR0_SOURCES += \
965 Storage/DevAHCI.cpp
966 endif
967
968 ifdef VBOX_WITH_BUSLOGIC
969 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
970 VBoxDDR0_SOURCES += \
971 Storage/DevBusLogic.cpp
972 endif
973
974 ifdef VBOX_WITH_LSILOGIC
975 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
976 VBoxDDR0_SOURCES += \
977 Storage/DevLsiLogicSCSI.cpp
978 endif
979
980 ifdef VBOX_WITH_HGSMI
981 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
982 endif
983 ifdef VBOX_WITH_VIDEOHWACCEL
984 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
985 endif
986
987 if1of ($(VBOX_LDR_FMT), pe lx)
988 VBoxDDR0_LIBS = \
989 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
990 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
991 endif
992
993
994 ifdef VBOX_WITH_RAW_MODE
995 #
996 # VBoxDD2GC (LGPL sysmod)
997 #
998 VBoxDD2GC_TEMPLATE = VBoxRc
999 VBoxDD2GC_DEFS =
1000 VBoxDD2GC_INCS = build
1001 VBoxDD2GC_SOURCES = \
1002 PC/DevAPIC.cpp \
1003 PC/DevIoApic.cpp \
1004 PC/DevSMC.cpp
1005 if1of ($(VBOX_LDR_FMT32), pe lx)
1006 VBoxDD2GC_LIBS = \
1007 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1008 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1009 endif
1010 endif
1011
1012
1013 #
1014 # VBoxDD2R0 (LGPL sysmod)
1015 #
1016 VBoxDD2R0_TEMPLATE = VBoxR0
1017 VBoxDD2R0_DEFS = IN_RT_R0
1018 VBoxDD2R0_INCS = build
1019 VBoxDD2R0_SOURCES = \
1020 build/VBoxDD2R0.cpp \
1021 PC/DevAPIC.cpp \
1022 PC/DevIoApic.cpp \
1023 PC/DevSMC.cpp
1024
1025 if1of ($(VBOX_LDR_FMT), pe lx)
1026 VBoxDD2R0_LIBS = \
1027 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1028 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1029 endif
1030
1031
1032 #
1033 # Ring-0 Services (library, linked into VMMR0.r0)
1034 #
1035 ServicesR0_TEMPLATE = VBoxR0
1036 ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1037 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1038 ServicesR0_SOURCES = \
1039 Network/SrvIntNetR0.cpp \
1040 $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1041 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1042
1043
1044 #
1045 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1046 #
1047 ifdef VBOX_WITH_TESTCASES
1048 PROGRAMS += tstIntNetR0
1049 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
1050 tstIntNetR0_DEFS = IN_INTNET_R0
1051 tstIntNetR0_SOURCES = \
1052 Network/testcase/tstIntNetR0.cpp
1053 ifneq ($(KBUILD_TARGET),win)
1054 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1055 endif
1056 endif
1057
1058
1059 #
1060 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1061 #
1062 ifdef VBOX_WITH_TESTCASES
1063 PROGRAMS += tstIntNet-1
1064 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
1065 tstIntNet-1_SOURCES = \
1066 Network/testcase/tstIntNet-1.cpp \
1067 Network/Pcap.cpp
1068 endif
1069
1070
1071 #
1072 # EEPROM device unit test requires cppunit
1073 #
1074 ifdef VBOX_WITH_CPPUNIT_TESTCASES
1075 ifdef VBOX_WITH_E1000
1076 PROGRAMS += tstDevEEPROM
1077 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1078 tstDevEEPROM_SOURCES = \
1079 Network/testcase/tstDevEEPROM.cpp
1080 tstDevEEPROM_LIBS = \
1081 $(TARGET_VBoxDD)
1082 PROGRAMS += tstDevPhy
1083 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1084 tstDevPhy_SOURCES = \
1085 Network/testcase/tstDevPhy.cpp \
1086 Network/DevE1000Phy.cpp
1087 tstDevPhy_DEFS = PHY_UNIT_TEST
1088 endif
1089 endif
1090
1091endif # !VBOX_ONLY_EXTPACKS
1092
1093
1094if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
1095 #
1096 # The EHCI (USB 2.0) Extension Pack Modules.
1097 #
1098 if defined(VBOX_WITH_USB)
1099 DLLS += VBoxEhciR3
1100 VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
1101 VBoxEhciR3_SOURCES = USB/DevEHCI.cpp
1102
1103 SYSMODS += VBoxEhciR0
1104 VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
1105 VBoxEhciR0_SOURCES = USB/DevEHCI.cpp
1106
1107 ifdef VBOX_WITH_RAW_MODE
1108 SYSMODS += VBoxEhciRC
1109 VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
1110 VBoxEhciRC_SOURCES = USB/DevEHCI.cpp
1111 endif
1112 endif
1113
1114 if defined(VBOX_WITH_PCI_PASSTHROUGH)
1115 DLLS += VBoxPciRawR3
1116 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1117 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1118
1119 DLLS += VBoxPciRawDrv
1120 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1121 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1122
1123 SYSMODS += VBoxPciRawR0
1124 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1125 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1126
1127 Bus/DevPciRaw.cpp_INCS = Bus
1128 endif
1129
1130
1131 #
1132 # The Intel PXE rom.
1133 #
1134 INSTALLS += VBoxExtPackPuelInsRoms
1135 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1136 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1137endif # VBOX_WITH_EXTPACK_PUEL
1138
1139include $(FILE_KBUILD_SUB_FOOTER)
1140
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