VirtualBox

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

Last change on this file since 13958 was 13895, checked in by vboxsync, 16 years ago

OSE build fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 25.7 KB
Line 
1# $Id: Makefile.kmk 13895 2008-11-05 23:50:03Z 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 Serial/DevSerial.cpp \
258 Parallel/DevParallel.cpp
259
260DevicesR3_SOURCES.debug = \
261 Storage/Debug.cpp
262
263ifdef VBOX_WITH_E1000
264 DevicesR3_DEFS += VBOX_WITH_E1000
265 DevicesR3_SOURCES += \
266 Network/DevE1000.cpp \
267 Network/DevE1000Phy.cpp \
268 Network/DevEEPROM.cpp
269endif
270
271ifndef VBOX_OSE
272DevicesR3_INCS += \
273 Network/lwip/src/include \
274 Network/lwip/src/include/ipv4 \
275 Network/lwip/vbox/include
276DevicesR3_SOURCES += \
277 Network/lwip/src/api/api_lib.c \
278 Network/lwip/src/api/api_msg.c \
279 Network/lwip/src/api/err.c \
280 Network/lwip/src/api/sockets.c \
281 Network/lwip/src/api/tcpip.c \
282 Network/lwip/src/core/tcp_in.c \
283 Network/lwip/src/core/dhcp.c \
284 Network/lwip/src/core/inet.c \
285 Network/lwip/src/core/mem.c \
286 Network/lwip/src/core/memp.c \
287 Network/lwip/src/core/netif.c \
288 Network/lwip/src/core/pbuf.c \
289 Network/lwip/src/core/raw.c \
290 Network/lwip/src/core/stats.c \
291 Network/lwip/src/core/sys.c \
292 Network/lwip/src/core/tcp.c \
293 Network/lwip/src/core/ipv4/ip_addr.c \
294 Network/lwip/src/core/ipv4/icmp.c \
295 Network/lwip/src/core/ipv4/ip.c \
296 Network/lwip/src/core/ipv4/ip_frag.c \
297 Network/lwip/src/core/tcp_out.c \
298 Network/lwip/src/core/udp.c \
299 Network/lwip/src/netif/etharp.c \
300 Network/lwip/vbox/sys_arch.c \
301 Network/DevINIP.cpp
302DevicesR3_DEFS += VBOX_WITH_INIP
303endif
304
305ifdef VBOX_WITH_AHCI
306DevicesR3_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
307DevicesR3_SOURCES += \
308 Storage/DevAHCI.cpp \
309 Storage/ATAController.cpp
310endif
311
312ifdef VBOX_WITH_BUSLOGIC
313DevicesR3_DEFS += VBOX_WITH_BUSLOGIC
314DevicesR3_SOURCES += \
315 Storage/DevBusLogic.cpp \
316 Storage/VBoxSCSI.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. (bird: What's vboxaml.aml?)
338DevicesR3_CLEAN += $(PATH_DevicesR3)/vboxaml.hex $(PATH_DevicesR3)/vboxaml.aml
339PC/DevACPI.cpp_DEPS = $(PATH_DevicesR3)/vboxaml.hex
340PC/DevACPI.cpp_INCS = $(PATH_DevicesR3)
341
342$$(PATH_DevicesR3)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
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_VgaBiosBin)
351Graphics/DevVGA.cpp_DEPS = $(PATH_VgaBiosBin)/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.win += _WIN32_WINNT=0x0510
537Drivers_DEFS = IN_IDE_R3
538ifdef VBOX_WITH_NETFLT
539Drivers_DEFS = VBOX_WITH_NETFLT
540endif
541ifdef VBOX_WITH_SYNC_SLIRP
542Drivers_DEFS = VBOX_WITH_SYNC_SLIRP
543endif
544Drivers_INCS := \
545 $(PATH_SUB_CURRENT) \
546 Network/slirp
547Drivers_SOURCES = \
548 Audio/audio.c \
549 Audio/audiosniffer.c \
550 Audio/mixeng.c \
551 Audio/noaudio.c \
552 Input/DrvKeyboardQueue.cpp \
553 Input/DrvMouseQueue.cpp \
554 Network/DrvIntNet.cpp \
555 PC/DrvACPI.cpp \
556 Serial/DrvChar.cpp \
557 Serial/DrvNamedPipe.cpp \
558 Storage/DrvBlock.cpp \
559 Storage/DrvHostBase.cpp \
560 Storage/DrvHostDVD.cpp \
561 Storage/DrvHostFloppy.cpp \
562 Storage/DrvMediaISO.cpp \
563 Storage/DrvRawImage.cpp \
564 Storage/DrvVD.cpp \
565 Storage/VBoxHDD.cpp \
566 Network/DrvNetSniffer.cpp \
567 Network/Pcap.cpp
568ifndef VBOX_USE_NAT
569VBOX_SLIRP_SOURCES = \
570 Network/DrvNAT.cpp \
571 Network/slirp/bootp.c \
572 Network/slirp/cksum.c \
573 Network/slirp/debug.c \
574 Network/slirp/if.c \
575 Network/slirp/ip_icmp.c \
576 Network/slirp/ip_input.c \
577 Network/slirp/ip_output.c \
578 Network/slirp/mbuf.c \
579 Network/slirp/misc.c \
580 Network/slirp/sbuf.c \
581 Network/slirp/slirp.c \
582 Network/slirp/socket.c \
583 Network/slirp/tcp_input.c \
584 Network/slirp/tcp_output.c \
585 Network/slirp/tcp_subr.c \
586 Network/slirp/tcp_timer.c \
587 Network/slirp/tftp.c \
588 Network/slirp/udp.c
589Drivers_SOURCES += $(VBOX_SLIRP_SOURCES)
590 ifneq ($(KBUILD_TARGET),win)
591 define def_vbox_slirp_cflags
592 $(file)_CFLAGS = -Wno-sign-compare
593 endef
594 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(def_vbox_slirp_cflags)))
595 endif
596else
597NatAlias_TEMPLATE = VBOXR3NP
598
599
600Drivers_SOURCES += Network/DrvNAT.cpp
601
602Network/DrvNAT.cpp_DEFS += VBOX_NAT_SOURCES
603Network/nat/src/sys/net/if_clone.c_CFLAGS.linux += -std=c99
604
605Drivers_SOURCES += Network/nat/nat_socket.c
606
607NatAlias_CFLAGS += -include Network/nat/bsd.h
608#NatAlias_CFLAGS += -Werror -Wall -Wno-unused -Wno-pointer-sign
609NatAlias_DEFS += VBOX_NAT_SOURCES
610NatAlias_DEFS += __BSD_VISIBLE=1
611NatAlias_DEFS += INET
612NatAlias_DEFS += IPFIREWALL_NAT
613NatAlias_DEFS += RWLOCK_NOINLINE
614NatAlias_DEFS += MUTEX_NOINLINE
615NatAlias_DEFS += IPFIREWALL_FORWARD
616NatAlias_DEFS += IPFIREWALL
617NatAlias_DEFS += IPFIREWALL_DEFAULT_TO_ACCEPT
618
619NatAlias_DEFS += IN_NAT # used in Network/nat/nat.h (which glues VBox and *BSD sources)
620
621NatAlias_DEFS.linux += _GNU_SOURCE
622
623NatAlias_SOURCES += Network/nat/nat_utils.c
624NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw_nat.c
625NatAlias_SOURCES += Network/nat/src/sys/netinet/in_cksum.c
626NatAlias_SOURCES += Network/nat/src/sys/net/if.c
627NatAlias_SOURCES += Network/nat/src/sys/net/if_clone.c
628NatAlias_SOURCES += Network/nat/src/sys/net/bpf.c
629NatAlias_SOURCES += Network/nat/src/sys/net/if_loop.c
630NatAlias_SOURCES += Network/nat/src/sys/net/if_ef.c
631NatAlias_SOURCES += Network/nat/src/sys/net/if_ethersubr.c
632NatAlias_SOURCES += Network/nat/src/sys/net/route.c
633NatAlias_SOURCES += Network/nat/src/sys/net/pfil.c
634NatAlias_SOURCES += Network/nat/src/sys/net/netisr.c
635NatAlias_SOURCES += Network/nat/src/sys/net/radix.c
636NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_options.c
637NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timewait.c
638NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timer.c
639NatAlias_SOURCES += Network/nat/src/sys/netinet/if_ether.c
640NatAlias_SOURCES += Network/nat/src/sys/netinet/in.c
641NatAlias_SOURCES += Network/nat/src/sys/netinet/in_pcb.c
642NatAlias_SOURCES += Network/nat/src/sys/netinet/in_proto.c
643NatAlias_SOURCES += Network/nat/src/sys/netinet/in_rmx.c
644NatAlias_SOURCES += Network/nat/src/sys/netinet/in_mcast.c
645NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_icmp.c
646NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fastfwd.c
647NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_output.c
648NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_input.c
649NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_mroute.c
650NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_id.c
651NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_divert.c
652NatAlias_SOURCES += Network/nat/src/sys/netinet/raw_ip.c
653NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_syncache.c
654NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_sack.c
655NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_subr.c
656NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_input.c
657NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_output.c
658NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_reass.c
659NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_hostcache.c
660NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_usrreq.c
661NatAlias_SOURCES += Network/nat/src/sys/netinet/udp_usrreq.c
662NatAlias_SOURCES += Network/nat/src/sys/kern/subr_eventhandler.c
663NatAlias_SOURCES += Network/nat/src/sys/kern/kern_mbuf.c
664NatAlias_SOURCES += Network/nat/src/sys/kern/kern_subr.c
665NatAlias_SOURCES += Network/nat/src/sys/kern/kern_resource.c
666NatAlias_SOURCES += Network/nat/src/sys/kern/kern_time.c
667NatAlias_SOURCES += Network/nat/src/sys/kern/kern_clock.c
668#NatAlias_SOURCES += Network/nat/src/sys/kern/kern_timeout.c
669NatAlias_SOURCES += Network/nat/src/sys/kern/subr_sbuf.c
670NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf.c
671NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf2.c
672NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_sockbuf.c
673NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_socket.c
674NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_domain.c
675NatAlias_SOURCES += Network/nat/src/sys/vm/uma_core.c
676NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw2.c
677NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw_pfil.c
678NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias.c
679#NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_cuseeme.c
680NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_db.c
681NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_dummy.c
682#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_ftp.c
683#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_irc.c
684NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_mod.c
685#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_nbt.c
686#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_pptp.c
687NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_proxy.c
688#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_skinny.c
689#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_smedia.c
690NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_util.c
691
692NatAlias_SOURCES.amd64 += Network/nat/src/sys/amd64/amd64/in_cksum.c
693NatAlias_SOURCES.x86 += Network/nat/src/sys/i386/i386/in_cksum.c
694
695NatAlias_INCS += Network/nat
696NatAlias_INCS += Network/nat/src/sys
697NatAlias_INCS += Network/nat/src/sys/contrib/altq
698NatAlias_INCS.amd64 += Network/nat/src/sys/amd64/include
699NatAlias_INCS.x86 += Network/nat/src/sys/i386/include
700endif
701
702# -- OS specific --
703
704ifeq ($(KBUILD_TARGET),darwin)
705Drivers_SOURCES := $(filter-out \
706 Storage/DrvHostRaw% \
707 Storage/DrvHostFloppy% \
708 , $(Drivers_SOURCES)) \
709 Audio/coreaudio.c
710Drivers_SOURCES.darwin = \
711 Serial/DrvHostSerial.cpp
712endif # darwin
713
714ifeq ($(KBUILD_TARGET),freebsd)
715Drivers_SOURCES := $(filter-out \
716 Storage/DrvHost% \
717 , $(Drivers_SOURCES))
718Drivers_SOURCES.freebsd =
719endif # freebsd
720
721
722ifeq ($(KBUILD_TARGET),l4)
723Drivers_SOURCES = \
724 Input/DrvMouseQueue.cpp \
725 Input/DrvKeyboardQueue.cpp \
726 Storage/VBoxHDD.cpp \
727 Storage/DrvBlock.cpp \
728 Storage/DrvMediaISO.cpp \
729 Storage/DrvRawImage.cpp \
730 Storage/DrvHostBase.cpp \
731 Storage/DrvHostDVD.cpp \
732 Storage/DrvVD.cpp \
733 PC/DrvACPI.cpp \
734 Network/DrvIntNet.cpp \
735 Network/DrvNetSniffer.cpp \
736 Network/Pcap.cpp \
737 Audio/audio.c \
738 Audio/mixeng.c \
739 Audio/noaudio.c \
740 Audio/audiosniffer.c
741
742Drivers_SOURCES.l4 = \
743 Network/DrvTAP.cpp \
744 Audio/ossaudio.c
745endif # l4
746
747Drivers_SOURCES.linux = \
748 Network/DrvTAP.cpp \
749 Audio/ossaudio.c \
750 Parallel/DrvHostParallel.cpp \
751 Serial/DrvHostSerial.cpp
752
753ifeq ($(KBUILD_TARGET),os2)
754Drivers_SOURCES := $(filter-out \
755 Storage/DrvHost% \
756 , $(Drivers_SOURCES))
757Drivers_SOURCES.os2 = \
758 Network/DrvTAPOs2.cpp
759endif
760
761ifeq ($(KBUILD_TARGET),solaris)
762Drivers_SOURCES := $(filter-out \
763 Storage/DrvHost% \
764 , $(Drivers_SOURCES))
765Drivers_SOURCES.solaris = \
766 Audio/solaudio.c \
767 $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
768 Storage/DrvHostBase.cpp \
769 Storage/DrvHostDVD.cpp
770 ifdef VBOX_WITH_CROSSBOW
771 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
772 Drivers_DEFS += VBOX_WITH_CROSSBOW
773 endif
774 ifdef VBOX_WITH_SUID_WRAPPER
775 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
776 endif
777endif
778
779Drivers_SOURCES.win = \
780 Network/DrvTAPWin.cpp \
781 Audio/dsoundaudio.c \
782 Serial/DrvHostSerial.cpp
783
784if defined(VBOX_WITH_NETFLT)
785 if defined(VBOX_NETFLT_ONDEMAND_BIND)
786 Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
787 endif
788 Drivers_SOURCES.win += Network/win/DrvIntNet-win.cpp
789endif
790
791# -- features --
792
793ifdef VBOX_WITH_ISCSI
794 Drivers_SOURCES += \
795 Storage/DrvISCSI.cpp \
796 Storage/DrvISCSITransportTCP.cpp
797 Drivers_DEFS += VBOX_WITH_ISCSI
798 Storage/DrvISCSITransportTCP.cpp_INCS = \
799 Network/lwip/src/include \
800 Network/lwip/src/include/ipv4 \
801 Network/lwip/vbox/include
802 VBoxDDU_SOURCES += \
803 Storage/ISCSIHDDCore.cpp
804 VBoxDDU_DEFS += VBOX_WITH_ISCSI
805endif # VBOX_WITH_ISCSI
806
807ifdef VBOX_WITH_ALSA
808 Drivers_DEFS.linux += VBOX_WITH_ALSA
809 Drivers_SOURCES.linux+= \
810 Audio/alsaaudio.c \
811 Audio/alsa_stubs.c
812# VBoxDD_LIBS.linux += asound
813endif
814
815ifdef VBOX_WITH_PULSE
816 Drivers_DEFS.linux += VBOX_WITH_PULSE
817 Drivers_SOURCES.linux+= \
818 Audio/pulseaudio.c \
819 Audio/pulse_stubs.c
820# VBoxDD_LIBS.linux += pulse
821endif
822
823ifdef VBOX_WITH_USB
824 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
825 Drivers_SOURCES += \
826 USB/DrvVUSBRootHub.cpp \
827 USB/VUSBDevice.cpp \
828 USB/VUSBUrb.cpp
829 ifdef VBOX_WITH_VRDP
830 Drivers_DEFS += VBOX_WITH_VRDP
831 Drivers_SOURCES += \
832 USB/vrdp/USBProxyDevice-vrdp.cpp
833 endif
834
835 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
836 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
837 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
838 endif
839 Drivers_SOURCES.darwin += \
840 USB/USBProxyDevice.cpp \
841 USB/darwin/USBProxyDevice-darwin.cpp
842
843 Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
844 ifdef VBOX_WITHOUT_LINUX_COMPILER_H
845 Drivers_DEFS.linux += VBOX_WITHOUT_LINUX_COMPILER_H
846 endif
847 Drivers_SOURCES.linux+= \
848 USB/USBProxyDevice.cpp \
849 USB/linux/USBProxyDevice-linux.cpp
850
851 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
852 Drivers_SOURCES.l4 += \
853 USB/USBProxyDevice.cpp \
854 USB/linux/USBProxyDevice-linux.cpp
855
856 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
857 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
858 Drivers_SOURCES.os2 += \
859 USB/USBProxyDevice.cpp \
860 USB/os2/USBProxyDevice-os2.cpp
861
862 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
863 Drivers_SOURCES.win += \
864 USB/USBProxyDevice.cpp \
865 USB/win/USBProxyDevice-win.cpp
866
867 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
868 Drivers_SOURCES.solaris += \
869 USB/USBProxyDevice.cpp \
870 USB/solaris/USBProxyDevice-solaris.cpp
871endif # VBOX_WITH_USB
872
873ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
874 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
875 Drivers_SOURCES += \
876 Storage/DrvRawImageAsync.cpp \
877 Storage/DrvTransportAsync.cpp
878endif #VBOX_WITH_PDM_ASYNC_COMPLETION
879
880ifdef VBOX_WITH_SCSI
881 Drivers_DEFS += VBOX_WITH_SCSI
882 Drivers_SOURCES += \
883 Storage/DrvSCSI.cpp
884 Drivers_SOURCES.linux += \
885 Storage/DrvSCSIHost.cpp
886endif # VBOX_WITH_SCSI
887
888#
889# Ring-0 Services (library, linked into VMMR0.r0)
890#
891ServicesR0_TEMPLATE = VBOXR0
892ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
893ServicesR0_SOURCES = \
894 Network/SrvIntNetR0.cpp
895
896if defined(VBOX_WITH_NETFLT)
897 ServicesR0_SOURCES.win.amd64 += Network/win/SrvIntNetR0A-win.asm
898 ServicesR0_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
899endif
900
901
902#
903# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
904#
905ifdef VBOX_WITH_TESTCASES
906 PROGRAMS += tstIntNetR0
907 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
908 tstIntNetR0_DEFS = IN_INTNET_R0
909 tstIntNetR0_SOURCES = \
910 Network/testcase/tstIntNetR0.cpp
911endif
912
913#
914# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
915#
916ifdef VBOX_WITH_TESTCASES
917 PROGRAMS += tstIntNet-1
918 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
919 tstIntNet-1_SOURCES = \
920 Network/testcase/tstIntNet-1.cpp \
921 Network/Pcap.cpp
922endif
923
924
925#
926# EEPROM device unit test requires cppunit
927#
928ifdef VBOX_WITH_CPPUNIT_TESTCASES
929ifdef VBOX_WITH_E1000
930 PROGRAMS += tstDevEEPROM
931 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
932 tstDevEEPROM_SOURCES = \
933 Network/testcase/tstDevEEPROM.cpp
934 tstDevEEPROM_LIBS = \
935 $(TARGET_DevicesR3)
936 PROGRAMS += tstDevPhy
937 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
938 tstDevPhy_SOURCES = \
939 Network/testcase/tstDevPhy.cpp \
940 Network/DevE1000Phy.cpp
941 tstDevPhy_DEFS = PHY_UNIT_TEST
942endif
943endif
944
945include $(KBUILD_PATH)/subfooter.kmk
946
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