VirtualBox

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

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

#3076: Merged in the branch with the alternate driver authentication method. (34468:HEAD)

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