VirtualBox

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

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

Merged VBOX_WITH_NETFLT_WINDOWS into VBOX_WITH_NETFLT. Made the GUIs, Main, Devices and HostDrivers use VBOX_WITH_NETFLT.

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