VirtualBox

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

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

build fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 24.1 KB
Line 
1# $Id: Makefile.kmk 11821 2008-08-29 14:18:24Z 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 $(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_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 $(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
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_WITH_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
403ifdef VBOX_WITH_BUSLOGIC
404VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
405VBoxDDGC_SOURCES += \
406 Storage/DevBusLogic.cpp
407endif
408
409ifeq ($(VBOX_LDR_FMT32),pe)
410VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
411endif
412ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
413VBoxDDGC_LIBS = \
414 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
415 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
416endif
417
418
419#
420# VBoxDDR0 (sysmod)
421#
422VBoxDDR0_TEMPLATE = VBOXR0
423VBoxDDR0_SYSSUFF = .r0
424VBoxDDR0_DEFS = IN_RT_R0
425VBoxDDR0_INCS := \
426 $(PATH_SUB_CURRENT)
427VBoxDDR0_SOURCES = \
428 Bus/DevPCI.cpp \
429 Graphics/DevVGA.cpp \
430 Input/DevPS2.cpp \
431 PC/DevACPI.cpp \
432 PC/DevPit-i8254.cpp \
433 PC/DevPIC.cpp \
434 PC/DevRTC.cpp \
435 Storage/DevATA.cpp \
436 Network/DevPCNet.cpp \
437 Serial/DevSerial.cpp \
438 Parallel/DevParallel.cpp
439
440ifdef VBOX_WITH_E1000
441 VBoxDDR0_DEFS += VBOX_WITH_E1000
442 VBoxDDR0_SOURCES += \
443 Network/DevE1000.cpp \
444 Network/DevE1000Phy.cpp
445endif
446
447ifdef VBOX_WITH_USB
448VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
449VBoxDDR0_SOURCES += \
450 USB/DevOHCI.cpp
451
452 ifdef VBOX_WITH_EHCI
453 VBoxDDR0_DEFS += VBOX_WITH_EHCI
454 VBoxDDR0_SOURCES += \
455 USB/DevEHCI.cpp
456 endif
457endif
458
459ifdef VBOX_WITH_AHCI
460VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
461VBoxDDR0_SOURCES += \
462 Storage/DevAHCI.cpp \
463 Storage/ATAController.cpp
464endif
465
466ifdef VBOX_WITH_BUSLOGIC
467VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
468VBoxDDR0_SOURCES += \
469 Storage/DevBusLogic.cpp
470endif
471
472ifeq ($(VBOX_LDR_FMT32),pe)
473VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
474endif
475ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
476VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
477endif
478VBoxDDR0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
479ifeq ($(VBOX_LDR_FMT32),elf) # this is template stuff!
480VBoxDDR0_LIBS += $(VBOX_GCC_LIBGCC)
481endif
482
483
484#
485# VBoxDD2GC (LGPL sysmod)
486#
487VBoxDD2GC_TEMPLATE = VBOXGC
488VBoxDD2GC_DEFS =
489VBoxDD2GC_SYSSUFF = .gc
490VBoxDD2GC_INCS := \
491 $(PATH_SUB_CURRENT)
492VBoxDD2GC_SOURCES = \
493 PC/DevAPIC.cpp
494ifeq ($(VBOX_LDR_FMT32),pe)
495VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
496endif
497ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
498VBoxDD2GC_LIBS = \
499 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
500 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
501endif
502
503
504#
505# VBoxDD2R0 (LGPL sysmod)
506#
507VBoxDD2R0_TEMPLATE = VBOXR0
508VBoxDD2R0_DEFS = IN_RT_R0
509VBoxDD2R0_SYSSUFF = .r0
510VBoxDD2R0_INCS := \
511 $(PATH_SUB_CURRENT)
512VBoxDD2R0_SOURCES = \
513 PC/DevAPIC.cpp
514ifeq ($(VBOX_LDR_FMT),pe)
515VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
516endif
517ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
518VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
519endif
520VBoxDD2R0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
521ifeq ($(VBOX_LDR_FMT),elf)
522VBoxDD2R0_LIBS += $(VBOX_GCC_LIBGCC)
523endif
524
525
526#
527# Drivers (library)
528#
529ifeq ($(KBUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
530Drivers_TEMPLATE = VBOXR3NP
531else
532Drivers_TEMPLATE = VBOXR3
533endif
534Drivers_SDKS.win = WINPSDK W2K3DDK
535Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
536Drivers_DEFS = IN_IDE_R3
537Drivers_DEFS.win += _WIN32_WINNT=0x0510
538Drivers_INCS := \
539 $(PATH_SUB_CURRENT) \
540 Network/slirp
541Drivers_SOURCES = \
542 Audio/audio.c \
543 Audio/audiosniffer.c \
544 Audio/mixeng.c \
545 Audio/noaudio.c \
546 Input/DrvKeyboardQueue.cpp \
547 Input/DrvMouseQueue.cpp \
548 Network/DrvIntNet.cpp \
549 PC/DrvACPI.cpp \
550 Serial/DrvChar.cpp \
551 Serial/DrvNamedPipe.cpp \
552 Storage/DrvBlock.cpp \
553 Storage/DrvHostBase.cpp \
554 Storage/DrvHostDVD.cpp \
555 Storage/DrvHostFloppy.cpp \
556 Storage/DrvMediaISO.cpp \
557 Storage/DrvRawImage.cpp \
558 Storage/DrvVD.cpp \
559 Storage/VBoxHDD.cpp \
560 Network/DrvNetSniffer.cpp \
561 Network/Pcap.cpp
562ifndef VBOX_USE_NAT
563Drivers_SOURCES += \
564 Network/DrvNAT.cpp \
565 Network/slirp/bootp.c \
566 Network/slirp/cksum.c \
567 Network/slirp/debug.c \
568 Network/slirp/if.c \
569 Network/slirp/ip_icmp.c \
570 Network/slirp/ip_input.c \
571 Network/slirp/ip_output.c \
572 Network/slirp/mbuf.c \
573 Network/slirp/misc.c \
574 Network/slirp/sbuf.c \
575 Network/slirp/slirp.c \
576 Network/slirp/socket.c \
577 Network/slirp/tcp_input.c \
578 Network/slirp/tcp_output.c \
579 Network/slirp/tcp_subr.c \
580 Network/slirp/tcp_timer.c \
581 Network/slirp/tftp.c \
582 Network/slirp/udp.c
583else
584NatAlias_TEMPLATE = VBOXR3NP
585
586
587Drivers_SOURCES += Network/DrvNAT.cpp
588
589Network/DrvNAT.cpp_DEFS += VBOX_NAT_SOURCES
590
591Drivers_SOURCES += Network/nat/nat_socket.c
592
593NatAlias_CFLAGS += -include Network/nat/bsd.h
594NatAlias_DEFS += VBOX_NAT_SOURCES
595NatAlias_DEFS += __BSD_VISIBLE=1
596NatAlias_DEFS += INET
597NatAlias_DEFS += IPFIREWALL_NAT
598NatAlias_DEFS += RWLOCK_NOINLINE
599NatAlias_DEFS += MUTEX_NOINLINE
600
601NatAlias_DEFS += IN_NAT # used in Network/nat/nat.h (which glues VBox and *BSD sources)
602
603NatAlias_DEFS.linux += _GNU_SOURCE
604
605NatAlias_SOURCES += Network/nat/nat_utils.c
606NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw_nat.c
607NatAlias_SOURCES += Network/nat/src/sys/netinet/in_cksum.c
608NatAlias_SOURCES += Network/nat/src/sys/net/if.c
609NatAlias_SOURCES += Network/nat/src/sys/net/if_ef.c
610NatAlias_SOURCES += Network/nat/src/sys/net/if_ethersubr.c
611NatAlias_SOURCES += Network/nat/src/sys/net/route.c
612NatAlias_SOURCES += Network/nat/src/sys/net/pfil.c
613NatAlias_SOURCES += Network/nat/src/sys/net/netisr.c
614NatAlias_SOURCES += Network/nat/src/sys/net/radix.c
615NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_options.c
616NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timewait.c
617NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timer.c
618NatAlias_SOURCES += Network/nat/src/sys/netinet/if_ether.c
619NatAlias_SOURCES += Network/nat/src/sys/netinet/in.c
620NatAlias_SOURCES += Network/nat/src/sys/netinet/in_pcb.c
621NatAlias_SOURCES += Network/nat/src/sys/netinet/in_proto.c
622NatAlias_SOURCES += Network/nat/src/sys/netinet/in_rmx.c
623NatAlias_SOURCES += Network/nat/src/sys/netinet/in_mcast.c
624NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_icmp.c
625NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fastfwd.c
626NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_output.c
627NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_input.c
628NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_mroute.c
629NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_id.c
630NatAlias_SOURCES += Network/nat/src/sys/netinet/raw_ip.c
631NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_syncache.c
632NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_sack.c
633NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_subr.c
634NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_input.c
635NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_output.c
636NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_reass.c
637NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_hostcache.c
638NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_usrreq.c
639NatAlias_SOURCES += Network/nat/src/sys/netinet/udp_usrreq.c
640NatAlias_SOURCES += Network/nat/src/sys/kern/subr_eventhandler.c
641NatAlias_SOURCES += Network/nat/src/sys/kern/kern_mbuf.c
642NatAlias_SOURCES += Network/nat/src/sys/kern/kern_subr.c
643NatAlias_SOURCES += Network/nat/src/sys/kern/kern_resource.c
644NatAlias_SOURCES += Network/nat/src/sys/kern/kern_time.c
645NatAlias_SOURCES += Network/nat/src/sys/kern/kern_clock.c
646#NatAlias_SOURCES += Network/nat/src/sys/kern/kern_timeout.c
647NatAlias_SOURCES += Network/nat/src/sys/kern/subr_sbuf.c
648NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf.c
649NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf2.c
650NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_sockbuf.c
651NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_socket.c
652NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_domain.c
653NatAlias_SOURCES += Network/nat/src/sys/vm/uma_core.c
654NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw2.c
655NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias.c
656#NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_cuseeme.c
657NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_db.c
658NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_dummy.c
659#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_ftp.c
660#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_irc.c
661NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_mod.c
662#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_nbt.c
663#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_pptp.c
664NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_proxy.c
665#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_skinny.c
666#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_smedia.c
667NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_util.c
668
669NatAlias_SOURCES.amd64 += Network/nat/src/sys/amd64/amd64/in_cksum.c
670
671NatAlias_INCS += Network/nat/src/sys
672NatAlias_INCS += Network/nat/src/sys/contrib/altq
673NatAlias_INCS.amd64 += Network/nat/src/sys/amd64/include
674endif
675
676# -- OS specific --
677
678ifeq ($(KBUILD_TARGET),darwin)
679Drivers_SOURCES := $(filter-out \
680 Storage/DrvHostRaw% \
681 Storage/DrvHostFloppy% \
682 , $(Drivers_SOURCES)) \
683 Audio/coreaudio.c
684Drivers_SOURCES.darwin =
685endif # darwin
686
687ifeq ($(KBUILD_TARGET),freebsd)
688Drivers_SOURCES := $(filter-out \
689 Storage/DrvHost% \
690 , $(Drivers_SOURCES))
691Drivers_SOURCES.freebsd =
692endif # freebsd
693
694
695ifeq ($(KBUILD_TARGET),l4)
696Drivers_SOURCES = \
697 Input/DrvMouseQueue.cpp \
698 Input/DrvKeyboardQueue.cpp \
699 Storage/VBoxHDD.cpp \
700 Storage/DrvBlock.cpp \
701 Storage/DrvMediaISO.cpp \
702 Storage/DrvRawImage.cpp \
703 Storage/DrvHostBase.cpp \
704 Storage/DrvHostDVD.cpp \
705 Storage/DrvVD.cpp \
706 PC/DrvACPI.cpp \
707 Network/DrvIntNet.cpp \
708 Network/DrvNetSniffer.cpp \
709 Network/Pcap.cpp \
710 Audio/audio.c \
711 Audio/mixeng.c \
712 Audio/noaudio.c \
713 Audio/audiosniffer.c
714
715Drivers_SOURCES.l4 = \
716 Network/DrvTAP.cpp \
717 Audio/ossaudio.c
718endif # l4
719
720Drivers_SOURCES.linux = \
721 Network/DrvTAP.cpp \
722 Audio/ossaudio.c \
723 Parallel/DrvHostParallel.cpp \
724 Serial/DrvHostSerial.cpp
725
726ifeq ($(KBUILD_TARGET),os2)
727Drivers_SOURCES := $(filter-out \
728 Storage/DrvHost% \
729 , $(Drivers_SOURCES))
730Drivers_SOURCES.os2 = \
731 Network/DrvTAPOs2.cpp
732endif
733
734ifeq ($(KBUILD_TARGET),solaris)
735Drivers_SOURCES := $(filter-out \
736 Storage/DrvHost% \
737 , $(Drivers_SOURCES))
738Drivers_SOURCES.solaris = \
739 Audio/solaudio.c \
740 $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
741 Storage/DrvHostBase.cpp \
742 Storage/DrvHostDVD.cpp
743 ifdef VBOX_WITH_CROSSBOW
744 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
745 Drivers_DEFS += VBOX_WITH_CROSSBOW
746 endif
747 ifdef VBOX_WITH_SUID_WRAPPER
748 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
749 endif
750endif
751
752Drivers_SOURCES.win = \
753 Network/DrvTAPWin.cpp \
754 Audio/dsoundaudio.c \
755 Serial/DrvHostSerial.cpp
756
757
758# -- features --
759
760ifdef VBOX_WITH_ISCSI
761 Drivers_SOURCES += \
762 Storage/DrvISCSI.cpp \
763 Storage/DrvISCSITransportTCP.cpp
764 Drivers_DEFS += VBOX_WITH_ISCSI
765 Storage/DrvISCSITransportTCP.cpp_INCS = \
766 Network/lwip/src/include \
767 Network/lwip/src/include/ipv4 \
768 Network/lwip/vbox/include
769 VBoxDDU_SOURCES += \
770 Storage/ISCSIHDDCore.cpp
771 VBoxDDU_DEFS += VBOX_WITH_ISCSI
772endif # VBOX_WITH_ISCSI
773
774ifdef VBOX_WITH_ALSA
775 Drivers_DEFS.linux += VBOX_WITH_ALSA
776 Drivers_SOURCES.linux+= \
777 Audio/alsaaudio.c \
778 Audio/alsa_stubs.c
779# VBoxDD_LIBS.linux += asound
780endif
781
782ifdef VBOX_WITH_PULSE
783 Drivers_DEFS.linux += VBOX_WITH_PULSE
784 Drivers_SOURCES.linux+= \
785 Audio/pulseaudio.c \
786 Audio/pulse_stubs.c
787# VBoxDD_LIBS.linux += pulse
788endif
789
790ifdef VBOX_WITH_USB
791 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
792 Drivers_SOURCES += \
793 USB/DrvVUSBRootHub.cpp \
794 USB/VUSBDevice.cpp \
795 USB/VUSBUrb.cpp
796 ifdef VBOX_WITH_VRDP
797 Drivers_DEFS += VBOX_WITH_VRDP
798 Drivers_SOURCES += \
799 USB/vrdp/USBProxyDevice-vrdp.cpp
800 endif
801
802 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
803 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
804 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
805 endif
806 Drivers_SOURCES.darwin += \
807 USB/USBProxyDevice.cpp \
808 USB/darwin/USBProxyDevice-darwin.cpp
809
810 Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
811 ifdef VBOX_WITHOUT_LINUX_COMPILER_H
812 Drivers_DEFS.linux += VBOX_WITHOUT_LINUX_COMPILER_H
813 endif
814 Drivers_SOURCES.linux+= \
815 USB/USBProxyDevice.cpp \
816 USB/linux/USBProxyDevice-linux.cpp
817
818 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
819 Drivers_SOURCES.l4 += \
820 USB/USBProxyDevice.cpp \
821 USB/linux/USBProxyDevice-linux.cpp
822
823 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
824 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
825 Drivers_SOURCES.os2 += \
826 USB/USBProxyDevice.cpp \
827 USB/os2/USBProxyDevice-os2.cpp
828
829 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
830 Drivers_SOURCES.win += \
831 USB/USBProxyDevice.cpp \
832 USB/win/USBProxyDevice-win.cpp
833
834 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
835 Drivers_SOURCES.solaris += \
836 USB/USBProxyDevice.cpp \
837 USB/solaris/USBProxyDevice-solaris.cpp
838endif # VBOX_WITH_USB
839
840ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
841 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
842 Drivers_SOURCES += \
843 Storage/DrvRawImageAsync.cpp \
844 Storage/DrvTransportAsync.cpp
845endif #VBOX_WITH_PDM_ASYNC_COMPLETION
846
847ifdef VBOX_WITH_BUSLOGIC
848 Drivers_DEFS += VBOX_WITH_BUSLOGIC
849 Drivers_SOURCES += \
850 Storage/DrvSCSI.cpp
851endif # VBOX_WITH_BUSLOGIC
852
853#
854# Ring-0 Services (library, linked into VMMR0.r0)
855#
856ServicesR0_TEMPLATE = VBOXR0
857ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
858ServicesR0_SOURCES = \
859 Network/SrvIntNetR0.cpp
860
861#
862# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
863#
864ifdef VBOX_WITH_TESTCASES
865 PROGRAMS += tstIntNetR0
866 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
867 tstIntNetR0_DEFS = IN_INTNET_R0
868 tstIntNetR0_SOURCES = \
869 Network/testcase/tstIntNetR0.cpp
870endif
871
872#
873# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
874#
875ifdef VBOX_WITH_TESTCASES
876 PROGRAMS += tstIntNet-1
877 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
878 tstIntNet-1_SOURCES = \
879 Network/testcase/tstIntNet-1.cpp \
880 Network/Pcap.cpp
881endif
882
883
884#
885# EEPROM device unit test requires cppunit
886#
887ifdef VBOX_WITH_CPPUNIT_TESTCASES
888ifdef VBOX_WITH_E1000
889 PROGRAMS += tstDevEEPROM
890 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
891 tstDevEEPROM_SOURCES = \
892 Network/testcase/tstDevEEPROM.cpp
893 tstDevEEPROM_LIBS = \
894 $(TARGET_DevicesR3)
895 PROGRAMS += tstDevPhy
896 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
897 tstDevPhy_SOURCES = \
898 Network/testcase/tstDevPhy.cpp \
899 Network/DevE1000Phy.cpp
900 tstDevPhy_DEFS = PHY_UNIT_TEST
901endif
902endif
903
904include $(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