VirtualBox

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

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

VBOX_WITH_VMI

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 24.1 KB
Line 
1# $Id: Makefile.kmk 11825 2008-08-29 14:29:45Z 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 = IN_IDE_R3
538Drivers_DEFS.win += _WIN32_WINNT=0x0510
539Drivers_INCS := \
540 $(PATH_SUB_CURRENT) \
541 Network/slirp
542Drivers_SOURCES = \
543 Audio/audio.c \
544 Audio/audiosniffer.c \
545 Audio/mixeng.c \
546 Audio/noaudio.c \
547 Input/DrvKeyboardQueue.cpp \
548 Input/DrvMouseQueue.cpp \
549 Network/DrvIntNet.cpp \
550 PC/DrvACPI.cpp \
551 Serial/DrvChar.cpp \
552 Serial/DrvNamedPipe.cpp \
553 Storage/DrvBlock.cpp \
554 Storage/DrvHostBase.cpp \
555 Storage/DrvHostDVD.cpp \
556 Storage/DrvHostFloppy.cpp \
557 Storage/DrvMediaISO.cpp \
558 Storage/DrvRawImage.cpp \
559 Storage/DrvVD.cpp \
560 Storage/VBoxHDD.cpp \
561 Network/DrvNetSniffer.cpp \
562 Network/Pcap.cpp
563ifndef VBOX_USE_NAT
564Drivers_SOURCES += \
565 Network/DrvNAT.cpp \
566 Network/slirp/bootp.c \
567 Network/slirp/cksum.c \
568 Network/slirp/debug.c \
569 Network/slirp/if.c \
570 Network/slirp/ip_icmp.c \
571 Network/slirp/ip_input.c \
572 Network/slirp/ip_output.c \
573 Network/slirp/mbuf.c \
574 Network/slirp/misc.c \
575 Network/slirp/sbuf.c \
576 Network/slirp/slirp.c \
577 Network/slirp/socket.c \
578 Network/slirp/tcp_input.c \
579 Network/slirp/tcp_output.c \
580 Network/slirp/tcp_subr.c \
581 Network/slirp/tcp_timer.c \
582 Network/slirp/tftp.c \
583 Network/slirp/udp.c
584else
585NatAlias_TEMPLATE = VBOXR3NP
586
587
588Drivers_SOURCES += Network/DrvNAT.cpp
589
590Network/DrvNAT.cpp_DEFS += VBOX_NAT_SOURCES
591
592Drivers_SOURCES += Network/nat/nat_socket.c
593
594NatAlias_CFLAGS += -include Network/nat/bsd.h
595NatAlias_DEFS += VBOX_NAT_SOURCES
596NatAlias_DEFS += __BSD_VISIBLE=1
597NatAlias_DEFS += INET
598NatAlias_DEFS += IPFIREWALL_NAT
599NatAlias_DEFS += RWLOCK_NOINLINE
600NatAlias_DEFS += MUTEX_NOINLINE
601
602NatAlias_DEFS += IN_NAT # used in Network/nat/nat.h (which glues VBox and *BSD sources)
603
604NatAlias_DEFS.linux += _GNU_SOURCE
605
606NatAlias_SOURCES += Network/nat/nat_utils.c
607NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw_nat.c
608NatAlias_SOURCES += Network/nat/src/sys/netinet/in_cksum.c
609NatAlias_SOURCES += Network/nat/src/sys/net/if.c
610NatAlias_SOURCES += Network/nat/src/sys/net/if_ef.c
611NatAlias_SOURCES += Network/nat/src/sys/net/if_ethersubr.c
612NatAlias_SOURCES += Network/nat/src/sys/net/route.c
613NatAlias_SOURCES += Network/nat/src/sys/net/pfil.c
614NatAlias_SOURCES += Network/nat/src/sys/net/netisr.c
615NatAlias_SOURCES += Network/nat/src/sys/net/radix.c
616NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_options.c
617NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timewait.c
618NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timer.c
619NatAlias_SOURCES += Network/nat/src/sys/netinet/if_ether.c
620NatAlias_SOURCES += Network/nat/src/sys/netinet/in.c
621NatAlias_SOURCES += Network/nat/src/sys/netinet/in_pcb.c
622NatAlias_SOURCES += Network/nat/src/sys/netinet/in_proto.c
623NatAlias_SOURCES += Network/nat/src/sys/netinet/in_rmx.c
624NatAlias_SOURCES += Network/nat/src/sys/netinet/in_mcast.c
625NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_icmp.c
626NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fastfwd.c
627NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_output.c
628NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_input.c
629NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_mroute.c
630NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_id.c
631NatAlias_SOURCES += Network/nat/src/sys/netinet/raw_ip.c
632NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_syncache.c
633NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_sack.c
634NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_subr.c
635NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_input.c
636NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_output.c
637NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_reass.c
638NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_hostcache.c
639NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_usrreq.c
640NatAlias_SOURCES += Network/nat/src/sys/netinet/udp_usrreq.c
641NatAlias_SOURCES += Network/nat/src/sys/kern/subr_eventhandler.c
642NatAlias_SOURCES += Network/nat/src/sys/kern/kern_mbuf.c
643NatAlias_SOURCES += Network/nat/src/sys/kern/kern_subr.c
644NatAlias_SOURCES += Network/nat/src/sys/kern/kern_resource.c
645NatAlias_SOURCES += Network/nat/src/sys/kern/kern_time.c
646NatAlias_SOURCES += Network/nat/src/sys/kern/kern_clock.c
647#NatAlias_SOURCES += Network/nat/src/sys/kern/kern_timeout.c
648NatAlias_SOURCES += Network/nat/src/sys/kern/subr_sbuf.c
649NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf.c
650NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf2.c
651NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_sockbuf.c
652NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_socket.c
653NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_domain.c
654NatAlias_SOURCES += Network/nat/src/sys/vm/uma_core.c
655NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw2.c
656NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias.c
657#NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_cuseeme.c
658NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_db.c
659NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_dummy.c
660#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_ftp.c
661#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_irc.c
662NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_mod.c
663#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_nbt.c
664#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_pptp.c
665NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_proxy.c
666#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_skinny.c
667#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_smedia.c
668NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_util.c
669
670NatAlias_SOURCES.amd64 += Network/nat/src/sys/amd64/amd64/in_cksum.c
671
672NatAlias_INCS += Network/nat/src/sys
673NatAlias_INCS += Network/nat/src/sys/contrib/altq
674NatAlias_INCS.amd64 += Network/nat/src/sys/amd64/include
675endif
676
677# -- OS specific --
678
679ifeq ($(KBUILD_TARGET),darwin)
680Drivers_SOURCES := $(filter-out \
681 Storage/DrvHostRaw% \
682 Storage/DrvHostFloppy% \
683 , $(Drivers_SOURCES)) \
684 Audio/coreaudio.c
685Drivers_SOURCES.darwin =
686endif # darwin
687
688ifeq ($(KBUILD_TARGET),freebsd)
689Drivers_SOURCES := $(filter-out \
690 Storage/DrvHost% \
691 , $(Drivers_SOURCES))
692Drivers_SOURCES.freebsd =
693endif # freebsd
694
695
696ifeq ($(KBUILD_TARGET),l4)
697Drivers_SOURCES = \
698 Input/DrvMouseQueue.cpp \
699 Input/DrvKeyboardQueue.cpp \
700 Storage/VBoxHDD.cpp \
701 Storage/DrvBlock.cpp \
702 Storage/DrvMediaISO.cpp \
703 Storage/DrvRawImage.cpp \
704 Storage/DrvHostBase.cpp \
705 Storage/DrvHostDVD.cpp \
706 Storage/DrvVD.cpp \
707 PC/DrvACPI.cpp \
708 Network/DrvIntNet.cpp \
709 Network/DrvNetSniffer.cpp \
710 Network/Pcap.cpp \
711 Audio/audio.c \
712 Audio/mixeng.c \
713 Audio/noaudio.c \
714 Audio/audiosniffer.c
715
716Drivers_SOURCES.l4 = \
717 Network/DrvTAP.cpp \
718 Audio/ossaudio.c
719endif # l4
720
721Drivers_SOURCES.linux = \
722 Network/DrvTAP.cpp \
723 Audio/ossaudio.c \
724 Parallel/DrvHostParallel.cpp \
725 Serial/DrvHostSerial.cpp
726
727ifeq ($(KBUILD_TARGET),os2)
728Drivers_SOURCES := $(filter-out \
729 Storage/DrvHost% \
730 , $(Drivers_SOURCES))
731Drivers_SOURCES.os2 = \
732 Network/DrvTAPOs2.cpp
733endif
734
735ifeq ($(KBUILD_TARGET),solaris)
736Drivers_SOURCES := $(filter-out \
737 Storage/DrvHost% \
738 , $(Drivers_SOURCES))
739Drivers_SOURCES.solaris = \
740 Audio/solaudio.c \
741 $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
742 Storage/DrvHostBase.cpp \
743 Storage/DrvHostDVD.cpp
744 ifdef VBOX_WITH_CROSSBOW
745 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
746 Drivers_DEFS += VBOX_WITH_CROSSBOW
747 endif
748 ifdef VBOX_WITH_SUID_WRAPPER
749 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
750 endif
751endif
752
753Drivers_SOURCES.win = \
754 Network/DrvTAPWin.cpp \
755 Audio/dsoundaudio.c \
756 Serial/DrvHostSerial.cpp
757
758
759# -- features --
760
761ifdef VBOX_WITH_ISCSI
762 Drivers_SOURCES += \
763 Storage/DrvISCSI.cpp \
764 Storage/DrvISCSITransportTCP.cpp
765 Drivers_DEFS += VBOX_WITH_ISCSI
766 Storage/DrvISCSITransportTCP.cpp_INCS = \
767 Network/lwip/src/include \
768 Network/lwip/src/include/ipv4 \
769 Network/lwip/vbox/include
770 VBoxDDU_SOURCES += \
771 Storage/ISCSIHDDCore.cpp
772 VBoxDDU_DEFS += VBOX_WITH_ISCSI
773endif # VBOX_WITH_ISCSI
774
775ifdef VBOX_WITH_ALSA
776 Drivers_DEFS.linux += VBOX_WITH_ALSA
777 Drivers_SOURCES.linux+= \
778 Audio/alsaaudio.c \
779 Audio/alsa_stubs.c
780# VBoxDD_LIBS.linux += asound
781endif
782
783ifdef VBOX_WITH_PULSE
784 Drivers_DEFS.linux += VBOX_WITH_PULSE
785 Drivers_SOURCES.linux+= \
786 Audio/pulseaudio.c \
787 Audio/pulse_stubs.c
788# VBoxDD_LIBS.linux += pulse
789endif
790
791ifdef VBOX_WITH_USB
792 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
793 Drivers_SOURCES += \
794 USB/DrvVUSBRootHub.cpp \
795 USB/VUSBDevice.cpp \
796 USB/VUSBUrb.cpp
797 ifdef VBOX_WITH_VRDP
798 Drivers_DEFS += VBOX_WITH_VRDP
799 Drivers_SOURCES += \
800 USB/vrdp/USBProxyDevice-vrdp.cpp
801 endif
802
803 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
804 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
805 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
806 endif
807 Drivers_SOURCES.darwin += \
808 USB/USBProxyDevice.cpp \
809 USB/darwin/USBProxyDevice-darwin.cpp
810
811 Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
812 ifdef VBOX_WITHOUT_LINUX_COMPILER_H
813 Drivers_DEFS.linux += VBOX_WITHOUT_LINUX_COMPILER_H
814 endif
815 Drivers_SOURCES.linux+= \
816 USB/USBProxyDevice.cpp \
817 USB/linux/USBProxyDevice-linux.cpp
818
819 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
820 Drivers_SOURCES.l4 += \
821 USB/USBProxyDevice.cpp \
822 USB/linux/USBProxyDevice-linux.cpp
823
824 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
825 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
826 Drivers_SOURCES.os2 += \
827 USB/USBProxyDevice.cpp \
828 USB/os2/USBProxyDevice-os2.cpp
829
830 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
831 Drivers_SOURCES.win += \
832 USB/USBProxyDevice.cpp \
833 USB/win/USBProxyDevice-win.cpp
834
835 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
836 Drivers_SOURCES.solaris += \
837 USB/USBProxyDevice.cpp \
838 USB/solaris/USBProxyDevice-solaris.cpp
839endif # VBOX_WITH_USB
840
841ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
842 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
843 Drivers_SOURCES += \
844 Storage/DrvRawImageAsync.cpp \
845 Storage/DrvTransportAsync.cpp
846endif #VBOX_WITH_PDM_ASYNC_COMPLETION
847
848ifdef VBOX_WITH_BUSLOGIC
849 Drivers_DEFS += VBOX_WITH_BUSLOGIC
850 Drivers_SOURCES += \
851 Storage/DrvSCSI.cpp
852endif # VBOX_WITH_BUSLOGIC
853
854#
855# Ring-0 Services (library, linked into VMMR0.r0)
856#
857ServicesR0_TEMPLATE = VBOXR0
858ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
859ServicesR0_SOURCES = \
860 Network/SrvIntNetR0.cpp
861
862#
863# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
864#
865ifdef VBOX_WITH_TESTCASES
866 PROGRAMS += tstIntNetR0
867 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
868 tstIntNetR0_DEFS = IN_INTNET_R0
869 tstIntNetR0_SOURCES = \
870 Network/testcase/tstIntNetR0.cpp
871endif
872
873#
874# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
875#
876ifdef VBOX_WITH_TESTCASES
877 PROGRAMS += tstIntNet-1
878 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
879 tstIntNet-1_SOURCES = \
880 Network/testcase/tstIntNet-1.cpp \
881 Network/Pcap.cpp
882endif
883
884
885#
886# EEPROM device unit test requires cppunit
887#
888ifdef VBOX_WITH_CPPUNIT_TESTCASES
889ifdef VBOX_WITH_E1000
890 PROGRAMS += tstDevEEPROM
891 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
892 tstDevEEPROM_SOURCES = \
893 Network/testcase/tstDevEEPROM.cpp
894 tstDevEEPROM_LIBS = \
895 $(TARGET_DevicesR3)
896 PROGRAMS += tstDevPhy
897 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
898 tstDevPhy_SOURCES = \
899 Network/testcase/tstDevPhy.cpp \
900 Network/DevE1000Phy.cpp
901 tstDevPhy_DEFS = PHY_UNIT_TEST
902endif
903endif
904
905include $(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