VirtualBox

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

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

spaces

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 21.9 KB
Line 
1# $Id: Makefile.kmk 16064 2009-01-19 21:11:58Z 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_HPET
331DevicesR3_DEFS += VBOX_WITH_HPET
332DevicesR3_SOURCES += PC/DevHPET.cpp
333endif
334
335ifdef VBOX_WITH_SMC
336DevicesR3_DEFS += VBOX_WITH_SMC
337DevicesR3_SOURCES += PC/DevSMC.cpp
338endif
339
340ifdef VBOX_WITH_USB
341DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
342
343DevicesR3_SOURCES += \
344 USB/DevOHCI.cpp
345
346 ifdef VBOX_WITH_EHCI
347 DevicesR3_DEFS += VBOX_WITH_EHCI
348 DevicesR3_SOURCES += \
349 USB/DevEHCI.cpp
350 endif
351
352endif
353
354DevicesR3_DEFS += VBOX_WITH_HGCM
355DevicesR3_DEFS.linux += _GNU_SOURCE
356DevicesR3_DEFS.l4 += _GNU_SOURCE
357
358# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl. (bird: What's vboxaml.aml?)
359DevicesR3_CLEAN += $(PATH_DevicesR3)/vboxaml.hex $(PATH_DevicesR3)/vboxaml.aml
360PC/DevACPI.cpp_DEPS = $(PATH_DevicesR3)/vboxaml.hex
361PC/DevACPI.cpp_INCS = $(PATH_DevicesR3)
362
363$$(PATH_DevicesR3)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
364 $(call MSG_TOOL,iasl,DevicesR3,$<,$@)
365 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
366
367# For finding PCIInternal.h from VBox/pci.h.
368Bus/DevPCI.cpp_INCS = Bus
369
370# For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
371Graphics/DevVGA.cpp_INCS = $(PATH_VgaBiosBin)
372Graphics/DevVGA.cpp_DEPS = $(PATH_VgaBiosBin)/vbetables.h
373
374
375
376#
377# VBoxDDGC (sysmod)
378#
379VBoxDDGC_TEMPLATE = VBOXGC
380VBoxDDGC_SYSSUFF = .gc
381VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
382VBoxDDGC_DEFS =
383VBoxDDGC_INCS := \
384 $(PATH_SUB_CURRENT)
385VBoxDDGC_SOURCES = \
386 Bus/DevPCI.cpp \
387 Graphics/DevVGA.cpp \
388 Input/DevPS2.cpp \
389 PC/DevACPI.cpp \
390 PC/DevPit-i8254.cpp \
391 PC/DevPIC.cpp \
392 PC/DevRTC.cpp \
393 Storage/DevATA.cpp \
394 Network/DevPCNet.cpp \
395 Serial/DevSerial.cpp \
396 Parallel/DevParallel.cpp
397
398ifdef VBOX_WITH_E1000
399 VBoxDDGC_DEFS += VBOX_WITH_E1000
400 VBoxDDGC_SOURCES += \
401 Network/DevE1000.cpp \
402 Network/DevE1000Phy.cpp
403endif
404
405ifdef VBOX_WITH_USB
406VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
407VBoxDDGC_SOURCES += \
408 USB/DevOHCI.cpp
409
410 ifdef VBOX_WITH_EHCI
411 VBoxDDGC_DEFS += VBOX_WITH_EHCI
412 VBoxDDGC_SOURCES += \
413 USB/DevEHCI.cpp
414 endif
415
416endif
417
418ifdef VBOX_WITH_AHCI
419VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
420VBoxDDGC_SOURCES += \
421 Storage/DevAHCI.cpp \
422 Storage/ATAController.cpp
423endif
424
425ifdef VBOX_WITH_BUSLOGIC
426VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
427VBoxDDGC_SOURCES += \
428 Storage/DevBusLogic.cpp
429endif
430
431ifdef VBOX_WITH_LSILOGIC
432VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
433VBoxDDGC_SOURCES += \
434 Storage/DevLsiLogicSCSI.cpp
435endif
436
437ifdef VBOX_WITH_HPET
438VBoxDDGC_DEFS += VBOX_WITH_HPET
439VBoxDDGC_SOURCES += PC/DevHPET.cpp
440endif
441
442ifeq ($(VBOX_LDR_FMT32),pe)
443VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
444endif
445if1of ($(VBOX_LDR_FMT32), pe lx)
446VBoxDDGC_LIBS = \
447 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
448 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
449endif
450
451
452#
453# VBoxDDR0 (sysmod)
454#
455VBoxDDR0_TEMPLATE = VBOXR0
456VBoxDDR0_SYSSUFF = .r0
457VBoxDDR0_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
458VBoxDDR0_DEFS = IN_RT_R0
459VBoxDDR0_INCS := \
460 $(PATH_SUB_CURRENT)
461VBoxDDR0_SOURCES = \
462 Bus/DevPCI.cpp \
463 Graphics/DevVGA.cpp \
464 Input/DevPS2.cpp \
465 PC/DevACPI.cpp \
466 PC/DevPit-i8254.cpp \
467 PC/DevPIC.cpp \
468 PC/DevRTC.cpp \
469 Storage/DevATA.cpp \
470 Network/DevPCNet.cpp \
471 Serial/DevSerial.cpp \
472 Parallel/DevParallel.cpp
473
474ifdef VBOX_WITH_E1000
475 VBoxDDR0_DEFS += VBOX_WITH_E1000
476 VBoxDDR0_SOURCES += \
477 Network/DevE1000.cpp \
478 Network/DevE1000Phy.cpp
479endif
480
481ifdef VBOX_WITH_USB
482VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
483VBoxDDR0_SOURCES += \
484 USB/DevOHCI.cpp
485
486 ifdef VBOX_WITH_EHCI
487 VBoxDDR0_DEFS += VBOX_WITH_EHCI
488 VBoxDDR0_SOURCES += \
489 USB/DevEHCI.cpp
490 endif
491endif
492
493ifdef VBOX_WITH_AHCI
494VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
495VBoxDDR0_SOURCES += \
496 Storage/DevAHCI.cpp \
497 Storage/ATAController.cpp
498endif
499
500ifdef VBOX_WITH_BUSLOGIC
501VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
502VBoxDDR0_SOURCES += \
503 Storage/DevBusLogic.cpp
504endif
505
506ifdef VBOX_WITH_LSILOGIC
507VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
508VBoxDDR0_SOURCES += \
509 Storage/DevLsiLogicSCSI.cpp
510endif
511
512ifdef VBOX_WITH_HPET
513VBoxDDR0_DEFS += VBOX_WITH_HPET
514VBoxDDR0_SOURCES += PC/DevHPET.cpp
515endif
516
517ifeq ($(VBOX_LDR_FMT32),pe)
518VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
519endif
520if1of ($(VBOX_LDR_FMT), pe lx)
521VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
522endif
523
524#
525# VBoxDD2GC (LGPL sysmod)
526#
527VBoxDD2GC_TEMPLATE = VBOXGC
528VBoxDD2GC_DEFS =
529VBoxDD2GC_SYSSUFF = .gc
530VBoxDD2GC_INCS := \
531 $(PATH_SUB_CURRENT)
532VBoxDD2GC_SOURCES = \
533 PC/DevAPIC.cpp
534ifeq ($(VBOX_LDR_FMT32),pe)
535VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
536endif
537if1of ($(VBOX_LDR_FMT32), pe lx)
538VBoxDD2GC_LIBS = \
539 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
540 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
541endif
542
543
544#
545# VBoxDD2R0 (LGPL sysmod)
546#
547VBoxDD2R0_TEMPLATE = VBOXR0
548VBoxDD2R0_DEFS = IN_RT_R0
549VBoxDD2R0_SYSSUFF = .r0
550VBoxDD2R0_INCS := \
551 $(PATH_SUB_CURRENT)
552VBoxDD2R0_SOURCES = \
553 PC/DevAPIC.cpp
554ifeq ($(VBOX_LDR_FMT),pe)
555VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
556endif
557if1of ($(VBOX_LDR_FMT), pe lx)
558VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
559endif
560
561
562#
563# Drivers (library)
564#
565ifeq ($(KBUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
566Drivers_TEMPLATE = VBOXR3NP
567else
568Drivers_TEMPLATE = VBOXR3
569endif
570Drivers_SDKS.win = WINPSDK W2K3DDK
571Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
572Drivers_DEFS.win += _WIN32_WINNT=0x0510
573Drivers_DEFS = IN_IDE_R3
574ifdef VBOX_WITH_NETFLT
575Drivers_DEFS += VBOX_WITH_NETFLT
576endif
577ifdef VBOX_WITH_FAULT_INJECTION
578Drivers_DEFS += VBOX_WITH_FAULT_INJECTION
579endif
580Drivers_INCS := \
581 $(PATH_SUB_CURRENT) \
582 Network/slirp
583Drivers_SOURCES = \
584 Audio/audio.c \
585 Audio/audiosniffer.c \
586 Audio/mixeng.c \
587 Audio/noaudio.c \
588 Input/DrvKeyboardQueue.cpp \
589 Input/DrvMouseQueue.cpp \
590 Network/DrvIntNet.cpp \
591 PC/DrvACPI.cpp \
592 Serial/DrvChar.cpp \
593 Serial/DrvNamedPipe.cpp \
594 Storage/DrvBlock.cpp \
595 Storage/DrvHostBase.cpp \
596 Storage/DrvHostDVD.cpp \
597 Storage/DrvHostFloppy.cpp \
598 Storage/DrvMediaISO.cpp \
599 Storage/DrvRawImage.cpp \
600 Storage/Debug.cpp \
601 Storage/DrvVD.cpp \
602 Network/DrvNetSniffer.cpp \
603 Network/Pcap.cpp
604
605VBOX_SLIRP_SOURCES = \
606 Network/DrvNAT.cpp \
607 Network/slirp/bootp.c \
608 Network/slirp/cksum.c \
609 Network/slirp/debug.c \
610 Network/slirp/if.c \
611 Network/slirp/ip_icmp.c \
612 Network/slirp/ip_input.c \
613 Network/slirp/ip_output.c \
614 Network/slirp/mbuf.c \
615 Network/slirp/misc.c \
616 Network/slirp/sbuf.c \
617 Network/slirp/slirp.c \
618 Network/slirp/socket.c \
619 Network/slirp/tcp_input.c \
620 Network/slirp/tcp_output.c \
621 Network/slirp/tcp_subr.c \
622 Network/slirp/tcp_timer.c \
623 Network/slirp/tftp.c \
624 Network/slirp/udp.c
625
626# some day will be deleted
627VBOX_WITH_SIMPLIFIED_SLIRP_SYNC=1
628
629Drivers_SOURCES += $(VBOX_SLIRP_SOURCES)
630define def_vbox_slirp_cflags
631 $(file)_DEFS += \
632 $(if $(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC), VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) \
633 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
634 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,)
635 ifeq ($(KBUILD_TARGET),win)
636 $(file)_CFLAGS = -wd4018
637 else
638 $(file)_CFLAGS = -Wno-sign-compare
639 endif
640endef
641$(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(def_vbox_slirp_cflags)))
642
643# -- OS specific --
644
645ifeq ($(KBUILD_TARGET),darwin)
646Drivers_SOURCES := $(filter-out \
647 Storage/DrvHostRaw% \
648 Storage/DrvHostFloppy% \
649 , $(Drivers_SOURCES)) \
650 Audio/coreaudio.c
651Drivers_SOURCES.darwin = \
652 Serial/DrvHostSerial.cpp
653endif # darwin
654
655ifeq ($(KBUILD_TARGET),freebsd)
656Drivers_SOURCES := $(filter-out \
657 Storage/DrvHost% \
658 , $(Drivers_SOURCES))
659Drivers_SOURCES.freebsd =
660endif # freebsd
661
662
663ifeq ($(KBUILD_TARGET),l4)
664Drivers_SOURCES = \
665 Input/DrvMouseQueue.cpp \
666 Input/DrvKeyboardQueue.cpp \
667 Storage/DrvBlock.cpp \
668 Storage/DrvMediaISO.cpp \
669 Storage/DrvRawImage.cpp \
670 Storage/DrvHostBase.cpp \
671 Storage/DrvHostDVD.cpp \
672 Storage/DrvVD.cpp \
673 PC/DrvACPI.cpp \
674 Network/DrvIntNet.cpp \
675 Network/DrvNetSniffer.cpp \
676 Network/Pcap.cpp \
677 Audio/audio.c \
678 Audio/mixeng.c \
679 Audio/noaudio.c \
680 Audio/audiosniffer.c
681
682Drivers_SOURCES.l4 = \
683 Network/DrvTAP.cpp \
684 Audio/ossaudio.c
685endif # l4
686
687Drivers_SOURCES.linux = \
688 Network/DrvTAP.cpp \
689 Audio/ossaudio.c \
690 Parallel/DrvHostParallel.cpp \
691 Serial/DrvHostSerial.cpp
692
693ifeq ($(KBUILD_TARGET),os2)
694Drivers_SOURCES := $(filter-out \
695 Storage/DrvHost% \
696 , $(Drivers_SOURCES))
697Drivers_SOURCES.os2 = \
698 Network/DrvTAPOs2.cpp
699endif
700
701ifeq ($(KBUILD_TARGET),solaris)
702Drivers_SOURCES := $(filter-out \
703 Storage/DrvHost% \
704 , $(Drivers_SOURCES))
705Drivers_SOURCES.solaris = \
706 Audio/solaudio.c \
707 $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
708 Storage/DrvHostBase.cpp \
709 Storage/DrvHostDVD.cpp \
710 Serial/DrvHostSerial.cpp
711 ifdef VBOX_WITH_CROSSBOW
712 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
713 Drivers_DEFS += VBOX_WITH_CROSSBOW
714 endif
715 ifdef VBOX_WITH_SUID_WRAPPER
716 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
717 endif
718endif
719
720Drivers_SOURCES.win = \
721 Network/DrvTAPWin.cpp \
722 Audio/dsoundaudio.c \
723 Serial/DrvHostSerial.cpp
724
725if defined(VBOX_WITH_NETFLT)
726 if defined(VBOX_NETFLT_ONDEMAND_BIND)
727 Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
728 endif
729 Drivers_SOURCES.win += Network/win/DrvIntNet-win.cpp
730endif
731
732# -- features --
733
734ifdef VBOX_WITH_ISCSI
735 VBoxDDU_SOURCES += \
736 Storage/ISCSIHDDCore.cpp
737 VBoxDDU_DEFS += VBOX_WITH_ISCSI
738 Storage/DrvVD.cpp_INCS = \
739 Network/lwip/src/include \
740 Network/lwip/src/include/ipv4 \
741 Network/lwip/vbox/include
742endif # VBOX_WITH_ISCSI
743
744ifdef VBOX_WITH_ALSA
745 Drivers_DEFS.linux += VBOX_WITH_ALSA
746 Drivers_SOURCES.linux+= \
747 Audio/alsaaudio.c \
748 Audio/alsa_stubs.c
749# VBoxDD_LIBS.linux += asound
750endif
751
752ifdef VBOX_WITH_PULSE
753 Drivers_DEFS.linux += VBOX_WITH_PULSE
754 Drivers_SOURCES.linux+= \
755 Audio/pulseaudio.c \
756 Audio/pulse_stubs.c
757# VBoxDD_LIBS.linux += pulse
758endif
759
760ifdef VBOX_WITH_USB
761 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
762 Drivers_SOURCES += \
763 USB/DrvVUSBRootHub.cpp \
764 USB/VUSBDevice.cpp \
765 USB/VUSBUrb.cpp
766 ifdef VBOX_WITH_VRDP
767 Drivers_DEFS += VBOX_WITH_VRDP
768 Drivers_SOURCES += \
769 USB/vrdp/USBProxyDevice-vrdp.cpp
770 endif
771
772 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
773 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
774 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
775 endif
776 Drivers_SOURCES.darwin += \
777 USB/USBProxyDevice.cpp \
778 USB/darwin/USBProxyDevice-darwin.cpp
779
780 Drivers_DEFS.linux += \
781 VUSB_HAVE_USBPROXY_DEVICE \
782 $(if $(VBOX_WITHOUT_LINUX_COMPILER_H),VBOX_WITHOUT_LINUX_COMPILER_H,) \
783 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
784 Drivers_SOURCES.linux += \
785 USB/USBProxyDevice.cpp \
786 USB/linux/USBProxyDevice-linux.cpp
787
788 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
789 Drivers_SOURCES.l4 += \
790 USB/USBProxyDevice.cpp \
791 USB/linux/USBProxyDevice-linux.cpp
792
793 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
794 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
795 Drivers_SOURCES.os2 += \
796 USB/USBProxyDevice.cpp \
797 USB/os2/USBProxyDevice-os2.cpp
798
799 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
800 Drivers_SOURCES.win += \
801 USB/USBProxyDevice.cpp \
802 USB/win/USBProxyDevice-win.cpp
803
804 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
805 Drivers_SOURCES.solaris += \
806 USB/USBProxyDevice.cpp \
807 USB/solaris/USBProxyDevice-solaris.cpp
808endif # VBOX_WITH_USB
809
810ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
811 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
812 Drivers_SOURCES += \
813 Storage/DrvRawImageAsync.cpp \
814 Storage/DrvTransportAsync.cpp
815endif #VBOX_WITH_PDM_ASYNC_COMPLETION
816
817ifdef VBOX_WITH_SCSI
818 Drivers_DEFS += VBOX_WITH_SCSI
819 Drivers_SOURCES += \
820 Storage/DrvSCSI.cpp
821 Drivers_SOURCES.linux += \
822 Storage/DrvSCSIHost.cpp
823endif # VBOX_WITH_SCSI
824
825ifdef VBOX_WITH_FAULT_INJECTION
826 Drivers_DEFS += VBOX_WITH_FAULT_INJECTION
827 Drivers_SOURCES += \
828 Storage/DrvFaultInject.cpp
829endif # VBOX_WITH_FAULT_INJECTION
830
831#
832# Ring-0 Services (library, linked into VMMR0.r0)
833#
834ServicesR0_TEMPLATE = VBOXR0
835ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
836ServicesR0_SOURCES = \
837 Network/SrvIntNetR0.cpp
838
839if defined(VBOX_WITH_NETFLT)
840 ServicesR0_SOURCES.win.amd64 += Network/win/SrvIntNetR0A-win.asm
841 ServicesR0_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
842endif
843
844
845#
846# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
847#
848ifdef VBOX_WITH_TESTCASES
849 PROGRAMS += tstIntNetR0
850 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
851 tstIntNetR0_DEFS = IN_INTNET_R0
852 tstIntNetR0_SOURCES = \
853 Network/testcase/tstIntNetR0.cpp
854endif
855
856#
857# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
858#
859ifdef VBOX_WITH_TESTCASES
860 PROGRAMS += tstIntNet-1
861 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
862 tstIntNet-1_SOURCES = \
863 Network/testcase/tstIntNet-1.cpp \
864 Network/Pcap.cpp
865endif
866
867
868#
869# EEPROM device unit test requires cppunit
870#
871ifdef VBOX_WITH_CPPUNIT_TESTCASES
872ifdef VBOX_WITH_E1000
873 PROGRAMS += tstDevEEPROM
874 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
875 tstDevEEPROM_SOURCES = \
876 Network/testcase/tstDevEEPROM.cpp
877 tstDevEEPROM_LIBS = \
878 $(TARGET_DevicesR3)
879 PROGRAMS += tstDevPhy
880 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
881 tstDevPhy_SOURCES = \
882 Network/testcase/tstDevPhy.cpp \
883 Network/DevE1000Phy.cpp
884 tstDevPhy_DEFS = PHY_UNIT_TEST
885endif
886endif
887
888include $(KBUILD_PATH)/subfooter.kmk
889
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