VirtualBox

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

Last change on this file since 12563 was 12551, checked in by vboxsync, 16 years ago

be more verbose when logging ATA/SCSI commands

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