VirtualBox

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

Last change on this file since 14740 was 14711, checked in by vboxsync, 16 years ago

Devices/USB and Main: use hal and sysfs for Linux USB (currently disabled)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 26.2 KB
Line 
1# $Id: Makefile.kmk 14711 2008-11-27 15:16:52Z vboxsync $
2## @file
3# Top-level makefile for the devices, drivers and services.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25# temporary, we will remove this in some days
26VBOX_WITH_BSD_REASS = 1
27
28VBOX_PATH_DEVICES_SRC := $(PATH_SUB_CURRENT)
29
30# Include sub-makefiles.
31include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
32ifdef VBOX_WITH_VMI
33 include $(PATH_SUB_CURRENT)/PC/VMI/Makefile.kmk
34endif
35include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
36include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
37include $(PATH_SUB_CURRENT)/Storage/testcase/Makefile.kmk
38ifndef VBOX_OSE
39 include $(PATH_SUB_CURRENT)/Storage/VBoxHDDFormats/Makefile.kmk
40endif
41ifdef VBOX_WITH_INTEL_PXE
42 include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
43else
44 # Subdir with complex makefile.
45 SUBDIRS_LIBRARIES += $(VBOX_PATH_DEVICES_SRC)/PC/Etherboot-src
46 SUBDIRS_CLEAN += $(VBOX_PATH_DEVICES_SRC)/PC/Etherboot-src
47 # Disable the unsafe pass order optimizations.
48 KBUILD_SAFE_PARALLEL = 1
49endif
50
51#
52# Main targets.
53#
54LIBRARIES += DevicesR3 Drivers ServicesR0
55ifdef VBOX_USE_NAT
56LIBRARIES += NatAlias
57endif
58DLLS += VBoxDDU VBoxDD VBoxDD2
59SYSMODS += VBoxDDGC VBoxDD2GC VBoxDDR0 VBoxDD2R0
60
61
62#
63# VBoxDDU (shared object)
64#
65VBoxDDU_TEMPLATE = VBOXR3
66VBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
67VBoxDDU_DEFS = IN_VBOXDDU
68ifdef VBOX_WITH_USB
69 VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
70 VBoxDDU_SDKS.win = WINPSDK W2K3DDK
71 ifdef VBOX_WITH_EHCI
72 VBoxDDU_DEFS += VBOX_WITH_EHCI
73 endif
74 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
75 VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
76 endif
77else
78 VBoxDDU_SDKS.win = WINPSDK
79endif
80VBoxDDU_SOURCES = \
81 Storage/VBoxHDD-new.cpp \
82 Storage/VDICore.cpp \
83 Storage/VDIHDDCore.cpp \
84 Storage/VHDHDDCore.cpp \
85 Storage/VmdkHDDCore.cpp \
86 Storage/RawHDDCore.cpp \
87 VBoxDDUDeps.cpp
88ifdef VBOX_WITH_USB
89 VBoxDDU_INCS.os2 += \
90 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
91endif
92VBoxDDU_LIBS = \
93 $(LIB_RUNTIME)
94ifdef VBOX_WITH_USB
95 VBoxDDU_LIBS += \
96 $(PATH_LIB)/USBLib$(VBOX_SUFF_LIB)
97endif
98ifeq ($(KBUILD_TARGET),l4)
99 VBoxDDU_LIBS += \
100 $(L4_LIBDIR)/libl4sys.p.a
101endif
102VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
103ifdef VBOX_WITH_USB
104 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
105 VBoxDDU_LDFLAGS.darwin += -framework IOKit
106 endif
107endif
108
109VBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
110VBoxDDU_LDFLAGS.l4 = -Wl,--no-undefined
111
112#
113# VBoxDDULnxHostR3 (Only needed for l4, currently for executing vditool on L4Linux.)
114#
115ifeq ($(KBUILD_TARGET),l4)
116 LIBRARIES += VBoxDDULnxHostR3
117 VBoxDDULnxHostR3_TEMPLATE = VBOXLNXHOSTR3LIB
118 VBoxDDULnxHostR3_DEFS = IN_VBOXDDU
119 VBoxDDULnxHostR3_SOURCES = $(VBoxDDU_SOURCES)
120endif
121
122#
123# VBoxDD (shared object)
124#
125VBoxDD_TEMPLATE = VBOXR3
126VBoxDD_SDKS.win = WINPSDK DXSDK W2K3DDK VBOX_NTDLL
127VBoxDD_SOURCES = \
128 Builtins.cpp
129VBoxDD_DEFS = VBOX_ACPI
130ifdef VBOX_WITH_USB
131 VBoxDD_DEFS += VBOX_WITH_USB IN_USB_R3
132 ifdef VBOX_WITH_EHCI
133 VBoxDD_DEFS += VBOX_WITH_EHCI
134 endif
135endif
136ifdef VBOX_WITH_AHCI
137 VBoxDD_DEFS += VBOX_WITH_AHCI
138endif
139ifdef VBOX_WITH_ISCSI
140 VBoxDD_DEFS += VBOX_WITH_ISCSI
141endif
142ifdef VBOX_WITH_E1000
143 VBoxDD_DEFS += VBOX_WITH_E1000
144endif
145ifdef VBOX_WITH_BUSLOGIC
146 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
147endif
148ifndef VBOX_OSE
149 VBoxDD_DEFS += VBOX_WITH_INIP
150endif
151ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
152 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
153endif
154ifdef VBOX_WITH_SCSI
155 VBoxDD_DEFS += VBOX_WITH_SCSI
156endif
157ifdef VBOX_WITH_LSILOGIC
158 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
159endif
160VBoxDD_LIBS = \
161 $(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
162 $(PATH_LIB)/Drivers$(VBOX_SUFF_LIB) \
163 $(PATH_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
164 $(LIB_VMM) \
165 $(LIB_RUNTIME)
166ifeq ($(KBUILD_TARGET),win)
167 VBoxDD_LIBS += \
168 $(LIB_DDU) \
169 $(PATH_LIB)/VBoxDD2.lib \
170 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
171else
172 VBoxDD_LIBS += \
173 $(INSTARGET_VBoxDDU) \
174 $(INSTARGET_VBoxDD2)
175endif
176ifeq ($(KBUILD_TARGET),l4)
177 VBoxDD_LIBS += \
178 $(L4_LIBDIR)/libl4sys.p.a
179endif
180
181ifdef VBOX_USE_NAT
182VBoxDD_LIBS += $(PATH_LIB)/NatAlias$(VBOX_SUFF_LIB)
183endif
184
185ifdef VBOX_WITH_NETFLT
186VBoxDD_LIBS.win += $(PATH_LIB)/WinNetConfig.lib
187endif
188
189ifeq ($(KBUILD_TARGET),solaris)
190 VBoxDD_LIBS += adm
191 ifdef VBOX_WITH_SUID_WRAPPER
192 VBoxDD_LIBS += secdb
193 endif
194 ifdef VBOX_WITH_USB
195 VBoxDD_LIBS += aio
196 endif
197endif
198VBoxDD_LIBS.darwin += \
199 $(LIB_REM)
200VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \
201 -framework CoreAudio \
202 -framework IOKit \
203 -framework Carbon \
204 -framework DiskArbitration
205VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
206VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
207
208#
209# VBoxDD2 (shared object)
210#
211VBoxDD2_TEMPLATE = VBOXR3
212VBoxDD2_DEFS = IN_VBOXDD2 \
213 $(if $(VBOX_WITH_VMI),VBOX_WITH_VMI,)
214VBoxDD2_INCS := \
215 $(PATH_SUB_CURRENT)
216VBoxDD2_SOURCES = \
217 Builtins2.cpp \
218 PC/DevAPIC.cpp
219VBoxDD2_LIBS = \
220 $(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
221 $(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
222 $(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB) \
223 $(if $(VBOX_WITH_VMI),$(PATH_LIB)/VmiBiosBin$(VBOX_SUFF_LIB)) \
224 $(LIB_VMM) \
225 $(LIB_RUNTIME)
226ifeq ($(KBUILD_TARGET),l4)
227VBoxDD2_LIBS += \
228 $(L4_LIBDIR)/libl4sys.p.a
229endif
230VBoxDD2_LIBS.darwin += $(LIB_REM)
231VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
232VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
233VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
234
235
236#
237# DevicesR3 (library)
238#
239DevicesR3_TEMPLATE = VBOXR3
240DevicesR3_SDKS.win = WINPSDK W2K3DDK
241DevicesR3_DEFS += VBOX_HGCM_HOST_CODE \
242 $(if $(VBOX_WITH_VMI),VBOX_WITH_VMI,)
243DevicesR3_INCS := \
244 $(PATH_SUB_CURRENT)
245DevicesR3_SOURCES = \
246 Input/DevPS2.cpp \
247 Bus/DevPCI.cpp \
248 Graphics/DevVGA.cpp \
249 Storage/DevATA.cpp \
250 PC/DevPit-i8254.cpp \
251 PC/DevPIC.cpp \
252 PC/DevACPI.cpp \
253 PC/DevRTC.cpp \
254 PC/DevPcBios.cpp \
255 PC/DevPcArch.c \
256 VMMDev/VBoxDev.cpp \
257 VMMDev/VMMDevHGCM.cpp \
258 Network/DevPCNet.cpp \
259 Audio/DevIchAc97.cpp \
260 Audio/DevSB16.cpp \
261 PC/DevDMA.cpp \
262 Storage/fdc.c \
263 Storage/Debug.cpp \
264 Serial/DevSerial.cpp \
265 Parallel/DevParallel.cpp
266
267ifdef VBOX_WITH_E1000
268 DevicesR3_DEFS += VBOX_WITH_E1000
269 DevicesR3_SOURCES += \
270 Network/DevE1000.cpp \
271 Network/DevE1000Phy.cpp \
272 Network/DevEEPROM.cpp
273endif
274
275ifndef VBOX_OSE
276DevicesR3_INCS += \
277 Network/lwip/src/include \
278 Network/lwip/src/include/ipv4 \
279 Network/lwip/vbox/include
280DevicesR3_SOURCES += \
281 Network/lwip/src/api/api_lib.c \
282 Network/lwip/src/api/api_msg.c \
283 Network/lwip/src/api/err.c \
284 Network/lwip/src/api/sockets.c \
285 Network/lwip/src/api/tcpip.c \
286 Network/lwip/src/core/tcp_in.c \
287 Network/lwip/src/core/dhcp.c \
288 Network/lwip/src/core/inet.c \
289 Network/lwip/src/core/mem.c \
290 Network/lwip/src/core/memp.c \
291 Network/lwip/src/core/netif.c \
292 Network/lwip/src/core/pbuf.c \
293 Network/lwip/src/core/raw.c \
294 Network/lwip/src/core/stats.c \
295 Network/lwip/src/core/sys.c \
296 Network/lwip/src/core/tcp.c \
297 Network/lwip/src/core/ipv4/ip_addr.c \
298 Network/lwip/src/core/ipv4/icmp.c \
299 Network/lwip/src/core/ipv4/ip.c \
300 Network/lwip/src/core/ipv4/ip_frag.c \
301 Network/lwip/src/core/tcp_out.c \
302 Network/lwip/src/core/udp.c \
303 Network/lwip/src/netif/etharp.c \
304 Network/lwip/vbox/sys_arch.c \
305 Network/DevINIP.cpp
306DevicesR3_DEFS += VBOX_WITH_INIP
307endif
308
309ifdef VBOX_WITH_AHCI
310DevicesR3_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
311DevicesR3_SOURCES += \
312 Storage/DevAHCI.cpp \
313 Storage/ATAController.cpp
314endif
315
316ifdef VBOX_WITH_BUSLOGIC
317DevicesR3_DEFS += VBOX_WITH_BUSLOGIC
318DevicesR3_SOURCES += \
319 Storage/DevBusLogic.cpp \
320 Storage/VBoxSCSI.cpp
321endif
322
323ifdef VBOX_WITH_LSILOGIC
324DevicesR3_DEFS += VBOX_WITH_LSILOGIC
325DevicesR3_SOURCES += \
326 Storage/DevLsiLogicSCSI.cpp
327endif
328
329ifdef VBOX_WITH_USB
330DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
331
332DevicesR3_SOURCES += \
333 USB/DevOHCI.cpp
334
335 ifdef VBOX_WITH_EHCI
336 DevicesR3_DEFS += VBOX_WITH_EHCI
337 DevicesR3_SOURCES += \
338 USB/DevEHCI.cpp
339 endif
340
341endif
342
343DevicesR3_DEFS += VBOX_WITH_HGCM
344DevicesR3_DEFS.linux += _GNU_SOURCE
345DevicesR3_DEFS.l4 += _GNU_SOURCE
346
347# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl. (bird: What's vboxaml.aml?)
348DevicesR3_CLEAN += $(PATH_DevicesR3)/vboxaml.hex $(PATH_DevicesR3)/vboxaml.aml
349PC/DevACPI.cpp_DEPS = $(PATH_DevicesR3)/vboxaml.hex
350PC/DevACPI.cpp_INCS = $(PATH_DevicesR3)
351
352$$(PATH_DevicesR3)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
353 $(call MSG_TOOL,iasl,DevicesR3,$<,$@)
354 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
355
356# For finding PCIInternal.h from VBox/pci.h.
357Bus/DevPCI.cpp_INCS = Bus
358
359# For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
360Graphics/DevVGA.cpp_INCS = $(PATH_VgaBiosBin)
361Graphics/DevVGA.cpp_DEPS = $(PATH_VgaBiosBin)/vbetables.h
362
363
364
365#
366# VBoxDDGC (sysmod)
367#
368VBoxDDGC_TEMPLATE = VBOXGC
369VBoxDDGC_DEFS =
370VBoxDDGC_SYSSUFF = .gc
371VBoxDDGC_INCS := \
372 $(PATH_SUB_CURRENT)
373VBoxDDGC_SOURCES = \
374 Bus/DevPCI.cpp \
375 Graphics/DevVGA.cpp \
376 Input/DevPS2.cpp \
377 PC/DevACPI.cpp \
378 PC/DevPit-i8254.cpp \
379 PC/DevPIC.cpp \
380 PC/DevRTC.cpp \
381 Storage/DevATA.cpp \
382 Network/DevPCNet.cpp \
383 Serial/DevSerial.cpp \
384 Parallel/DevParallel.cpp
385
386ifdef VBOX_WITH_E1000
387 VBoxDDGC_DEFS += VBOX_WITH_E1000
388 VBoxDDGC_SOURCES += \
389 Network/DevE1000.cpp \
390 Network/DevE1000Phy.cpp
391endif
392
393ifdef VBOX_WITH_USB
394VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
395VBoxDDGC_SOURCES += \
396 USB/DevOHCI.cpp
397
398 ifdef VBOX_WITH_EHCI
399 VBoxDDGC_DEFS += VBOX_WITH_EHCI
400 VBoxDDGC_SOURCES += \
401 USB/DevEHCI.cpp
402 endif
403
404endif
405
406ifdef VBOX_WITH_AHCI
407VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
408VBoxDDGC_SOURCES += \
409 Storage/DevAHCI.cpp \
410 Storage/ATAController.cpp
411endif
412
413ifdef VBOX_WITH_BUSLOGIC
414VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
415VBoxDDGC_SOURCES += \
416 Storage/DevBusLogic.cpp
417endif
418
419ifdef VBOX_WITH_LSILOGIC
420VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
421VBoxDDGC_SOURCES += \
422 Storage/DevLsiLogicSCSI.cpp
423endif
424
425ifeq ($(VBOX_LDR_FMT32),pe)
426VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
427endif
428if1of ($(VBOX_LDR_FMT32), pe lx)
429VBoxDDGC_LIBS = \
430 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
431 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
432endif
433
434
435#
436# VBoxDDR0 (sysmod)
437#
438VBoxDDR0_TEMPLATE = VBOXR0
439VBoxDDR0_SYSSUFF = .r0
440VBoxDDR0_DEFS = IN_RT_R0
441VBoxDDR0_INCS := \
442 $(PATH_SUB_CURRENT)
443VBoxDDR0_SOURCES = \
444 Bus/DevPCI.cpp \
445 Graphics/DevVGA.cpp \
446 Input/DevPS2.cpp \
447 PC/DevACPI.cpp \
448 PC/DevPit-i8254.cpp \
449 PC/DevPIC.cpp \
450 PC/DevRTC.cpp \
451 Storage/DevATA.cpp \
452 Network/DevPCNet.cpp \
453 Serial/DevSerial.cpp \
454 Parallel/DevParallel.cpp
455
456ifdef VBOX_WITH_E1000
457 VBoxDDR0_DEFS += VBOX_WITH_E1000
458 VBoxDDR0_SOURCES += \
459 Network/DevE1000.cpp \
460 Network/DevE1000Phy.cpp
461endif
462
463ifdef VBOX_WITH_USB
464VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
465VBoxDDR0_SOURCES += \
466 USB/DevOHCI.cpp
467
468 ifdef VBOX_WITH_EHCI
469 VBoxDDR0_DEFS += VBOX_WITH_EHCI
470 VBoxDDR0_SOURCES += \
471 USB/DevEHCI.cpp
472 endif
473endif
474
475ifdef VBOX_WITH_AHCI
476VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
477VBoxDDR0_SOURCES += \
478 Storage/DevAHCI.cpp \
479 Storage/ATAController.cpp
480endif
481
482ifdef VBOX_WITH_BUSLOGIC
483VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
484VBoxDDR0_SOURCES += \
485 Storage/DevBusLogic.cpp
486endif
487
488ifdef VBOX_WITH_LSILOGIC
489VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
490VBoxDDR0_SOURCES += \
491 Storage/DevLsiLogicSCSI.cpp
492endif
493
494ifeq ($(VBOX_LDR_FMT32),pe)
495VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
496endif
497if1of ($(VBOX_LDR_FMT), pe lx)
498VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
499endif
500
501
502#
503# VBoxDD2GC (LGPL sysmod)
504#
505VBoxDD2GC_TEMPLATE = VBOXGC
506VBoxDD2GC_DEFS =
507VBoxDD2GC_SYSSUFF = .gc
508VBoxDD2GC_INCS := \
509 $(PATH_SUB_CURRENT)
510VBoxDD2GC_SOURCES = \
511 PC/DevAPIC.cpp
512ifeq ($(VBOX_LDR_FMT32),pe)
513VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
514endif
515if1of ($(VBOX_LDR_FMT32), pe lx)
516VBoxDD2GC_LIBS = \
517 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
518 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
519endif
520
521
522#
523# VBoxDD2R0 (LGPL sysmod)
524#
525VBoxDD2R0_TEMPLATE = VBOXR0
526VBoxDD2R0_DEFS = IN_RT_R0
527VBoxDD2R0_SYSSUFF = .r0
528VBoxDD2R0_INCS := \
529 $(PATH_SUB_CURRENT)
530VBoxDD2R0_SOURCES = \
531 PC/DevAPIC.cpp
532ifeq ($(VBOX_LDR_FMT),pe)
533VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
534endif
535if1of ($(VBOX_LDR_FMT), pe lx)
536VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
537endif
538
539
540#
541# Drivers (library)
542#
543ifeq ($(KBUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
544Drivers_TEMPLATE = VBOXR3NP
545else
546Drivers_TEMPLATE = VBOXR3
547endif
548Drivers_SDKS.win = WINPSDK W2K3DDK
549Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
550Drivers_DEFS.win += _WIN32_WINNT=0x0510
551Drivers_DEFS = IN_IDE_R3
552ifdef VBOX_WITH_NETFLT
553Drivers_DEFS += VBOX_WITH_NETFLT
554endif
555Drivers_INCS := \
556 $(PATH_SUB_CURRENT) \
557 Network/slirp
558Drivers_SOURCES = \
559 Audio/audio.c \
560 Audio/audiosniffer.c \
561 Audio/mixeng.c \
562 Audio/noaudio.c \
563 Input/DrvKeyboardQueue.cpp \
564 Input/DrvMouseQueue.cpp \
565 Network/DrvIntNet.cpp \
566 PC/DrvACPI.cpp \
567 Serial/DrvChar.cpp \
568 Serial/DrvNamedPipe.cpp \
569 Storage/DrvBlock.cpp \
570 Storage/DrvHostBase.cpp \
571 Storage/DrvHostDVD.cpp \
572 Storage/DrvHostFloppy.cpp \
573 Storage/DrvMediaISO.cpp \
574 Storage/DrvRawImage.cpp \
575 Storage/DrvVD.cpp \
576 Storage/VBoxHDD.cpp \
577 Network/DrvNetSniffer.cpp \
578 Network/Pcap.cpp
579ifndef VBOX_USE_NAT
580VBOX_SLIRP_SOURCES = \
581 Network/DrvNAT.cpp \
582 Network/slirp/bootp.c \
583 Network/slirp/cksum.c \
584 Network/slirp/debug.c \
585 Network/slirp/if.c \
586 Network/slirp/ip_icmp.c \
587 Network/slirp/ip_input.c \
588 Network/slirp/ip_output.c \
589 Network/slirp/mbuf.c \
590 Network/slirp/misc.c \
591 Network/slirp/sbuf.c \
592 Network/slirp/slirp.c \
593 Network/slirp/socket.c \
594 Network/slirp/tcp_input.c \
595 Network/slirp/tcp_output.c \
596 Network/slirp/tcp_subr.c \
597 Network/slirp/tcp_timer.c \
598 Network/slirp/tftp.c \
599 Network/slirp/udp.c
600Drivers_SOURCES += $(VBOX_SLIRP_SOURCES)
601 define def_vbox_slirp_cflags
602 $(file)_DEFS += \
603 VBOX_WITH_SIMPLIFIED_SLIRP_SYNC \
604 $(if $(VBOX_WITH_BSD_REASS),VBOX_WITH_BSD_REASS,) \
605 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),VBOX_WITH_SLIRP_MEMORY_CHECK,) \
606 $(if $(VBOX_WITH_SLIRP_ICMP),VBOX_WITH_SLIRP_ICMP,)
607 ifeq ($(KBUILD_TARGET),win)
608 $(file)_CFLAGS = -wd4018
609 else
610 $(file)_CFLAGS = -Wno-sign-compare
611 endif
612 endef
613 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(def_vbox_slirp_cflags)))
614else
615
616NatAlias_TEMPLATE = VBOXR3NP
617Drivers_SOURCES += Network/DrvNAT.cpp
618Network/DrvNAT.cpp_DEFS += VBOX_NAT_SOURCES
619Network/nat/src/sys/net/if_clone.c_CFLAGS.linux += -std=c99
620
621Drivers_SOURCES += Network/nat/nat_socket.c
622
623NatAlias_CFLAGS += -include Network/nat/bsd.h
624#NatAlias_CFLAGS += -Werror -Wall -Wno-unused -Wno-pointer-sign
625NatAlias_DEFS += VBOX_NAT_SOURCES
626NatAlias_DEFS += __BSD_VISIBLE=1
627NatAlias_DEFS += INET
628NatAlias_DEFS += IPFIREWALL_NAT
629NatAlias_DEFS += RWLOCK_NOINLINE
630NatAlias_DEFS += MUTEX_NOINLINE
631NatAlias_DEFS += IPFIREWALL_FORWARD
632NatAlias_DEFS += IPFIREWALL
633NatAlias_DEFS += IPFIREWALL_DEFAULT_TO_ACCEPT
634
635NatAlias_DEFS += IN_NAT # used in Network/nat/nat.h (which glues VBox and *BSD sources)
636
637NatAlias_DEFS.linux += _GNU_SOURCE
638
639NatAlias_SOURCES += Network/nat/nat_utils.c
640NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw_nat.c
641NatAlias_SOURCES += Network/nat/src/sys/netinet/in_cksum.c
642NatAlias_SOURCES += Network/nat/src/sys/net/if.c
643NatAlias_SOURCES += Network/nat/src/sys/net/if_clone.c
644NatAlias_SOURCES += Network/nat/src/sys/net/bpf.c
645NatAlias_SOURCES += Network/nat/src/sys/net/if_loop.c
646NatAlias_SOURCES += Network/nat/src/sys/net/if_ef.c
647NatAlias_SOURCES += Network/nat/src/sys/net/if_ethersubr.c
648NatAlias_SOURCES += Network/nat/src/sys/net/route.c
649NatAlias_SOURCES += Network/nat/src/sys/net/pfil.c
650NatAlias_SOURCES += Network/nat/src/sys/net/netisr.c
651NatAlias_SOURCES += Network/nat/src/sys/net/radix.c
652NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_options.c
653NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timewait.c
654NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timer.c
655NatAlias_SOURCES += Network/nat/src/sys/netinet/if_ether.c
656NatAlias_SOURCES += Network/nat/src/sys/netinet/in.c
657NatAlias_SOURCES += Network/nat/src/sys/netinet/in_pcb.c
658NatAlias_SOURCES += Network/nat/src/sys/netinet/in_proto.c
659NatAlias_SOURCES += Network/nat/src/sys/netinet/in_rmx.c
660NatAlias_SOURCES += Network/nat/src/sys/netinet/in_mcast.c
661NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_icmp.c
662NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fastfwd.c
663NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_output.c
664NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_input.c
665NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_mroute.c
666NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_id.c
667NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_divert.c
668NatAlias_SOURCES += Network/nat/src/sys/netinet/raw_ip.c
669NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_syncache.c
670NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_sack.c
671NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_subr.c
672NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_input.c
673NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_output.c
674NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_reass.c
675NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_hostcache.c
676NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_usrreq.c
677NatAlias_SOURCES += Network/nat/src/sys/netinet/udp_usrreq.c
678NatAlias_SOURCES += Network/nat/src/sys/kern/subr_eventhandler.c
679NatAlias_SOURCES += Network/nat/src/sys/kern/kern_mbuf.c
680NatAlias_SOURCES += Network/nat/src/sys/kern/kern_subr.c
681NatAlias_SOURCES += Network/nat/src/sys/kern/kern_resource.c
682NatAlias_SOURCES += Network/nat/src/sys/kern/kern_time.c
683NatAlias_SOURCES += Network/nat/src/sys/kern/kern_clock.c
684#NatAlias_SOURCES += Network/nat/src/sys/kern/kern_timeout.c
685NatAlias_SOURCES += Network/nat/src/sys/kern/subr_sbuf.c
686NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf.c
687NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf2.c
688NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_sockbuf.c
689NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_socket.c
690NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_domain.c
691NatAlias_SOURCES += Network/nat/src/sys/vm/uma_core.c
692NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw2.c
693NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw_pfil.c
694NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias.c
695#NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_cuseeme.c
696NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_db.c
697NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_dummy.c
698#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_ftp.c
699#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_irc.c
700NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_mod.c
701#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_nbt.c
702#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_pptp.c
703NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_proxy.c
704#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_skinny.c
705#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_smedia.c
706NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_util.c
707
708NatAlias_SOURCES.amd64 += Network/nat/src/sys/amd64/amd64/in_cksum.c
709NatAlias_SOURCES.x86 += Network/nat/src/sys/i386/i386/in_cksum.c
710
711NatAlias_INCS += Network/nat
712NatAlias_INCS += Network/nat/src/sys
713NatAlias_INCS += Network/nat/src/sys/contrib/altq
714NatAlias_INCS.amd64 += Network/nat/src/sys/amd64/include
715NatAlias_INCS.x86 += Network/nat/src/sys/i386/include
716endif
717
718# -- OS specific --
719
720ifeq ($(KBUILD_TARGET),darwin)
721Drivers_SOURCES := $(filter-out \
722 Storage/DrvHostRaw% \
723 Storage/DrvHostFloppy% \
724 , $(Drivers_SOURCES)) \
725 Audio/coreaudio.c
726Drivers_SOURCES.darwin = \
727 Serial/DrvHostSerial.cpp
728endif # darwin
729
730ifeq ($(KBUILD_TARGET),freebsd)
731Drivers_SOURCES := $(filter-out \
732 Storage/DrvHost% \
733 , $(Drivers_SOURCES))
734Drivers_SOURCES.freebsd =
735endif # freebsd
736
737
738ifeq ($(KBUILD_TARGET),l4)
739Drivers_SOURCES = \
740 Input/DrvMouseQueue.cpp \
741 Input/DrvKeyboardQueue.cpp \
742 Storage/VBoxHDD.cpp \
743 Storage/DrvBlock.cpp \
744 Storage/DrvMediaISO.cpp \
745 Storage/DrvRawImage.cpp \
746 Storage/DrvHostBase.cpp \
747 Storage/DrvHostDVD.cpp \
748 Storage/DrvVD.cpp \
749 PC/DrvACPI.cpp \
750 Network/DrvIntNet.cpp \
751 Network/DrvNetSniffer.cpp \
752 Network/Pcap.cpp \
753 Audio/audio.c \
754 Audio/mixeng.c \
755 Audio/noaudio.c \
756 Audio/audiosniffer.c
757
758Drivers_SOURCES.l4 = \
759 Network/DrvTAP.cpp \
760 Audio/ossaudio.c
761endif # l4
762
763Drivers_SOURCES.linux = \
764 Network/DrvTAP.cpp \
765 Audio/ossaudio.c \
766 Parallel/DrvHostParallel.cpp \
767 Serial/DrvHostSerial.cpp
768
769ifeq ($(KBUILD_TARGET),os2)
770Drivers_SOURCES := $(filter-out \
771 Storage/DrvHost% \
772 , $(Drivers_SOURCES))
773Drivers_SOURCES.os2 = \
774 Network/DrvTAPOs2.cpp
775endif
776
777ifeq ($(KBUILD_TARGET),solaris)
778Drivers_SOURCES := $(filter-out \
779 Storage/DrvHost% \
780 , $(Drivers_SOURCES))
781Drivers_SOURCES.solaris = \
782 Audio/solaudio.c \
783 $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
784 Storage/DrvHostBase.cpp \
785 Storage/DrvHostDVD.cpp
786 ifdef VBOX_WITH_CROSSBOW
787 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
788 Drivers_DEFS += VBOX_WITH_CROSSBOW
789 endif
790 ifdef VBOX_WITH_SUID_WRAPPER
791 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
792 endif
793endif
794
795Drivers_SOURCES.win = \
796 Network/DrvTAPWin.cpp \
797 Audio/dsoundaudio.c \
798 Serial/DrvHostSerial.cpp
799
800if defined(VBOX_WITH_NETFLT)
801 if defined(VBOX_NETFLT_ONDEMAND_BIND)
802 Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
803 endif
804 Drivers_SOURCES.win += Network/win/DrvIntNet-win.cpp
805endif
806
807# -- features --
808
809ifdef VBOX_WITH_ISCSI
810 Drivers_SOURCES += \
811 Storage/DrvISCSI.cpp \
812 Storage/DrvISCSITransportTCP.cpp
813 Drivers_DEFS += VBOX_WITH_ISCSI
814 Storage/DrvISCSITransportTCP.cpp_INCS = \
815 Network/lwip/src/include \
816 Network/lwip/src/include/ipv4 \
817 Network/lwip/vbox/include
818 VBoxDDU_SOURCES += \
819 Storage/ISCSIHDDCore.cpp
820 VBoxDDU_DEFS += VBOX_WITH_ISCSI
821 Storage/DrvVD.cpp_INCS = \
822 Network/lwip/src/include \
823 Network/lwip/src/include/ipv4 \
824 Network/lwip/vbox/include
825endif # VBOX_WITH_ISCSI
826
827ifdef VBOX_WITH_ALSA
828 Drivers_DEFS.linux += VBOX_WITH_ALSA
829 Drivers_SOURCES.linux+= \
830 Audio/alsaaudio.c \
831 Audio/alsa_stubs.c
832# VBoxDD_LIBS.linux += asound
833endif
834
835ifdef VBOX_WITH_PULSE
836 Drivers_DEFS.linux += VBOX_WITH_PULSE
837 Drivers_SOURCES.linux+= \
838 Audio/pulseaudio.c \
839 Audio/pulse_stubs.c
840# VBoxDD_LIBS.linux += pulse
841endif
842
843ifdef VBOX_WITH_USB
844 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
845 Drivers_SOURCES += \
846 USB/DrvVUSBRootHub.cpp \
847 USB/VUSBDevice.cpp \
848 USB/VUSBUrb.cpp
849 ifdef VBOX_WITH_VRDP
850 Drivers_DEFS += VBOX_WITH_VRDP
851 Drivers_SOURCES += \
852 USB/vrdp/USBProxyDevice-vrdp.cpp
853 endif
854
855 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
856 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
857 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
858 endif
859 Drivers_SOURCES.darwin += \
860 USB/USBProxyDevice.cpp \
861 USB/darwin/USBProxyDevice-darwin.cpp
862
863 Drivers_DEFS.linux += \
864 VUSB_HAVE_USBPROXY_DEVICE \
865 $(if $(VBOX_WITHOUT_LINUX_COMPILER_H),VBOX_WITHOUT_LINUX_COMPILER_H,) \
866 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
867 Drivers_SOURCES.linux += \
868 USB/USBProxyDevice.cpp \
869 USB/linux/USBProxyDevice-linux.cpp
870
871 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
872 Drivers_SOURCES.l4 += \
873 USB/USBProxyDevice.cpp \
874 USB/linux/USBProxyDevice-linux.cpp
875
876 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
877 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
878 Drivers_SOURCES.os2 += \
879 USB/USBProxyDevice.cpp \
880 USB/os2/USBProxyDevice-os2.cpp
881
882 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
883 Drivers_SOURCES.win += \
884 USB/USBProxyDevice.cpp \
885 USB/win/USBProxyDevice-win.cpp
886
887 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
888 Drivers_SOURCES.solaris += \
889 USB/USBProxyDevice.cpp \
890 USB/solaris/USBProxyDevice-solaris.cpp
891endif # VBOX_WITH_USB
892
893ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
894 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
895 Drivers_SOURCES += \
896 Storage/DrvRawImageAsync.cpp \
897 Storage/DrvTransportAsync.cpp
898endif #VBOX_WITH_PDM_ASYNC_COMPLETION
899
900ifdef VBOX_WITH_SCSI
901 Drivers_DEFS += VBOX_WITH_SCSI
902 Drivers_SOURCES += \
903 Storage/DrvSCSI.cpp
904 Drivers_SOURCES.linux += \
905 Storage/DrvSCSIHost.cpp
906endif # VBOX_WITH_SCSI
907
908#
909# Ring-0 Services (library, linked into VMMR0.r0)
910#
911ServicesR0_TEMPLATE = VBOXR0
912ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
913ServicesR0_SOURCES = \
914 Network/SrvIntNetR0.cpp
915
916if defined(VBOX_WITH_NETFLT)
917 ServicesR0_SOURCES.win.amd64 += Network/win/SrvIntNetR0A-win.asm
918 ServicesR0_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
919endif
920
921
922#
923# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
924#
925ifdef VBOX_WITH_TESTCASES
926 PROGRAMS += tstIntNetR0
927 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
928 tstIntNetR0_DEFS = IN_INTNET_R0
929 tstIntNetR0_SOURCES = \
930 Network/testcase/tstIntNetR0.cpp
931endif
932
933#
934# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
935#
936ifdef VBOX_WITH_TESTCASES
937 PROGRAMS += tstIntNet-1
938 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
939 tstIntNet-1_SOURCES = \
940 Network/testcase/tstIntNet-1.cpp \
941 Network/Pcap.cpp
942endif
943
944
945#
946# EEPROM device unit test requires cppunit
947#
948ifdef VBOX_WITH_CPPUNIT_TESTCASES
949ifdef VBOX_WITH_E1000
950 PROGRAMS += tstDevEEPROM
951 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
952 tstDevEEPROM_SOURCES = \
953 Network/testcase/tstDevEEPROM.cpp
954 tstDevEEPROM_LIBS = \
955 $(TARGET_DevicesR3)
956 PROGRAMS += tstDevPhy
957 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
958 tstDevPhy_SOURCES = \
959 Network/testcase/tstDevPhy.cpp \
960 Network/DevE1000Phy.cpp
961 tstDevPhy_DEFS = PHY_UNIT_TEST
962endif
963endif
964
965include $(KBUILD_PATH)/subfooter.kmk
966
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