VirtualBox

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

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

fixed Drivers_DEFS

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