VirtualBox

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

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

EFI: polished r46371

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette