VirtualBox

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

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

NAT: malloc/free/realloc/strdup => iprt functions; fixed VBOX_WITH_SLIRP_MEMORY_CHECK

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