VirtualBox

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

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

slirp: removed the old 64-bit incompatible reassemble code

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 21.3 KB
Line 
1# $Id: Makefile.kmk 15453 2008-12-13 22:35:53Z 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# temporary, we will remove this in some days
26VBOX_WITH_SLIRP_ICMP = 1
27
28VBOX_PATH_DEVICES_SRC := $(PATH_SUB_CURRENT)
29
30# Include sub-makefiles.
31include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
32ifdef VBOX_WITH_VMI
33 include $(PATH_SUB_CURRENT)/PC/VMI/Makefile.kmk
34endif
35include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
36include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
37include $(PATH_SUB_CURRENT)/Storage/testcase/Makefile.kmk
38ifndef VBOX_OSE
39 include $(PATH_SUB_CURRENT)/Storage/VBoxHDDFormats/Makefile.kmk
40endif
41ifdef VBOX_WITH_INTEL_PXE
42 include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
43else
44 # Subdir with complex makefile.
45 SUBDIRS_LIBRARIES += $(VBOX_PATH_DEVICES_SRC)/PC/Etherboot-src
46 SUBDIRS_CLEAN += $(VBOX_PATH_DEVICES_SRC)/PC/Etherboot-src
47 # Disable the unsafe pass order optimizations.
48 KBUILD_SAFE_PARALLEL = 1
49endif
50
51#
52# Main targets.
53#
54LIBRARIES += DevicesR3 Drivers ServicesR0
55ifdef VBOX_USE_NAT
56LIBRARIES += NatAlias
57endif
58DLLS += VBoxDDU VBoxDD VBoxDD2
59SYSMODS += VBoxDDGC VBoxDD2GC VBoxDDR0 VBoxDD2R0
60
61
62#
63# VBoxDDU (shared object)
64#
65VBoxDDU_TEMPLATE = VBOXR3
66VBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
67VBoxDDU_INST.darwin = $(INST_DLL) $(INST_TESTCASE)
68VBoxDDU_DEFS = IN_VBOXDDU
69ifdef VBOX_WITH_USB
70 VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
71 VBoxDDU_SDKS.win = WINPSDK W2K3DDK
72 ifdef VBOX_WITH_EHCI
73 VBoxDDU_DEFS += VBOX_WITH_EHCI
74 endif
75 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
76 VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
77 endif
78else
79 VBoxDDU_SDKS.win = WINPSDK
80endif
81VBoxDDU_SOURCES = \
82 Storage/VBoxHDD-new.cpp \
83 Storage/VDIHDDCore.cpp \
84 Storage/VHDHDDCore.cpp \
85 Storage/VmdkHDDCore.cpp \
86 Storage/RawHDDCore.cpp \
87 VBoxDDUDeps.cpp
88ifdef VBOX_WITH_USB
89 VBoxDDU_INCS.os2 += \
90 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
91endif
92VBoxDDU_LIBS = \
93 $(LIB_RUNTIME)
94ifdef VBOX_WITH_USB
95 VBoxDDU_LIBS += \
96 $(PATH_LIB)/USBLib$(VBOX_SUFF_LIB)
97endif
98ifeq ($(KBUILD_TARGET),l4)
99 VBoxDDU_LIBS += \
100 $(L4_LIBDIR)/libl4sys.p.a
101endif
102VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
103ifdef VBOX_WITH_USB
104 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
105 VBoxDDU_LDFLAGS.darwin += -framework IOKit
106 endif
107endif
108
109VBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
110VBoxDDU_LDFLAGS.l4 = -Wl,--no-undefined
111
112#
113# VBoxDDULnxHostR3 (Only needed for l4, currently for executing vditool on L4Linux.)
114#
115ifeq ($(KBUILD_TARGET),l4)
116 LIBRARIES += VBoxDDULnxHostR3
117 VBoxDDULnxHostR3_TEMPLATE = VBOXLNXHOSTR3LIB
118 VBoxDDULnxHostR3_DEFS = IN_VBOXDDU
119 VBoxDDULnxHostR3_SOURCES = $(VBoxDDU_SOURCES)
120endif
121
122#
123# VBoxDD (shared object)
124#
125VBoxDD_TEMPLATE = VBOXR3
126VBoxDD_SDKS.win = WINPSDK DXSDK W2K3DDK VBOX_NTDLL
127VBoxDD_SOURCES = \
128 Builtins.cpp
129VBoxDD_DEFS = VBOX_ACPI
130ifdef VBOX_WITH_USB
131 VBoxDD_DEFS += VBOX_WITH_USB IN_USB_R3
132 ifdef VBOX_WITH_EHCI
133 VBoxDD_DEFS += VBOX_WITH_EHCI
134 endif
135endif
136ifdef VBOX_WITH_AHCI
137 VBoxDD_DEFS += VBOX_WITH_AHCI
138endif
139ifdef VBOX_WITH_ISCSI
140 VBoxDD_DEFS += VBOX_WITH_ISCSI
141endif
142ifdef VBOX_WITH_E1000
143 VBoxDD_DEFS += VBOX_WITH_E1000
144endif
145ifdef VBOX_WITH_BUSLOGIC
146 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
147endif
148ifndef VBOX_OSE
149 VBoxDD_DEFS += VBOX_WITH_INIP
150endif
151ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
152 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
153endif
154ifdef VBOX_WITH_SCSI
155 VBoxDD_DEFS += VBOX_WITH_SCSI
156endif
157ifdef VBOX_WITH_LSILOGIC
158 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
159endif
160VBoxDD_LIBS = \
161 $(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
162 $(PATH_LIB)/Drivers$(VBOX_SUFF_LIB) \
163 $(PATH_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
164 $(LIB_VMM) \
165 $(LIB_RUNTIME)
166ifeq ($(KBUILD_TARGET),win)
167 VBoxDD_LIBS += \
168 $(LIB_DDU) \
169 $(PATH_LIB)/VBoxDD2.lib \
170 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
171else
172 VBoxDD_LIBS += \
173 $(INSTARGET_VBoxDDU) \
174 $(INSTARGET_VBoxDD2)
175endif
176ifeq ($(KBUILD_TARGET),l4)
177 VBoxDD_LIBS += \
178 $(L4_LIBDIR)/libl4sys.p.a
179endif
180
181ifdef VBOX_USE_NAT
182VBoxDD_LIBS += $(PATH_LIB)/NatAlias$(VBOX_SUFF_LIB)
183endif
184
185ifdef VBOX_WITH_NETFLT
186VBoxDD_LIBS.win += $(PATH_LIB)/WinNetConfig.lib
187endif
188
189ifeq ($(KBUILD_TARGET),solaris)
190 VBoxDD_LIBS += adm
191 ifdef VBOX_WITH_SUID_WRAPPER
192 VBoxDD_LIBS += secdb
193 endif
194 ifdef VBOX_WITH_USB
195 VBoxDD_LIBS += aio
196 endif
197endif
198VBoxDD_LIBS.darwin += \
199 $(LIB_REM)
200VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \
201 -framework CoreAudio \
202 -framework IOKit \
203 -framework Carbon \
204 -framework DiskArbitration
205VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
206VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
207
208#
209# VBoxDD2 (shared object)
210#
211VBoxDD2_TEMPLATE = VBOXR3
212VBoxDD2_DEFS = IN_VBOXDD2 \
213 $(if $(VBOX_WITH_VMI),VBOX_WITH_VMI,)
214VBoxDD2_INCS := \
215 $(PATH_SUB_CURRENT)
216VBoxDD2_SOURCES = \
217 Builtins2.cpp \
218 PC/DevAPIC.cpp
219VBoxDD2_LIBS = \
220 $(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
221 $(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
222 $(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB) \
223 $(if $(VBOX_WITH_VMI),$(PATH_LIB)/VmiBiosBin$(VBOX_SUFF_LIB)) \
224 $(LIB_VMM) \
225 $(LIB_RUNTIME)
226ifeq ($(KBUILD_TARGET),l4)
227VBoxDD2_LIBS += \
228 $(L4_LIBDIR)/libl4sys.p.a
229endif
230VBoxDD2_LIBS.darwin += $(LIB_REM)
231VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
232VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
233VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
234
235
236#
237# DevicesR3 (library)
238#
239DevicesR3_TEMPLATE = VBOXR3
240DevicesR3_SDKS.win = WINPSDK W2K3DDK
241DevicesR3_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
242DevicesR3_DEFS += VBOX_HGCM_HOST_CODE \
243 $(if $(VBOX_WITH_VMI),VBOX_WITH_VMI,)
244DevicesR3_INCS := \
245 $(PATH_SUB_CURRENT)
246DevicesR3_SOURCES = \
247 Input/DevPS2.cpp \
248 Bus/DevPCI.cpp \
249 Graphics/DevVGA.cpp \
250 Storage/DevATA.cpp \
251 PC/DevPit-i8254.cpp \
252 PC/DevPIC.cpp \
253 PC/DevACPI.cpp \
254 PC/DevRTC.cpp \
255 PC/DevPcBios.cpp \
256 PC/DevPcArch.c \
257 VMMDev/VBoxDev.cpp \
258 VMMDev/VMMDevHGCM.cpp \
259 Network/DevPCNet.cpp \
260 Audio/DevIchAc97.cpp \
261 Audio/DevSB16.cpp \
262 PC/DevDMA.cpp \
263 Storage/fdc.c \
264 Storage/Debug.cpp \
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
558Drivers_INCS := \
559 $(PATH_SUB_CURRENT) \
560 Network/slirp
561Drivers_SOURCES = \
562 Audio/audio.c \
563 Audio/audiosniffer.c \
564 Audio/mixeng.c \
565 Audio/noaudio.c \
566 Input/DrvKeyboardQueue.cpp \
567 Input/DrvMouseQueue.cpp \
568 Network/DrvIntNet.cpp \
569 PC/DrvACPI.cpp \
570 Serial/DrvChar.cpp \
571 Serial/DrvNamedPipe.cpp \
572 Storage/DrvBlock.cpp \
573 Storage/DrvHostBase.cpp \
574 Storage/DrvHostDVD.cpp \
575 Storage/DrvHostFloppy.cpp \
576 Storage/DrvMediaISO.cpp \
577 Storage/DrvRawImage.cpp \
578 Storage/DrvVD.cpp \
579 Network/DrvNetSniffer.cpp \
580 Network/Pcap.cpp
581
582VBOX_SLIRP_SOURCES = \
583 Network/DrvNAT.cpp \
584 Network/slirp/bootp.c \
585 Network/slirp/cksum.c \
586 Network/slirp/debug.c \
587 Network/slirp/if.c \
588 Network/slirp/ip_icmp.c \
589 Network/slirp/ip_input.c \
590 Network/slirp/ip_output.c \
591 Network/slirp/mbuf.c \
592 Network/slirp/misc.c \
593 Network/slirp/sbuf.c \
594 Network/slirp/slirp.c \
595 Network/slirp/socket.c \
596 Network/slirp/tcp_input.c \
597 Network/slirp/tcp_output.c \
598 Network/slirp/tcp_subr.c \
599 Network/slirp/tcp_timer.c \
600 Network/slirp/tftp.c \
601 Network/slirp/udp.c
602
603Drivers_SOURCES += $(VBOX_SLIRP_SOURCES)
604define def_vbox_slirp_cflags
605 $(file)_DEFS += \
606 VBOX_WITH_SIMPLIFIED_SLIRP_SYNC \
607 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),VBOX_WITH_SLIRP_MEMORY_CHECK,) \
608 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
609 $(if $(VBOX_WITH_SLIRP_ICMP),VBOX_WITH_SLIRP_ICMP,)
610 ifeq ($(KBUILD_TARGET),win)
611 $(file)_CFLAGS = -wd4018
612 else
613 $(file)_CFLAGS = -Wno-sign-compare
614 endif
615endef
616$(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(def_vbox_slirp_cflags)))
617
618# -- OS specific --
619
620ifeq ($(KBUILD_TARGET),darwin)
621Drivers_SOURCES := $(filter-out \
622 Storage/DrvHostRaw% \
623 Storage/DrvHostFloppy% \
624 , $(Drivers_SOURCES)) \
625 Audio/coreaudio.c
626Drivers_SOURCES.darwin = \
627 Serial/DrvHostSerial.cpp
628endif # darwin
629
630ifeq ($(KBUILD_TARGET),freebsd)
631Drivers_SOURCES := $(filter-out \
632 Storage/DrvHost% \
633 , $(Drivers_SOURCES))
634Drivers_SOURCES.freebsd =
635endif # freebsd
636
637
638ifeq ($(KBUILD_TARGET),l4)
639Drivers_SOURCES = \
640 Input/DrvMouseQueue.cpp \
641 Input/DrvKeyboardQueue.cpp \
642 Storage/DrvBlock.cpp \
643 Storage/DrvMediaISO.cpp \
644 Storage/DrvRawImage.cpp \
645 Storage/DrvHostBase.cpp \
646 Storage/DrvHostDVD.cpp \
647 Storage/DrvVD.cpp \
648 PC/DrvACPI.cpp \
649 Network/DrvIntNet.cpp \
650 Network/DrvNetSniffer.cpp \
651 Network/Pcap.cpp \
652 Audio/audio.c \
653 Audio/mixeng.c \
654 Audio/noaudio.c \
655 Audio/audiosniffer.c
656
657Drivers_SOURCES.l4 = \
658 Network/DrvTAP.cpp \
659 Audio/ossaudio.c
660endif # l4
661
662Drivers_SOURCES.linux = \
663 Network/DrvTAP.cpp \
664 Audio/ossaudio.c \
665 Parallel/DrvHostParallel.cpp \
666 Serial/DrvHostSerial.cpp
667
668ifeq ($(KBUILD_TARGET),os2)
669Drivers_SOURCES := $(filter-out \
670 Storage/DrvHost% \
671 , $(Drivers_SOURCES))
672Drivers_SOURCES.os2 = \
673 Network/DrvTAPOs2.cpp
674endif
675
676ifeq ($(KBUILD_TARGET),solaris)
677Drivers_SOURCES := $(filter-out \
678 Storage/DrvHost% \
679 , $(Drivers_SOURCES))
680Drivers_SOURCES.solaris = \
681 Audio/solaudio.c \
682 $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
683 Storage/DrvHostBase.cpp \
684 Storage/DrvHostDVD.cpp
685 ifdef VBOX_WITH_CROSSBOW
686 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
687 Drivers_DEFS += VBOX_WITH_CROSSBOW
688 endif
689 ifdef VBOX_WITH_SUID_WRAPPER
690 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
691 endif
692endif
693
694Drivers_SOURCES.win = \
695 Network/DrvTAPWin.cpp \
696 Audio/dsoundaudio.c \
697 Serial/DrvHostSerial.cpp
698
699if defined(VBOX_WITH_NETFLT)
700 if defined(VBOX_NETFLT_ONDEMAND_BIND)
701 Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
702 endif
703 Drivers_SOURCES.win += Network/win/DrvIntNet-win.cpp
704endif
705
706# -- features --
707
708ifdef VBOX_WITH_ISCSI
709 VBoxDDU_SOURCES += \
710 Storage/ISCSIHDDCore.cpp
711 VBoxDDU_DEFS += VBOX_WITH_ISCSI
712 Storage/DrvVD.cpp_INCS = \
713 Network/lwip/src/include \
714 Network/lwip/src/include/ipv4 \
715 Network/lwip/vbox/include
716endif # VBOX_WITH_ISCSI
717
718ifdef VBOX_WITH_ALSA
719 Drivers_DEFS.linux += VBOX_WITH_ALSA
720 Drivers_SOURCES.linux+= \
721 Audio/alsaaudio.c \
722 Audio/alsa_stubs.c
723# VBoxDD_LIBS.linux += asound
724endif
725
726ifdef VBOX_WITH_PULSE
727 Drivers_DEFS.linux += VBOX_WITH_PULSE
728 Drivers_SOURCES.linux+= \
729 Audio/pulseaudio.c \
730 Audio/pulse_stubs.c
731# VBoxDD_LIBS.linux += pulse
732endif
733
734ifdef VBOX_WITH_USB
735 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
736 Drivers_SOURCES += \
737 USB/DrvVUSBRootHub.cpp \
738 USB/VUSBDevice.cpp \
739 USB/VUSBUrb.cpp
740 ifdef VBOX_WITH_VRDP
741 Drivers_DEFS += VBOX_WITH_VRDP
742 Drivers_SOURCES += \
743 USB/vrdp/USBProxyDevice-vrdp.cpp
744 endif
745
746 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
747 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
748 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
749 endif
750 Drivers_SOURCES.darwin += \
751 USB/USBProxyDevice.cpp \
752 USB/darwin/USBProxyDevice-darwin.cpp
753
754 Drivers_DEFS.linux += \
755 VUSB_HAVE_USBPROXY_DEVICE \
756 $(if $(VBOX_WITHOUT_LINUX_COMPILER_H),VBOX_WITHOUT_LINUX_COMPILER_H,) \
757 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
758 Drivers_SOURCES.linux += \
759 USB/USBProxyDevice.cpp \
760 USB/linux/USBProxyDevice-linux.cpp
761
762 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
763 Drivers_SOURCES.l4 += \
764 USB/USBProxyDevice.cpp \
765 USB/linux/USBProxyDevice-linux.cpp
766
767 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
768 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
769 Drivers_SOURCES.os2 += \
770 USB/USBProxyDevice.cpp \
771 USB/os2/USBProxyDevice-os2.cpp
772
773 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
774 Drivers_SOURCES.win += \
775 USB/USBProxyDevice.cpp \
776 USB/win/USBProxyDevice-win.cpp
777
778 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
779 Drivers_SOURCES.solaris += \
780 USB/USBProxyDevice.cpp \
781 USB/solaris/USBProxyDevice-solaris.cpp
782endif # VBOX_WITH_USB
783
784ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
785 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
786 Drivers_SOURCES += \
787 Storage/DrvRawImageAsync.cpp \
788 Storage/DrvTransportAsync.cpp
789endif #VBOX_WITH_PDM_ASYNC_COMPLETION
790
791ifdef VBOX_WITH_SCSI
792 Drivers_DEFS += VBOX_WITH_SCSI
793 Drivers_SOURCES += \
794 Storage/DrvSCSI.cpp
795 Drivers_SOURCES.linux += \
796 Storage/DrvSCSIHost.cpp
797endif # VBOX_WITH_SCSI
798
799ifdef VBOX_WITH_FAULT_INJECTION
800 Drivers_DEFS += VBOX_WITH_FAULT_INJECTION
801 Drivers_SOURCES += \
802 Storage/DrvFaultInject.cpp
803endif # VBOX_WITH_FAULT_INJECTION
804
805#
806# Ring-0 Services (library, linked into VMMR0.r0)
807#
808ServicesR0_TEMPLATE = VBOXR0
809ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
810ServicesR0_SOURCES = \
811 Network/SrvIntNetR0.cpp
812
813if defined(VBOX_WITH_NETFLT)
814 ServicesR0_SOURCES.win.amd64 += Network/win/SrvIntNetR0A-win.asm
815 ServicesR0_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
816endif
817
818
819#
820# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
821#
822ifdef VBOX_WITH_TESTCASES
823 PROGRAMS += tstIntNetR0
824 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
825 tstIntNetR0_DEFS = IN_INTNET_R0
826 tstIntNetR0_SOURCES = \
827 Network/testcase/tstIntNetR0.cpp
828endif
829
830#
831# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
832#
833ifdef VBOX_WITH_TESTCASES
834 PROGRAMS += tstIntNet-1
835 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
836 tstIntNet-1_SOURCES = \
837 Network/testcase/tstIntNet-1.cpp \
838 Network/Pcap.cpp
839endif
840
841
842#
843# EEPROM device unit test requires cppunit
844#
845ifdef VBOX_WITH_CPPUNIT_TESTCASES
846ifdef VBOX_WITH_E1000
847 PROGRAMS += tstDevEEPROM
848 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
849 tstDevEEPROM_SOURCES = \
850 Network/testcase/tstDevEEPROM.cpp
851 tstDevEEPROM_LIBS = \
852 $(TARGET_DevicesR3)
853 PROGRAMS += tstDevPhy
854 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
855 tstDevPhy_SOURCES = \
856 Network/testcase/tstDevPhy.cpp \
857 Network/DevE1000Phy.cpp
858 tstDevPhy_DEFS = PHY_UNIT_TEST
859endif
860endif
861
862include $(KBUILD_PATH)/subfooter.kmk
863
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