VirtualBox

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

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

BusLogic: initial commit

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 21.3 KB
Line 
1# $Id: Makefile.kmk 11410 2008-08-13 21:01:32Z 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
31ifndef VBOX_OSE # not yet
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 @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 @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_OSE),,$(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 @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
241DevicesR3_INCS := \
242 $(PATH_SUB_CURRENT)
243DevicesR3_SOURCES = \
244 Input/DevPS2.cpp \
245 Bus/DevPCI.cpp \
246 Graphics/DevVGA.cpp \
247 Storage/DevATA.cpp \
248 PC/DevPit-i8254.cpp \
249 PC/DevPIC.cpp \
250 PC/DevACPI.cpp \
251 PC/DevRTC.cpp \
252 PC/DevPcBios.cpp \
253 PC/DevPcArch.c \
254 VMMDev/VBoxDev.cpp \
255 VMMDev/VMMDevHGCM.cpp \
256 Network/DevPCNet.cpp \
257 Audio/DevIchAc97.cpp \
258 Audio/DevSB16.cpp \
259 PC/DevDMA.cpp \
260 Storage/fdc.c \
261 Serial/DevSerial.cpp \
262 Parallel/DevParallel.cpp
263
264ifdef VBOX_WITH_E1000
265 DevicesR3_DEFS += VBOX_WITH_E1000
266 DevicesR3_SOURCES += \
267 Network/DevE1000.cpp \
268 Network/DevE1000Phy.cpp \
269 Network/DevEEPROM.cpp
270endif
271
272ifndef VBOX_OSE
273DevicesR3_INCS += \
274 Network/lwip/src/include \
275 Network/lwip/src/include/ipv4 \
276 Network/lwip/vbox/include
277DevicesR3_SOURCES += \
278 Network/lwip/src/api/api_lib.c \
279 Network/lwip/src/api/api_msg.c \
280 Network/lwip/src/api/err.c \
281 Network/lwip/src/api/sockets.c \
282 Network/lwip/src/api/tcpip.c \
283 Network/lwip/src/core/tcp_in.c \
284 Network/lwip/src/core/dhcp.c \
285 Network/lwip/src/core/inet.c \
286 Network/lwip/src/core/mem.c \
287 Network/lwip/src/core/memp.c \
288 Network/lwip/src/core/netif.c \
289 Network/lwip/src/core/pbuf.c \
290 Network/lwip/src/core/raw.c \
291 Network/lwip/src/core/stats.c \
292 Network/lwip/src/core/sys.c \
293 Network/lwip/src/core/tcp.c \
294 Network/lwip/src/core/ipv4/ip_addr.c \
295 Network/lwip/src/core/ipv4/icmp.c \
296 Network/lwip/src/core/ipv4/ip.c \
297 Network/lwip/src/core/ipv4/ip_frag.c \
298 Network/lwip/src/core/tcp_out.c \
299 Network/lwip/src/core/udp.c \
300 Network/lwip/src/netif/etharp.c \
301 Network/lwip/vbox/sys_arch.c \
302 Network/DevINIP.cpp
303DevicesR3_DEFS += VBOX_WITH_INIP
304endif
305
306ifdef VBOX_WITH_AHCI
307DevicesR3_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
308DevicesR3_SOURCES += \
309 Storage/DevAHCI.cpp \
310 Storage/ATAController.cpp
311endif
312
313ifdef VBOX_WITH_BUSLOGIC
314DevicesR3_DEFS += VBOX_WITH_BUSLOGIC
315DevicesR3_SOURCES += \
316 Storage/DevBusLogic.cpp
317endif
318
319ifdef VBOX_WITH_USB
320DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
321
322DevicesR3_SOURCES += \
323 USB/DevOHCI.cpp
324
325 ifdef VBOX_WITH_EHCI
326 DevicesR3_DEFS += VBOX_WITH_EHCI
327 DevicesR3_SOURCES += \
328 USB/DevEHCI.cpp
329 endif
330
331endif
332
333DevicesR3_DEFS += VBOX_HGCM
334DevicesR3_DEFS.linux += _GNU_SOURCE
335DevicesR3_DEFS.l4 += _GNU_SOURCE
336
337# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl.
338DevicesR3_CLEAN += $(PATH_TARGET)/vboxaml.hex $(PATH_TARGET)/vboxaml.aml
339PC/DevACPI.cpp_DEPS = $(PATH_TARGET)/vboxaml.hex
340PC/DevACPI.cpp_INCS = $(PATH_TARGET)
341
342$(PATH_TARGET)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl
343 $(call MSG_TOOL,iasl,DevicesR3,$<,$@)
344 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
345
346# For finding PCIInternal.h from VBox/pci.h.
347Bus/DevPCI.cpp_INCS = Bus
348
349# For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
350Graphics/DevVGA.cpp_INCS = $(PATH_TARGET)
351Graphics/DevVGA.cpp_DEPS = $(PATH_TARGET)/vbetables.h
352
353
354
355#
356# VBoxDDGC (sysmod)
357#
358VBoxDDGC_TEMPLATE = VBOXGC
359VBoxDDGC_DEFS =
360VBoxDDGC_SYSSUFF = .gc
361VBoxDDGC_INCS := \
362 $(PATH_SUB_CURRENT)
363VBoxDDGC_SOURCES = \
364 Bus/DevPCI.cpp \
365 Graphics/DevVGA.cpp \
366 Input/DevPS2.cpp \
367 PC/DevACPI.cpp \
368 PC/DevPit-i8254.cpp \
369 PC/DevPIC.cpp \
370 PC/DevRTC.cpp \
371 Storage/DevATA.cpp \
372 Network/DevPCNet.cpp \
373 Serial/DevSerial.cpp \
374 Parallel/DevParallel.cpp
375
376ifdef VBOX_WITH_E1000
377 VBoxDDGC_DEFS += VBOX_WITH_E1000
378 VBoxDDGC_SOURCES += \
379 Network/DevE1000.cpp \
380 Network/DevE1000Phy.cpp
381endif
382
383ifdef VBOX_WITH_USB
384VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
385VBoxDDGC_SOURCES += \
386 USB/DevOHCI.cpp
387
388 ifdef VBOX_WITH_EHCI
389 VBoxDDGC_DEFS += VBOX_WITH_EHCI
390 VBoxDDGC_SOURCES += \
391 USB/DevEHCI.cpp
392 endif
393
394endif
395
396ifdef VBOX_WITH_AHCI
397VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
398VBoxDDGC_SOURCES += \
399 Storage/DevAHCI.cpp \
400 Storage/ATAController.cpp
401endif
402
403ifeq ($(VBOX_LDR_FMT32),pe)
404VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
405endif
406ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
407VBoxDDGC_LIBS = \
408 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
409 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
410endif
411
412
413#
414# VBoxDDR0 (sysmod)
415#
416VBoxDDR0_TEMPLATE = VBOXR0
417VBoxDDR0_SYSSUFF = .r0
418VBoxDDR0_DEFS = IN_RT_R0
419VBoxDDR0_INCS := \
420 $(PATH_SUB_CURRENT)
421VBoxDDR0_SOURCES = \
422 Bus/DevPCI.cpp \
423 Graphics/DevVGA.cpp \
424 Input/DevPS2.cpp \
425 PC/DevACPI.cpp \
426 PC/DevPit-i8254.cpp \
427 PC/DevPIC.cpp \
428 PC/DevRTC.cpp \
429 Storage/DevATA.cpp \
430 Network/DevPCNet.cpp \
431 Serial/DevSerial.cpp \
432 Parallel/DevParallel.cpp
433
434ifdef VBOX_WITH_E1000
435 VBoxDDR0_DEFS += VBOX_WITH_E1000
436 VBoxDDR0_SOURCES += \
437 Network/DevE1000.cpp \
438 Network/DevE1000Phy.cpp
439endif
440
441ifdef VBOX_WITH_USB
442VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
443VBoxDDR0_SOURCES += \
444 USB/DevOHCI.cpp
445
446 ifdef VBOX_WITH_EHCI
447 VBoxDDR0_DEFS += VBOX_WITH_EHCI
448 VBoxDDR0_SOURCES += \
449 USB/DevEHCI.cpp
450 endif
451endif
452
453ifdef VBOX_WITH_AHCI
454VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
455VBoxDDR0_SOURCES += \
456 Storage/DevAHCI.cpp \
457 Storage/ATAController.cpp
458endif
459
460ifeq ($(VBOX_LDR_FMT32),pe)
461VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
462endif
463ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
464VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
465endif
466VBoxDDR0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
467ifeq ($(VBOX_LDR_FMT32),elf) # this is template stuff!
468VBoxDDR0_LIBS += $(VBOX_GCC_LIBGCC)
469endif
470
471
472#
473# VBoxDD2GC (LGPL sysmod)
474#
475VBoxDD2GC_TEMPLATE = VBOXGC
476VBoxDD2GC_DEFS =
477VBoxDD2GC_SYSSUFF = .gc
478VBoxDD2GC_INCS := \
479 $(PATH_SUB_CURRENT)
480VBoxDD2GC_SOURCES = \
481 PC/DevAPIC.cpp
482ifeq ($(VBOX_LDR_FMT32),pe)
483VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
484endif
485ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
486VBoxDD2GC_LIBS = \
487 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
488 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
489endif
490
491
492#
493# VBoxDD2R0 (LGPL sysmod)
494#
495VBoxDD2R0_TEMPLATE = VBOXR0
496VBoxDD2R0_DEFS = IN_RT_R0
497VBoxDD2R0_SYSSUFF = .r0
498VBoxDD2R0_INCS := \
499 $(PATH_SUB_CURRENT)
500VBoxDD2R0_SOURCES = \
501 PC/DevAPIC.cpp
502ifeq ($(VBOX_LDR_FMT),pe)
503VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
504endif
505ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
506VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
507endif
508VBoxDD2R0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
509ifeq ($(VBOX_LDR_FMT),elf)
510VBoxDD2R0_LIBS += $(VBOX_GCC_LIBGCC)
511endif
512
513
514#
515# Drivers (library)
516#
517ifeq ($(KBUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
518Drivers_TEMPLATE = VBOXR3NP
519else
520Drivers_TEMPLATE = VBOXR3
521endif
522Drivers_SDKS.win = WINPSDK W2K3DDK
523Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
524Drivers_DEFS = IN_IDE_R3
525Drivers_DEFS.win += _WIN32_WINNT=0x0510
526Drivers_INCS := \
527 $(PATH_SUB_CURRENT) \
528 Network/slirp
529Drivers_SOURCES = \
530 Audio/audio.c \
531 Audio/audiosniffer.c \
532 Audio/mixeng.c \
533 Audio/noaudio.c \
534 Input/DrvKeyboardQueue.cpp \
535 Input/DrvMouseQueue.cpp \
536 Network/DrvIntNet.cpp \
537 PC/DrvACPI.cpp \
538 Serial/DrvChar.cpp \
539 Serial/DrvNamedPipe.cpp \
540 Storage/DrvBlock.cpp \
541 Storage/DrvHostBase.cpp \
542 Storage/DrvHostDVD.cpp \
543 Storage/DrvHostFloppy.cpp \
544 Storage/DrvMediaISO.cpp \
545 Storage/DrvRawImage.cpp \
546 Storage/DrvVD.cpp \
547 Storage/VBoxHDD.cpp \
548 Network/DrvNetSniffer.cpp \
549 Network/Pcap.cpp
550ifndef VBOX_USE_NAT
551Drivers_SOURCES += \
552 Network/DrvNAT.cpp \
553 Network/slirp/bootp.c \
554 Network/slirp/cksum.c \
555 Network/slirp/debug.c \
556 Network/slirp/if.c \
557 Network/slirp/ip_icmp.c \
558 Network/slirp/ip_input.c \
559 Network/slirp/ip_output.c \
560 Network/slirp/mbuf.c \
561 Network/slirp/misc.c \
562 Network/slirp/sbuf.c \
563 Network/slirp/slirp.c \
564 Network/slirp/socket.c \
565 Network/slirp/tcp_input.c \
566 Network/slirp/tcp_output.c \
567 Network/slirp/tcp_subr.c \
568 Network/slirp/tcp_timer.c \
569 Network/slirp/tftp.c \
570 Network/slirp/udp.c
571else
572NatAlias_TEMPLATE = VBOXR3NP
573
574
575Drivers_SOURCES += Network/DrvNAT.cpp
576
577Network/DrvNAT.cpp_DEFS += VBOX_NAT_SOURCES
578
579Drivers_SOURCES += Network/nat/nat_socket.c
580
581NatAlias_CFLAGS += -include Network/nat/bsd.h
582NatAlias_DEFS += VBOX_NAT_SOURCES
583NatAlias_DEFS += __BSD_VISIBLE
584NatAlias_DEFS += INET
585NatAlias_DEFS += IPFIREWALL_NAT
586NatAlias_DEFS += RWLOCK_NOINLINE
587NatAlias_DEFS += MUTEX_NOINLINE
588
589NatAlias_DEFS += IN_NAT # used in Network/nat/nat.h (which glues VBox and *BSD sources)
590
591NatAlias_DEFS.linux += _GNU_SOURCE
592
593NatAlias_SOURCES += Network/nat/nat_utils.c
594NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw_nat.c
595NatAlias_SOURCES += Network/nat/src/sys/netinet/in_cksum.c
596NatAlias_SOURCES += Network/nat/src/sys/kern/subr_eventhandler.c
597NatAlias_SOURCES += Network/nat/src/sys/kern/kern_mbuf.c
598NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf.c
599NatAlias_SOURCES += Network/nat/src/sys/vm/uma.c
600#NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw2.c
601NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias.c
602#NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_cuseeme.c
603NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_db.c
604NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_dummy.c
605#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_ftp.c
606#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_irc.c
607NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_mod.c
608#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_nbt.c
609#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_pptp.c
610#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_proxy.c
611#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_skinny.c
612#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_smedia.c
613NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_util.c
614NatAlias_SOURCES += Network/nat/src/common/lib/libc/gen/bswap16.c
615NatAlias_SOURCES += Network/nat/src/common/lib/libc/gen/bswap32.c
616NatAlias_SOURCES += Network/nat/src/common/lib/libc/gen/bswap64.c
617
618NatAlias_INCS += Network/nat/src/sys
619endif
620
621# -- OS specific --
622
623ifeq ($(KBUILD_TARGET),darwin)
624Drivers_SOURCES := $(filter-out \
625 Storage/DrvHostRaw% \
626 Storage/DrvHostFloppy% \
627 , $(Drivers_SOURCES)) \
628 Audio/coreaudio.c
629Drivers_SOURCES.darwin =
630endif # darwin
631
632ifeq ($(KBUILD_TARGET),freebsd)
633Drivers_SOURCES := $(filter-out \
634 Storage/DrvHost% \
635 , $(Drivers_SOURCES))
636Drivers_SOURCES.freebsd =
637endif # freebsd
638
639
640ifeq ($(KBUILD_TARGET),l4)
641Drivers_SOURCES = \
642 Input/DrvMouseQueue.cpp \
643 Input/DrvKeyboardQueue.cpp \
644 Storage/VBoxHDD.cpp \
645 Storage/DrvBlock.cpp \
646 Storage/DrvMediaISO.cpp \
647 Storage/DrvRawImage.cpp \
648 Storage/DrvHostBase.cpp \
649 Storage/DrvHostDVD.cpp \
650 Storage/DrvVD.cpp \
651 PC/DrvACPI.cpp \
652 Network/DrvIntNet.cpp \
653 Network/DrvNetSniffer.cpp \
654 Network/Pcap.cpp \
655 Audio/audio.c \
656 Audio/mixeng.c \
657 Audio/noaudio.c \
658 Audio/audiosniffer.c
659
660Drivers_SOURCES.l4 = \
661 Network/DrvTAP.cpp \
662 Audio/ossaudio.c
663endif # l4
664
665Drivers_SOURCES.linux = \
666 Network/DrvTAP.cpp \
667 Audio/ossaudio.c \
668 Parallel/DrvHostParallel.cpp \
669 Serial/DrvHostSerial.cpp
670
671ifeq ($(KBUILD_TARGET),os2)
672Drivers_SOURCES := $(filter-out \
673 Storage/DrvHost% \
674 , $(Drivers_SOURCES))
675Drivers_SOURCES.os2 = \
676 Network/DrvTAPOs2.cpp
677endif
678
679ifeq ($(KBUILD_TARGET),solaris)
680Drivers_SOURCES := $(filter-out \
681 Storage/DrvHost% \
682 , $(Drivers_SOURCES))
683Drivers_SOURCES.solaris = \
684 Audio/solaudio.c \
685 $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
686 Storage/DrvHostBase.cpp \
687 Storage/DrvHostDVD.cpp
688 ifdef VBOX_WITH_CROSSBOW
689 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
690 Drivers_DEFS += VBOX_WITH_CROSSBOW
691 endif
692 ifdef VBOX_WITH_SUID_WRAPPER
693 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
694 endif
695endif
696
697Drivers_SOURCES.win = \
698 Network/DrvTAPWin.cpp \
699 Audio/dsoundaudio.c \
700 Serial/DrvHostSerial.cpp
701
702
703# -- features --
704
705ifdef VBOX_WITH_ISCSI
706 Drivers_SOURCES += \
707 Storage/DrvISCSI.cpp \
708 Storage/DrvISCSITransportTCP.cpp
709 Drivers_DEFS += VBOX_WITH_ISCSI
710 Storage/DrvISCSITransportTCP.cpp_INCS = \
711 Network/lwip/src/include \
712 Network/lwip/src/include/ipv4 \
713 Network/lwip/vbox/include
714 VBoxDDU_SOURCES += \
715 Storage/ISCSIHDDCore.cpp
716 VBoxDDU_DEFS += VBOX_WITH_ISCSI
717endif # VBOX_WITH_ISCSI
718
719ifdef VBOX_WITH_ALSA
720 Drivers_DEFS.linux += VBOX_WITH_ALSA
721 Drivers_SOURCES.linux+= \
722 Audio/alsaaudio.c \
723 Audio/alsa_stubs.c
724# VBoxDD_LIBS.linux += asound
725endif
726
727ifdef VBOX_WITH_PULSE
728 Drivers_DEFS.linux += VBOX_WITH_PULSE
729 Drivers_SOURCES.linux+= \
730 Audio/pulseaudio.c \
731 Audio/pulse_stubs.c
732# VBoxDD_LIBS.linux += pulse
733endif
734
735ifdef VBOX_WITH_USB
736 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
737 Drivers_SOURCES += \
738 USB/DrvVUSBRootHub.cpp \
739 USB/VUSBDevice.cpp \
740 USB/VUSBUrb.cpp
741 ifdef VBOX_WITH_VRDP
742 Drivers_DEFS += VBOX_VRDP
743 Drivers_SOURCES += \
744 USB/vrdp/USBProxyDevice-vrdp.cpp
745 endif
746
747 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
748 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
749 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
750 endif
751 Drivers_SOURCES.darwin += \
752 USB/USBProxyDevice.cpp \
753 USB/darwin/USBProxyDevice-darwin.cpp
754
755 Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
756 ifdef VBOX_WITHOUT_LINUX_COMPILER_H
757 Drivers_DEFS.linux += VBOX_WITHOUT_LINUX_COMPILER_H
758 endif
759 Drivers_SOURCES.linux+= \
760 USB/USBProxyDevice.cpp \
761 USB/linux/USBProxyDevice-linux.cpp
762
763 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
764 Drivers_SOURCES.l4 += \
765 USB/USBProxyDevice.cpp \
766 USB/linux/USBProxyDevice-linux.cpp
767
768 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
769 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
770 Drivers_SOURCES.os2 += \
771 USB/USBProxyDevice.cpp \
772 USB/os2/USBProxyDevice-os2.cpp
773
774 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
775 Drivers_SOURCES.win += \
776 USB/USBProxyDevice.cpp \
777 USB/win/USBProxyDevice-win.cpp
778
779 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
780 Drivers_SOURCES.solaris += \
781 USB/USBProxyDevice.cpp \
782 USB/solaris/USBProxyDevice-solaris.cpp
783endif # VBOX_WITH_USB
784
785ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
786 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
787 Drivers_SOURCES += \
788 Storage/DrvRawImageAsync.cpp \
789 Storage/DrvTransportAsync.cpp
790endif #VBOX_WITH_PDM_ASYNC_COMPLETION
791
792#
793# Ring-0 Services (library, linked into VMMR0.r0)
794#
795ServicesR0_TEMPLATE = VBOXR0
796ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
797ServicesR0_SOURCES = \
798 Network/SrvIntNetR0.cpp
799
800#
801# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
802#
803ifdef VBOX_WITH_TESTCASES
804 PROGRAMS += tstIntNetR0
805 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
806 tstIntNetR0_DEFS = IN_INTNET_R0
807 tstIntNetR0_SOURCES = \
808 Network/testcase/tstIntNetR0.cpp
809endif
810
811#
812# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
813#
814ifdef VBOX_WITH_TESTCASES
815 PROGRAMS += tstIntNet-1
816 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
817 tstIntNet-1_SOURCES = \
818 Network/testcase/tstIntNet-1.cpp \
819 Network/Pcap.cpp
820endif
821
822
823#
824# EEPROM device unit test requires cppunit
825#
826ifdef VBOX_WITH_CPPUNIT_TESTCASES
827ifdef VBOX_WITH_E1000
828 PROGRAMS += tstDevEEPROM
829 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
830 tstDevEEPROM_SOURCES = \
831 Network/testcase/tstDevEEPROM.cpp
832 tstDevEEPROM_LIBS = \
833 $(TARGET_DevicesR3)
834 PROGRAMS += tstDevPhy
835 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
836 tstDevPhy_SOURCES = \
837 Network/testcase/tstDevPhy.cpp \
838 Network/DevE1000Phy.cpp
839 tstDevPhy_DEFS = PHY_UNIT_TEST
840endif
841endif
842
843include $(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