VirtualBox

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

Last change on this file since 22432 was 22396, checked in by vboxsync, 15 years ago

FreeBSD: Add support for tap interface networking. Contributed by Juergen Lock

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