VirtualBox

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

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

Add define to make scsi driver known to PDM

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