VirtualBox

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

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

initial implementation of i386 version of IP checksum calculation

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