VirtualBox

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

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

OSE: export iSCSI initiator, plus minor ifdef cleanup

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