VirtualBox

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

Last change on this file since 10229 was 10200, checked in by vboxsync, 17 years ago

Moved the VBOX_WITH_PDM_LOCK and VBOX_WITH_INTERNAL_NETWORKING defines up to Config.kmk because global DEFS anywhere else messes up dependencies.

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