VirtualBox

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

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

Devices: Finally adding the first dtrace probes. :-)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 25.4 KB
Line 
1# $Id: Makefile.kmk 21561 2009-07-14 00:27:26Z 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
321
322
323ifdef VBOX_WITH_INIP
324DevicesR3_INCS += \
325 Network/lwip/src/include \
326 Network/lwip/src/include/ipv4 \
327 Network/lwip/vbox/include
328DevicesR3_SOURCES += \
329 Network/lwip/src/api/api_lib.c \
330 Network/lwip/src/api/api_msg.c \
331 Network/lwip/src/api/err.c \
332 Network/lwip/src/api/sockets.c \
333 Network/lwip/src/api/tcpip.c \
334 Network/lwip/src/core/tcp_in.c \
335 Network/lwip/src/core/dhcp.c \
336 Network/lwip/src/core/inet.c \
337 Network/lwip/src/core/mem.c \
338 Network/lwip/src/core/memp.c \
339 Network/lwip/src/core/netif.c \
340 Network/lwip/src/core/pbuf.c \
341 Network/lwip/src/core/raw.c \
342 Network/lwip/src/core/stats.c \
343 Network/lwip/src/core/sys.c \
344 Network/lwip/src/core/tcp.c \
345 Network/lwip/src/core/ipv4/ip_addr.c \
346 Network/lwip/src/core/ipv4/icmp.c \
347 Network/lwip/src/core/ipv4/ip.c \
348 Network/lwip/src/core/ipv4/ip_frag.c \
349 Network/lwip/src/core/tcp_out.c \
350 Network/lwip/src/core/udp.c \
351 Network/lwip/src/netif/etharp.c \
352 Network/lwip/vbox/sys_arch.c \
353 Network/DevINIP.cpp
354DevicesR3_DEFS += VBOX_WITH_INIP
355endif
356
357ifdef VBOX_WITH_AHCI
358DevicesR3_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
359DevicesR3_SOURCES += \
360 Storage/DevAHCI.cpp \
361 Storage/ATAController.cpp
362endif
363
364ifdef VBOX_WITH_BUSLOGIC
365DevicesR3_DEFS += VBOX_WITH_BUSLOGIC
366DevicesR3_SOURCES += \
367 Storage/DevBusLogic.cpp \
368 Storage/VBoxSCSI.cpp
369endif
370
371ifdef VBOX_WITH_LSILOGIC
372DevicesR3_DEFS += VBOX_WITH_LSILOGIC
373DevicesR3_SOURCES += \
374 Storage/DevLsiLogicSCSI.cpp
375endif
376
377ifdef VBOX_WITH_HPET
378DevicesR3_DEFS += VBOX_WITH_HPET
379DevicesR3_SOURCES += PC/DevHPET.cpp
380endif
381
382ifdef VBOX_WITH_SMC
383DevicesR3_DEFS += VBOX_WITH_SMC
384DevicesR3_SOURCES += PC/DevSMC.cpp
385endif
386
387ifdef VBOX_WITH_LPC
388DevicesR3_DEFS += VBOX_WITH_LPC
389DevicesR3_SOURCES += PC/DevLPC.cpp
390endif
391
392ifdef VBOX_WITH_EFI
393DevicesR3_DEFS += VBOX_WITH_EFI
394 ifdef VBOX_WITH_ALT_EFITHUNK
395 DevicesR3_DEFS += VBOX_WITH_ALT_EFITHUNK
396 endif
397DevicesR3_SOURCES += EFI/DevEFI.cpp
398EFI/DevEFI.cpp_INCS += EFI/tools/include
399EFI/DevEFI.cpp_INCS.x86 += EFI/tools/include/Ia32
400EFI/DevEFI.cpp_INCS.amd64 += EFI/tools/include/X64
401endif
402
403ifdef VBOX_WITH_DYNAMIC_DSDT
404DevicesR3_DEFS += VBOX_WITH_DYNAMIC_DSDT
405endif
406
407ifdef VBOX_WITH_USB
408DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
409
410DevicesR3_SOURCES += \
411 USB/DevOHCI.cpp
412
413 ifdef VBOX_WITH_EHCI
414 DevicesR3_DEFS += VBOX_WITH_EHCI
415 DevicesR3_SOURCES += \
416 USB/DevEHCI.cpp
417 endif
418endif
419
420ifdef VBOX_WITH_DTRACE_R3
421 DevicesR3_TEMPLATE = VBOXR3OSX105
422 DevicesR3_DEFS += VBOX_WITH_DTRACE
423 DevicesR3_INCS += $(DevicesR3_0_OUTDIR)
424 DevicesR3_INTERMEDIATES += $(DevicesR3_0_OUTDIR)/VBoxDD-dtrace.h
425 $$(DevicesR3_0_OUTDIR)/VBoxDD-dtrace.h: $(PATH_CURRENT)/VBoxDD-dtrace.d | $$(dir $$@)
426 dtrace -C -h -o $@ -s $<
427endif
428
429ifdef VBOX_WITH_DYNAMIC_DSDT
430 DevicesR3_CLEAN += $(PATH_DevicesR3)/vboxdsl.hex
431 PC/ACPI/VBoxAcpi.cpp_DEPS = $(PATH_DevicesR3)/vboxdsl.hex
432
433 $$(PATH_DevicesR3)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
434 $(call MSG_TOOL,bin2c,DevicesR3,$<,$@)
435 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
436
437 vboxdsl.hex:: $$(PATH_DevicesR3)/vboxdsl.hex
438
439else # !VBOX_WITH_DYNAMIC_DSDT
440 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
441 DevicesR3_CLEAN += $(PATH_DevicesR3)/vboxaml.hex $(PATH_DevicesR3)/vboxaml.aml
442 PC/ACPI/VBoxAcpi.cpp_DEPS = $(PATH_DevicesR3)/vboxaml.hex
443
444 $$(PATH_DevicesR3)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
445 $(call MSG_TOOL,iasl,DevicesR3,$<,$@)
446 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
447
448 vboxaml.hex:: $$(PATH_DevicesR3)/vboxaml.hex
449
450endif # !VBOX_WITH_DYNAMIC_DSDT
451PC/ACPI/VBoxAcpi.cpp_INCS = $(PATH_DevicesR3)
452
453# For finding PCIInternal.h from VBox/pci.h.
454Bus/DevPCI.cpp_INCS = Bus
455
456# For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
457Graphics/DevVGA.cpp_INCS = $(PATH_VgaBiosBin)
458Graphics/DevVGA.cpp_DEPS = $(PATH_VgaBiosBin)/vbetables.h
459
460# Reporting it to the guest.
461VMMDev/VMMDev.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
462
463
464#
465# VBoxDDGC (sysmod)
466#
467VBoxDDGC_TEMPLATE = VBOXGC
468VBoxDDGC_SYSSUFF = .gc
469ifeq ($(KBUILD_TARGET_ARCH),x86)
470 VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
471endif
472VBoxDDGC_DEFS =
473VBoxDDGC_INCS := \
474 $(PATH_SUB_CURRENT)
475VBoxDDGC_SOURCES = \
476 Bus/DevPCI.cpp \
477 Graphics/DevVGA.cpp \
478 Input/DevPS2.cpp \
479 PC/DevACPI.cpp \
480 PC/DevPit-i8254.cpp \
481 PC/DevPIC.cpp \
482 PC/DevRTC.cpp \
483 Storage/DevATA.cpp \
484 Network/DevPCNet.cpp \
485 Serial/DevSerial.cpp \
486 Parallel/DevParallel.cpp
487
488ifdef VBOX_DYNAMIC_NET_ATTACH
489 VBoxDDGC_DEFS += VBOX_DYNAMIC_NET_ATTACH
490endif
491
492ifdef VBOX_WITH_E1000
493 VBoxDDGC_DEFS += VBOX_WITH_E1000
494 VBoxDDGC_SOURCES += \
495 Network/DevE1000.cpp \
496 Network/DevE1000Phy.cpp
497endif
498
499ifdef VBOX_WITH_USB
500VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
501VBoxDDGC_SOURCES += \
502 USB/DevOHCI.cpp
503
504 ifdef VBOX_WITH_EHCI
505 VBoxDDGC_DEFS += VBOX_WITH_EHCI
506 VBoxDDGC_SOURCES += \
507 USB/DevEHCI.cpp
508 endif
509
510endif
511
512ifdef VBOX_WITH_HGSMI
513 VBoxDDGC_DEFS += VBOX_WITH_HGSMI
514endif
515ifdef VBOX_WITH_VIDEOHWACCEL
516 VBoxDDGC_DEFS += VBOX_WITH_VIDEOHWACCEL
517endif
518
519ifdef VBOX_WITH_AHCI
520VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
521VBoxDDGC_SOURCES += \
522 Storage/DevAHCI.cpp \
523 Storage/ATAController.cpp
524endif
525
526ifdef VBOX_WITH_BUSLOGIC
527VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
528VBoxDDGC_SOURCES += \
529 Storage/DevBusLogic.cpp
530endif
531
532ifdef VBOX_WITH_LSILOGIC
533VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
534VBoxDDGC_SOURCES += \
535 Storage/DevLsiLogicSCSI.cpp
536endif
537
538ifdef VBOX_WITH_HPET
539VBoxDDGC_DEFS += VBOX_WITH_HPET
540VBoxDDGC_SOURCES += PC/DevHPET.cpp
541endif
542
543ifeq ($(VBOX_LDR_FMT32),pe)
544VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
545endif
546if1of ($(VBOX_LDR_FMT32), pe lx)
547VBoxDDGC_LIBS = \
548 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
549 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
550endif
551
552
553#
554# VBoxDDR0 (sysmod)
555#
556VBoxDDR0_TEMPLATE = VBOXR0
557VBoxDDR0_SYSSUFF = .r0
558VBoxDDR0_DEFS.darwin.x86= VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
559VBoxDDR0_DEFS = IN_RT_R0
560VBoxDDR0_INCS := \
561 $(PATH_SUB_CURRENT)
562VBoxDDR0_SOURCES = \
563 Bus/DevPCI.cpp \
564 Graphics/DevVGA.cpp \
565 Input/DevPS2.cpp \
566 PC/DevACPI.cpp \
567 PC/DevPit-i8254.cpp \
568 PC/DevPIC.cpp \
569 PC/DevRTC.cpp \
570 Storage/DevATA.cpp \
571 Network/DevPCNet.cpp \
572 Serial/DevSerial.cpp \
573 Parallel/DevParallel.cpp
574
575ifdef VBOX_DYNAMIC_NET_ATTACH
576 VBoxDDR0_DEFS += VBOX_DYNAMIC_NET_ATTACH
577endif
578
579ifdef VBOX_WITH_E1000
580 VBoxDDR0_DEFS += VBOX_WITH_E1000
581 VBoxDDR0_SOURCES += \
582 Network/DevE1000.cpp \
583 Network/DevE1000Phy.cpp
584endif
585
586ifdef VBOX_WITH_USB
587VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
588VBoxDDR0_SOURCES += \
589 USB/DevOHCI.cpp
590
591 ifdef VBOX_WITH_EHCI
592 VBoxDDR0_DEFS += VBOX_WITH_EHCI
593 VBoxDDR0_SOURCES += \
594 USB/DevEHCI.cpp
595 endif
596endif
597
598ifdef VBOX_WITH_AHCI
599VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
600VBoxDDR0_SOURCES += \
601 Storage/DevAHCI.cpp \
602 Storage/ATAController.cpp
603endif
604
605ifdef VBOX_WITH_BUSLOGIC
606VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
607VBoxDDR0_SOURCES += \
608 Storage/DevBusLogic.cpp
609endif
610
611ifdef VBOX_WITH_LSILOGIC
612VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
613VBoxDDR0_SOURCES += \
614 Storage/DevLsiLogicSCSI.cpp
615endif
616
617ifdef VBOX_WITH_HGSMI
618 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
619endif
620ifdef VBOX_WITH_VIDEOHWACCEL
621 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
622endif
623
624
625ifdef VBOX_WITH_HPET
626VBoxDDR0_DEFS += VBOX_WITH_HPET
627VBoxDDR0_SOURCES += PC/DevHPET.cpp
628endif
629
630ifeq ($(VBOX_LDR_FMT32),pe)
631VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
632endif
633if1of ($(VBOX_LDR_FMT), pe lx)
634VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
635endif
636
637#
638# VBoxDD2GC (LGPL sysmod)
639#
640VBoxDD2GC_TEMPLATE = VBOXGC
641VBoxDD2GC_DEFS =
642VBoxDD2GC_SYSSUFF = .gc
643VBoxDD2GC_INCS := \
644 $(PATH_SUB_CURRENT)
645VBoxDD2GC_SOURCES = \
646 PC/DevAPIC.cpp
647ifeq ($(VBOX_LDR_FMT32),pe)
648VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
649endif
650if1of ($(VBOX_LDR_FMT32), pe lx)
651VBoxDD2GC_LIBS = \
652 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
653 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
654endif
655
656
657#
658# VBoxDD2R0 (LGPL sysmod)
659#
660VBoxDD2R0_TEMPLATE = VBOXR0
661VBoxDD2R0_DEFS = IN_RT_R0
662VBoxDD2R0_SYSSUFF = .r0
663VBoxDD2R0_INCS := \
664 $(PATH_SUB_CURRENT)
665VBoxDD2R0_SOURCES = \
666 PC/DevAPIC.cpp
667ifeq ($(VBOX_LDR_FMT),pe)
668VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
669endif
670if1of ($(VBOX_LDR_FMT), pe lx)
671VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
672endif
673
674
675#
676# Drivers (library)
677#
678ifeq ($(KBUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
679Drivers_TEMPLATE = VBOXR3NP
680else
681Drivers_TEMPLATE = VBOXR3
682endif
683Drivers_SDKS.win = WINPSDK W2K3DDK
684Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
685Drivers_DEFS.win += _WIN32_WINNT=0x0510
686Drivers_DEFS = IN_IDE_R3
687ifdef VBOX_WITH_NETFLT
688Drivers_DEFS += VBOX_WITH_NETFLT
689endif
690ifdef VBOX_WITH_FAULT_INJECTION
691Drivers_DEFS += VBOX_WITH_FAULT_INJECTION
692endif
693
694VBOX_WITH_SLIRP_ALIAS=1
695Drivers_INCS := \
696 $(PATH_SUB_CURRENT) \
697 Network/slirp
698Drivers_SOURCES = \
699 Audio/audio.c \
700 Audio/audiosniffer.c \
701 Audio/mixeng.c \
702 Audio/noaudio.c \
703 Input/DrvKeyboardQueue.cpp \
704 Input/DrvMouseQueue.cpp \
705 Network/DrvIntNet.cpp \
706 PC/DrvACPI.cpp \
707 Serial/DrvChar.cpp \
708 Serial/DrvNamedPipe.cpp \
709 Serial/DrvRawFile.cpp \
710 Storage/DrvBlock.cpp \
711 Storage/DrvHostBase.cpp \
712 Storage/DrvHostDVD.cpp \
713 Storage/DrvHostFloppy.cpp \
714 Storage/DrvMediaISO.cpp \
715 Storage/DrvRawImage.cpp \
716 Storage/Debug.cpp \
717 Storage/DrvVD.cpp \
718 Network/DrvNetSniffer.cpp \
719 Network/Pcap.cpp
720
721VBOX_SLIRP_SOURCES = \
722 Network/DrvNAT.cpp \
723 Network/slirp/bootp.c \
724 Network/slirp/cksum.c \
725 Network/slirp/debug.c \
726 Network/slirp/if.c \
727 Network/slirp/ip_icmp.c \
728 Network/slirp/ip_input.c \
729 Network/slirp/ip_output.c \
730 Network/slirp/mbuf.c \
731 Network/slirp/misc.c \
732 Network/slirp/sbuf.c \
733 Network/slirp/slirp.c \
734 Network/slirp/socket.c \
735 Network/slirp/tcp_input.c \
736 Network/slirp/tcp_output.c \
737 Network/slirp/tcp_subr.c \
738 Network/slirp/tcp_timer.c \
739 Network/slirp/tftp.c \
740 Network/slirp/udp.c \
741 Network/slirp/dnsproxy/hash.c \
742 Network/slirp/dnsproxy/dnsproxy.c
743
744VBOX_SLIRP_ALIAS_SOURCES = \
745 Network/slirp/libalias/alias.c \
746 Network/slirp/libalias/alias_db.c \
747 Network/slirp/libalias/alias_mod.c \
748 Network/slirp/libalias/alias_proxy.c \
749 Network/slirp/libalias/alias_ftp.c \
750 Network/slirp/libalias/alias_nbt.c \
751 Network/slirp/libalias/alias_util.c
752
753# some day will be deleted
754VBOX_WITHOUT_SLIRP_CLIENT_ETHER=1
755
756Drivers_SOURCES += $(VBOX_SLIRP_SOURCES)
757define def_vbox_slirp_cflags
758 $(file)_DEFS += \
759 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
760 $(if $(VBOX_WITH_SLIRP_ALIAS),VBOX_WITH_SLIRP_ALIAS,) \
761 $(if $(VBOX_WITHOUT_SLIRP_CLIENT_ETHER),VBOX_WITHOUT_SLIRP_CLIENT_ETHER,) \
762 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
763 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
764 ifdef VBOX_WITH_SLIRP_ALIAS
765 $(file)_INCS += $(1)/slirp
766 $(file)_INCS += $(1)/slirp/libalias
767 endif
768 ifeq ($(KBUILD_TARGET),win)
769 $(file)_CFLAGS = -wd4018
770 else
771 $(file)_CFLAGS = -Wno-sign-compare
772 endif
773endef
774$(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
775
776ifdef VBOX_WITH_SLIRP_ALIAS
777Drivers_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
778define def_vbox_slirp_alias_cflags
779 $(file)_DEFS += VBOX_SLIRP_ALIAS
780 $(file)_INCS += $(1)/slirp/libalias
781 $(file)_INCS += $(1)/slirp
782 $(file)_INCS += $(1)/slirp/dnsproxy
783endef
784$(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
785$(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
786endif
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 =
806endif # freebsd
807
808
809ifeq ($(KBUILD_TARGET),l4)
810Drivers_SOURCES = \
811 Input/DrvMouseQueue.cpp \
812 Input/DrvKeyboardQueue.cpp \
813 Storage/DrvBlock.cpp \
814 Storage/DrvMediaISO.cpp \
815 Storage/DrvRawImage.cpp \
816 Storage/DrvHostBase.cpp \
817 Storage/DrvHostDVD.cpp \
818 Storage/DrvVD.cpp \
819 PC/DrvACPI.cpp \
820 Network/DrvIntNet.cpp \
821 Network/DHCPServerRunner.cpp \
822 Network/DrvNetSniffer.cpp \
823 Network/Pcap.cpp \
824 Audio/audio.c \
825 Audio/mixeng.c \
826 Audio/noaudio.c \
827 Audio/audiosniffer.c
828
829Drivers_SOURCES.l4 = \
830 Audio/ossaudio.c
831endif # l4
832
833Drivers_SOURCES.linux = \
834 Network/DrvTAP.cpp \
835 Audio/ossaudio.c \
836 Parallel/DrvHostParallel.cpp \
837 Serial/DrvHostSerial.cpp
838
839ifeq ($(KBUILD_TARGET),os2)
840Drivers_SOURCES := $(filter-out \
841 Storage/DrvHost% \
842 , $(Drivers_SOURCES))
843endif
844
845ifeq ($(KBUILD_TARGET),solaris)
846Drivers_SOURCES := $(filter-out \
847 Storage/DrvHost% \
848 , $(Drivers_SOURCES))
849Drivers_SOURCES.solaris = \
850 Audio/solaudio.c \
851 Storage/DrvHostBase.cpp \
852 Storage/DrvHostDVD.cpp \
853 Serial/DrvHostSerial.cpp
854 ifdef VBOX_WITH_SOLARIS_OSS
855 Drivers_SOURCES += Audio/ossaudio.c
856 Drivers_DEFS += VBOX_WITH_SOLARIS_OSS
857 endif
858 ifdef VBOX_WITH_CROSSBOW
859 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
860 Drivers_DEFS += VBOX_WITH_CROSSBOW
861 endif
862 ifdef VBOX_WITH_SUID_WRAPPER
863 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
864 endif
865endif
866
867Drivers_SOURCES.win = \
868 Audio/dsoundaudio.c \
869 Serial/DrvHostSerial.cpp
870
871if defined(VBOX_WITH_NETFLT)
872 if defined(VBOX_NETFLT_ONDEMAND_BIND)
873 Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
874 endif
875endif
876
877# -- features --
878
879ifdef VBOX_WITH_ISCSI
880 VBoxDDU_SOURCES += \
881 Storage/ISCSIHDDCore.cpp
882 VBoxDDU_DEFS += VBOX_WITH_ISCSI
883 Storage/DrvVD.cpp_INCS = \
884 Network/lwip/src/include \
885 Network/lwip/src/include/ipv4 \
886 Network/lwip/vbox/include
887endif # VBOX_WITH_ISCSI
888
889ifdef VBOX_WITH_ALSA
890 Drivers_DEFS.linux += VBOX_WITH_ALSA
891 Drivers_SOURCES.linux+= \
892 Audio/alsaaudio.c \
893 Audio/alsa_stubs.c
894endif
895
896ifdef VBOX_WITH_PULSE
897 Drivers_DEFS.linux += VBOX_WITH_PULSE
898 Drivers_SOURCES.linux+= \
899 Audio/pulseaudio.c \
900 Audio/pulse_stubs.c
901endif
902
903ifdef VBOX_WITH_USB
904 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
905 Drivers_SOURCES += \
906 USB/DrvVUSBRootHub.cpp \
907 USB/VUSBDevice.cpp \
908 USB/VUSBReadAhead.cpp \
909 USB/VUSBUrb.cpp
910 ifdef VBOX_WITH_VRDP
911 Drivers_DEFS += VBOX_WITH_VRDP
912 Drivers_SOURCES += \
913 USB/vrdp/USBProxyDevice-vrdp.cpp
914 endif
915
916 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
917 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
918 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
919 endif
920 Drivers_SOURCES.darwin += \
921 USB/USBProxyDevice.cpp \
922 USB/darwin/USBProxyDevice-darwin.cpp
923
924 Drivers_DEFS.linux += \
925 VUSB_HAVE_USBPROXY_DEVICE \
926 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
927 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
928 Drivers_SOURCES.linux += \
929 USB/USBProxyDevice.cpp \
930 USB/linux/USBProxyDevice-linux.cpp
931
932 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
933 Drivers_SOURCES.l4 += \
934 USB/USBProxyDevice.cpp \
935 USB/linux/USBProxyDevice-linux.cpp
936
937 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
938 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
939 Drivers_SOURCES.os2 += \
940 USB/USBProxyDevice.cpp \
941 USB/os2/USBProxyDevice-os2.cpp
942
943 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
944 Drivers_SOURCES.win += \
945 USB/USBProxyDevice.cpp \
946 USB/win/USBProxyDevice-win.cpp
947
948 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
949 Drivers_SOURCES.solaris += \
950 USB/USBProxyDevice.cpp \
951 USB/solaris/$(if $(VBOX_WITH_NEW_USB_CODE_ON_SOLARIS),USBProxyDevice2-solaris.cpp,USBProxyDevice-solaris.cpp)
952endif # VBOX_WITH_USB
953
954ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
955 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
956endif #VBOX_WITH_PDM_ASYNC_COMPLETION
957
958ifdef VBOX_WITH_SCSI
959 Drivers_DEFS += VBOX_WITH_SCSI
960 Drivers_SOURCES += \
961 Storage/DrvSCSI.cpp
962 Drivers_SOURCES.linux += \
963 Storage/DrvSCSIHost.cpp
964endif # VBOX_WITH_SCSI
965
966#
967# Ring-0 Services (library, linked into VMMR0.r0)
968#
969ServicesR0_TEMPLATE = VBOXR0
970ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
971ServicesR0_SOURCES = \
972 Network/SrvIntNetR0.cpp
973
974if defined(VBOX_WITH_NETFLT)
975 ServicesR0_SOURCES.win.amd64 += Network/win/SrvIntNetR0A-win.asm
976 ServicesR0_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
977endif
978
979
980#
981# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
982#
983ifdef VBOX_WITH_TESTCASES
984 PROGRAMS += tstIntNetR0
985 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
986 tstIntNetR0_DEFS = IN_INTNET_R0
987 tstIntNetR0_SOURCES = \
988 Network/testcase/tstIntNetR0.cpp
989endif
990
991#
992# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
993#
994ifdef VBOX_WITH_TESTCASES
995 PROGRAMS += tstIntNet-1
996 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
997 tstIntNet-1_SOURCES = \
998 Network/testcase/tstIntNet-1.cpp \
999 Network/Pcap.cpp
1000endif
1001
1002
1003#
1004# EEPROM device unit test requires cppunit
1005#
1006ifdef VBOX_WITH_CPPUNIT_TESTCASES
1007ifdef VBOX_WITH_E1000
1008 PROGRAMS += tstDevEEPROM
1009 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1010 tstDevEEPROM_SOURCES = \
1011 Network/testcase/tstDevEEPROM.cpp
1012 tstDevEEPROM_LIBS = \
1013 $(TARGET_DevicesR3)
1014 PROGRAMS += tstDevPhy
1015 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1016 tstDevPhy_SOURCES = \
1017 Network/testcase/tstDevPhy.cpp \
1018 Network/DevE1000Phy.cpp
1019 tstDevPhy_DEFS = PHY_UNIT_TEST
1020endif
1021endif
1022
1023include $(KBUILD_PATH)/subfooter.kmk
1024
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