VirtualBox

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

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

NAT: using host resolver instead of dnsproxy.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 25.5 KB
Line 
1# $Id: Makefile.kmk 22843 2009-09-08 16:51: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
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
466#
467# VBoxDDGC (sysmod)
468#
469VBoxDDGC_TEMPLATE = VBOXGC
470VBoxDDGC_SYSSUFF = .gc
471ifeq ($(KBUILD_TARGET_ARCH),x86)
472 VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
473endif
474VBoxDDGC_DEFS =
475VBoxDDGC_INCS := \
476 $(PATH_SUB_CURRENT)
477VBoxDDGC_SOURCES = \
478 Bus/DevPCI.cpp \
479 Graphics/DevVGA.cpp \
480 Input/DevPS2.cpp \
481 PC/DevACPI.cpp \
482 PC/DevPit-i8254.cpp \
483 PC/DevPIC.cpp \
484 PC/DevRTC.cpp \
485 Storage/DevATA.cpp \
486 Network/DevPCNet.cpp \
487 Serial/DevSerial.cpp \
488 Parallel/DevParallel.cpp
489
490ifdef VBOX_DYNAMIC_NET_ATTACH
491 VBoxDDGC_DEFS += VBOX_DYNAMIC_NET_ATTACH
492endif
493
494ifdef VBOX_WITH_E1000
495 VBoxDDGC_DEFS += VBOX_WITH_E1000
496 VBoxDDGC_SOURCES += \
497 Network/DevE1000.cpp \
498 Network/DevE1000Phy.cpp
499endif
500
501ifdef VBOX_WITH_HGSMI
502 VBoxDDGC_DEFS += VBOX_WITH_HGSMI
503endif
504
505ifdef VBOX_WITH_USB
506VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
507VBoxDDGC_SOURCES += \
508 USB/DevOHCI.cpp
509
510 ifdef VBOX_WITH_EHCI
511 VBoxDDGC_DEFS += VBOX_WITH_EHCI
512 VBoxDDGC_SOURCES += \
513 USB/DevEHCI.cpp
514 endif
515
516endif
517
518ifdef VBOX_WITH_HGSMI
519 VBoxDDGC_DEFS += VBOX_WITH_HGSMI
520endif
521ifdef VBOX_WITH_VIDEOHWACCEL
522 VBoxDDGC_DEFS += VBOX_WITH_VIDEOHWACCEL
523endif
524
525ifdef VBOX_WITH_AHCI
526VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
527VBoxDDGC_SOURCES += \
528 Storage/DevAHCI.cpp \
529 Storage/ATAController.cpp
530endif
531
532ifdef VBOX_WITH_BUSLOGIC
533VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
534VBoxDDGC_SOURCES += \
535 Storage/DevBusLogic.cpp
536endif
537
538ifdef VBOX_WITH_LSILOGIC
539VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
540VBoxDDGC_SOURCES += \
541 Storage/DevLsiLogicSCSI.cpp
542endif
543
544ifdef VBOX_WITH_HPET
545VBoxDDGC_DEFS += VBOX_WITH_HPET
546VBoxDDGC_SOURCES += PC/DevHPET.cpp
547endif
548
549ifeq ($(VBOX_LDR_FMT32),pe)
550VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
551endif
552if1of ($(VBOX_LDR_FMT32), pe lx)
553VBoxDDGC_LIBS = \
554 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
555 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
556endif
557
558
559#
560# VBoxDDR0 (sysmod)
561#
562VBoxDDR0_TEMPLATE = VBOXR0
563VBoxDDR0_SYSSUFF = .r0
564VBoxDDR0_DEFS.darwin.x86= VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
565VBoxDDR0_DEFS = IN_RT_R0
566VBoxDDR0_INCS := \
567 $(PATH_SUB_CURRENT)
568VBoxDDR0_SOURCES = \
569 Bus/DevPCI.cpp \
570 Graphics/DevVGA.cpp \
571 Input/DevPS2.cpp \
572 PC/DevACPI.cpp \
573 PC/DevPit-i8254.cpp \
574 PC/DevPIC.cpp \
575 PC/DevRTC.cpp \
576 Storage/DevATA.cpp \
577 Network/DevPCNet.cpp \
578 Serial/DevSerial.cpp \
579 Parallel/DevParallel.cpp
580
581ifdef VBOX_DYNAMIC_NET_ATTACH
582 VBoxDDR0_DEFS += VBOX_DYNAMIC_NET_ATTACH
583endif
584
585ifdef VBOX_WITH_E1000
586 VBoxDDR0_DEFS += VBOX_WITH_E1000
587 VBoxDDR0_SOURCES += \
588 Network/DevE1000.cpp \
589 Network/DevE1000Phy.cpp
590endif
591
592ifdef VBOX_WITH_HGSMI
593 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
594endif
595
596ifdef VBOX_WITH_USB
597VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
598VBoxDDR0_SOURCES += \
599 USB/DevOHCI.cpp
600
601 ifdef VBOX_WITH_EHCI
602 VBoxDDR0_DEFS += VBOX_WITH_EHCI
603 VBoxDDR0_SOURCES += \
604 USB/DevEHCI.cpp
605 endif
606endif
607
608ifdef VBOX_WITH_AHCI
609VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
610VBoxDDR0_SOURCES += \
611 Storage/DevAHCI.cpp \
612 Storage/ATAController.cpp
613endif
614
615ifdef VBOX_WITH_BUSLOGIC
616VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
617VBoxDDR0_SOURCES += \
618 Storage/DevBusLogic.cpp
619endif
620
621ifdef VBOX_WITH_LSILOGIC
622VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
623VBoxDDR0_SOURCES += \
624 Storage/DevLsiLogicSCSI.cpp
625endif
626
627ifdef VBOX_WITH_HGSMI
628 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
629endif
630ifdef VBOX_WITH_VIDEOHWACCEL
631 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
632endif
633
634
635ifdef VBOX_WITH_HPET
636VBoxDDR0_DEFS += VBOX_WITH_HPET
637VBoxDDR0_SOURCES += PC/DevHPET.cpp
638endif
639
640ifeq ($(VBOX_LDR_FMT32),pe)
641VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
642endif
643if1of ($(VBOX_LDR_FMT), pe lx)
644VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
645endif
646
647#
648# VBoxDD2GC (LGPL sysmod)
649#
650VBoxDD2GC_TEMPLATE = VBOXGC
651VBoxDD2GC_DEFS =
652VBoxDD2GC_SYSSUFF = .gc
653VBoxDD2GC_INCS := \
654 $(PATH_SUB_CURRENT)
655VBoxDD2GC_SOURCES = \
656 PC/DevAPIC.cpp
657ifeq ($(VBOX_LDR_FMT32),pe)
658VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
659endif
660if1of ($(VBOX_LDR_FMT32), pe lx)
661VBoxDD2GC_LIBS = \
662 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
663 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
664endif
665
666
667#
668# VBoxDD2R0 (LGPL sysmod)
669#
670VBoxDD2R0_TEMPLATE = VBOXR0
671VBoxDD2R0_DEFS = IN_RT_R0
672VBoxDD2R0_SYSSUFF = .r0
673VBoxDD2R0_INCS := \
674 $(PATH_SUB_CURRENT)
675VBoxDD2R0_SOURCES = \
676 PC/DevAPIC.cpp
677ifeq ($(VBOX_LDR_FMT),pe)
678VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
679endif
680if1of ($(VBOX_LDR_FMT), pe lx)
681VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
682endif
683
684
685#
686# Drivers (library)
687#
688ifeq ($(KBUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
689Drivers_TEMPLATE = VBOXR3NP
690else
691Drivers_TEMPLATE = VBOXR3
692endif
693Drivers_SDKS.win = WINPSDK W2K3DDK
694Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
695Drivers_DEFS.win += _WIN32_WINNT=0x0510
696Drivers_DEFS = IN_IDE_R3
697ifdef VBOX_WITH_NETFLT
698Drivers_DEFS += VBOX_WITH_NETFLT
699endif
700ifdef VBOX_WITH_FAULT_INJECTION
701Drivers_DEFS += VBOX_WITH_FAULT_INJECTION
702endif
703
704Drivers_INCS := \
705 $(PATH_SUB_CURRENT) \
706 Network/slirp
707Drivers_SOURCES = \
708 Audio/audio.c \
709 Audio/audiosniffer.c \
710 Audio/mixeng.c \
711 Audio/noaudio.c \
712 Input/DrvKeyboardQueue.cpp \
713 Input/DrvMouseQueue.cpp \
714 Network/DrvIntNet.cpp \
715 PC/DrvACPI.cpp \
716 Serial/DrvChar.cpp \
717 Serial/DrvNamedPipe.cpp \
718 Serial/DrvRawFile.cpp \
719 Storage/DrvBlock.cpp \
720 Storage/DrvHostBase.cpp \
721 Storage/DrvHostDVD.cpp \
722 Storage/DrvHostFloppy.cpp \
723 Storage/DrvMediaISO.cpp \
724 Storage/DrvRawImage.cpp \
725 Storage/Debug.cpp \
726 Storage/DrvVD.cpp \
727 Network/DrvNetSniffer.cpp \
728 Network/Pcap.cpp
729
730VBOX_SLIRP_SOURCES = \
731 Network/DrvNAT.cpp \
732 Network/slirp/bootp.c \
733 Network/slirp/cksum.c \
734 Network/slirp/debug.c \
735 Network/slirp/if.c \
736 Network/slirp/ip_icmp.c \
737 Network/slirp/ip_input.c \
738 Network/slirp/ip_output.c \
739 Network/slirp/mbuf.c \
740 Network/slirp/misc.c \
741 Network/slirp/sbuf.c \
742 Network/slirp/slirp.c \
743 Network/slirp/socket.c \
744 Network/slirp/tcp_input.c \
745 Network/slirp/tcp_output.c \
746 Network/slirp/tcp_subr.c \
747 Network/slirp/tcp_timer.c \
748 Network/slirp/tftp.c \
749 Network/slirp/udp.c \
750 Network/slirp/dnsproxy/hash.c \
751 Network/slirp/dnsproxy/dnsproxy.c
752
753VBOX_SLIRP_ALIAS_SOURCES = \
754 Network/slirp/libalias/alias.c \
755 Network/slirp/libalias/alias_db.c \
756 Network/slirp/libalias/alias_mod.c \
757 Network/slirp/libalias/alias_proxy.c \
758 Network/slirp/libalias/alias_ftp.c \
759 Network/slirp/libalias/alias_dns.c \
760 Network/slirp/libalias/alias_nbt.c \
761 Network/slirp/libalias/alias_util.c
762
763# some day will be deleted
764
765Drivers_SOURCES += $(VBOX_SLIRP_SOURCES)
766define def_vbox_slirp_cflags
767 $(file)_DEFS += \
768 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
769 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
770 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
771 $(file)_INCS += $(1)/slirp
772 $(file)_INCS += $(1)/slirp/libalias
773 ifeq ($(KBUILD_TARGET),win)
774 $(file)_CFLAGS = -wd4018
775 else
776 $(file)_CFLAGS = -Wno-sign-compare
777 endif
778endef
779$(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
780
781Drivers_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
782define def_vbox_slirp_alias_cflags
783 $(file)_DEFS += VBOX_SLIRP_ALIAS
784 $(file)_INCS += $(1)/slirp/libalias
785 $(file)_INCS += $(1)/slirp
786 $(file)_INCS += $(1)/slirp/dnsproxy
787endef
788$(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
789$(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
790
791# -- OS specific --
792
793ifeq ($(KBUILD_TARGET),darwin)
794Drivers_SOURCES := $(filter-out \
795 Storage/DrvHostRaw% \
796 Storage/DrvHostFloppy% \
797 , $(Drivers_SOURCES)) \
798 Audio/coreaudio.c
799Drivers_SOURCES.darwin = \
800 Serial/DrvHostSerial.cpp
801endif # darwin
802
803ifeq ($(KBUILD_TARGET),freebsd)
804Drivers_SOURCES := $(filter-out \
805 Storage/DrvHostFloppy% \
806 , $(Drivers_SOURCES)) \
807 Audio/ossaudio.c
808Drivers_SOURCES.freebsd = \
809 Network/DrvTAP.cpp
810endif # freebsd
811
812
813ifeq ($(KBUILD_TARGET),l4)
814Drivers_SOURCES = \
815 Input/DrvMouseQueue.cpp \
816 Input/DrvKeyboardQueue.cpp \
817 Storage/DrvBlock.cpp \
818 Storage/DrvMediaISO.cpp \
819 Storage/DrvRawImage.cpp \
820 Storage/DrvHostBase.cpp \
821 Storage/DrvHostDVD.cpp \
822 Storage/DrvVD.cpp \
823 PC/DrvACPI.cpp \
824 Network/DrvIntNet.cpp \
825 Network/DHCPServerRunner.cpp \
826 Network/DrvNetSniffer.cpp \
827 Network/Pcap.cpp \
828 Audio/audio.c \
829 Audio/mixeng.c \
830 Audio/noaudio.c \
831 Audio/audiosniffer.c
832
833Drivers_SOURCES.l4 = \
834 Audio/ossaudio.c
835endif # l4
836
837Drivers_SOURCES.linux = \
838 Network/DrvTAP.cpp \
839 Audio/ossaudio.c \
840 Parallel/DrvHostParallel.cpp \
841 Serial/DrvHostSerial.cpp
842
843ifeq ($(KBUILD_TARGET),os2)
844Drivers_SOURCES := $(filter-out \
845 Storage/DrvHost% \
846 , $(Drivers_SOURCES))
847endif
848
849ifeq ($(KBUILD_TARGET),solaris)
850Drivers_SOURCES := $(filter-out \
851 Storage/DrvHost% \
852 , $(Drivers_SOURCES))
853Drivers_SOURCES.solaris = \
854 Audio/solaudio.c \
855 Storage/DrvHostBase.cpp \
856 Storage/DrvHostDVD.cpp \
857 Serial/DrvHostSerial.cpp
858 ifdef VBOX_WITH_SOLARIS_OSS
859 Drivers_SOURCES += Audio/ossaudio.c
860 Drivers_DEFS += VBOX_WITH_SOLARIS_OSS
861 endif
862 ifdef VBOX_WITH_CROSSBOW
863 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
864 Drivers_DEFS += VBOX_WITH_CROSSBOW
865 endif
866 ifdef VBOX_WITH_SUID_WRAPPER
867 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
868 endif
869endif
870
871Drivers_SOURCES.win = \
872 Audio/dsoundaudio.c \
873 Serial/DrvHostSerial.cpp
874
875if defined(VBOX_WITH_NETFLT)
876 if defined(VBOX_NETFLT_ONDEMAND_BIND)
877 Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
878 endif
879endif
880
881# -- features --
882
883ifdef VBOX_WITH_ISCSI
884 VBoxDDU_SOURCES += \
885 Storage/ISCSIHDDCore.cpp
886 VBoxDDU_DEFS += VBOX_WITH_ISCSI
887 Storage/DrvVD.cpp_INCS = \
888 Network/lwip/src/include \
889 Network/lwip/src/include/ipv4 \
890 Network/lwip/vbox/include
891endif # VBOX_WITH_ISCSI
892
893ifdef VBOX_WITH_ALSA
894 Drivers_DEFS.linux += VBOX_WITH_ALSA
895 Drivers_SOURCES.linux+= \
896 Audio/alsaaudio.c \
897 Audio/alsa_stubs.c
898endif
899
900ifdef VBOX_WITH_PULSE
901 Drivers_DEFS.linux += VBOX_WITH_PULSE
902 Drivers_SOURCES.linux+= \
903 Audio/pulseaudio.c \
904 Audio/pulse_stubs.c
905endif
906
907ifdef VBOX_WITH_USB
908 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
909 Drivers_SOURCES += \
910 USB/DrvVUSBRootHub.cpp \
911 USB/VUSBDevice.cpp \
912 USB/VUSBReadAhead.cpp \
913 USB/VUSBUrb.cpp
914 ifdef VBOX_WITH_VRDP
915 Drivers_DEFS += VBOX_WITH_VRDP
916 Drivers_SOURCES += \
917 USB/vrdp/USBProxyDevice-vrdp.cpp
918 endif
919
920 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
921 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
922 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
923 endif
924 Drivers_SOURCES.darwin += \
925 USB/USBProxyDevice.cpp \
926 USB/darwin/USBProxyDevice-darwin.cpp
927
928 Drivers_DEFS.linux += \
929 VUSB_HAVE_USBPROXY_DEVICE \
930 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
931 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
932 Drivers_SOURCES.linux += \
933 USB/USBProxyDevice.cpp \
934 USB/linux/USBProxyDevice-linux.cpp
935
936 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
937 Drivers_SOURCES.l4 += \
938 USB/USBProxyDevice.cpp \
939 USB/linux/USBProxyDevice-linux.cpp
940
941 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
942 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
943 Drivers_SOURCES.os2 += \
944 USB/USBProxyDevice.cpp \
945 USB/os2/USBProxyDevice-os2.cpp
946
947 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
948 Drivers_SOURCES.win += \
949 USB/USBProxyDevice.cpp \
950 USB/win/USBProxyDevice-win.cpp
951
952 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
953 Drivers_SOURCES.solaris += \
954 USB/USBProxyDevice.cpp \
955 USB/solaris/$(if $(VBOX_WITH_NEW_USB_CODE_ON_SOLARIS),USBProxyDevice2-solaris.cpp,USBProxyDevice-solaris.cpp)
956endif # VBOX_WITH_USB
957
958ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
959 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
960endif #VBOX_WITH_PDM_ASYNC_COMPLETION
961
962ifdef VBOX_WITH_SCSI
963 Drivers_DEFS += VBOX_WITH_SCSI
964 Drivers_SOURCES += \
965 Storage/DrvSCSI.cpp
966 Drivers_SOURCES.linux += \
967 Storage/DrvSCSIHost.cpp
968endif # VBOX_WITH_SCSI
969
970#
971# Ring-0 Services (library, linked into VMMR0.r0)
972#
973ServicesR0_TEMPLATE = VBOXR0
974ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
975ServicesR0_SOURCES = \
976 Network/SrvIntNetR0.cpp
977
978if defined(VBOX_WITH_NETFLT)
979 ServicesR0_SOURCES.win.amd64 += Network/win/SrvIntNetR0A-win.asm
980 ServicesR0_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
981endif
982
983
984#
985# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
986#
987ifdef VBOX_WITH_TESTCASES
988 PROGRAMS += tstIntNetR0
989 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
990 tstIntNetR0_DEFS = IN_INTNET_R0
991 tstIntNetR0_SOURCES = \
992 Network/testcase/tstIntNetR0.cpp
993endif
994
995#
996# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
997#
998ifdef VBOX_WITH_TESTCASES
999 PROGRAMS += tstIntNet-1
1000 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
1001 tstIntNet-1_SOURCES = \
1002 Network/testcase/tstIntNet-1.cpp \
1003 Network/Pcap.cpp
1004endif
1005
1006
1007#
1008# EEPROM device unit test requires cppunit
1009#
1010ifdef VBOX_WITH_CPPUNIT_TESTCASES
1011ifdef VBOX_WITH_E1000
1012 PROGRAMS += tstDevEEPROM
1013 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1014 tstDevEEPROM_SOURCES = \
1015 Network/testcase/tstDevEEPROM.cpp
1016 tstDevEEPROM_LIBS = \
1017 $(TARGET_DevicesR3)
1018 PROGRAMS += tstDevPhy
1019 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1020 tstDevPhy_SOURCES = \
1021 Network/testcase/tstDevPhy.cpp \
1022 Network/DevE1000Phy.cpp
1023 tstDevPhy_DEFS = PHY_UNIT_TEST
1024endif
1025endif
1026
1027include $(KBUILD_PATH)/subfooter.kmk
1028
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