VirtualBox

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

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

NAT: adding VBOX_WITH_SLIRP_DNS_PROXY to enable compilation of Slirp with dnsproxy

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 22.9 KB
Line 
1# $Id: Makefile.kmk 17257 2009-03-03 07:12:59Z 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
142endif
143ifdef VBOX_WITH_E1000
144 VBoxDD_DEFS += VBOX_WITH_E1000
145endif
146ifdef VBOX_WITH_BUSLOGIC
147 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
148endif
149ifndef VBOX_OSE
150 VBoxDD_DEFS += VBOX_WITH_INIP
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
291ifndef VBOX_OSE
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)
364endif
365
366ifdef VBOX_WITH_USB
367DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
368
369DevicesR3_SOURCES += \
370 USB/DevOHCI.cpp
371
372 ifdef VBOX_WITH_EHCI
373 DevicesR3_DEFS += VBOX_WITH_EHCI
374 DevicesR3_SOURCES += \
375 USB/DevEHCI.cpp
376 endif
377
378endif
379
380DevicesR3_DEFS += VBOX_WITH_HGCM
381DevicesR3_DEFS.linux += _GNU_SOURCE
382DevicesR3_DEFS.l4 += _GNU_SOURCE
383
384# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl. (bird: What's vboxaml.aml?)
385DevicesR3_CLEAN += $(PATH_DevicesR3)/vboxaml.hex $(PATH_DevicesR3)/vboxaml.aml
386PC/DevACPI.cpp_DEPS = $(PATH_DevicesR3)/vboxaml.hex
387PC/DevACPI.cpp_INCS = $(PATH_DevicesR3)
388
389$$(PATH_DevicesR3)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
390 $(call MSG_TOOL,iasl,DevicesR3,$<,$@)
391 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
392
393# For finding PCIInternal.h from VBox/pci.h.
394Bus/DevPCI.cpp_INCS = Bus
395
396# For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
397Graphics/DevVGA.cpp_INCS = $(PATH_VgaBiosBin)
398Graphics/DevVGA.cpp_DEPS = $(PATH_VgaBiosBin)/vbetables.h
399
400
401
402#
403# VBoxDDGC (sysmod)
404#
405VBoxDDGC_TEMPLATE = VBOXGC
406VBoxDDGC_SYSSUFF = .gc
407ifeq ($(KBUILD_TARGET_ARCH),x86)
408 VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
409endif
410VBoxDDGC_DEFS =
411VBoxDDGC_INCS := \
412 $(PATH_SUB_CURRENT)
413VBoxDDGC_SOURCES = \
414 Bus/DevPCI.cpp \
415 Graphics/DevVGA.cpp \
416 Input/DevPS2.cpp \
417 PC/DevACPI.cpp \
418 PC/DevPit-i8254.cpp \
419 PC/DevPIC.cpp \
420 PC/DevRTC.cpp \
421 Storage/DevATA.cpp \
422 Network/DevPCNet.cpp \
423 Serial/DevSerial.cpp \
424 Parallel/DevParallel.cpp
425
426ifdef VBOX_WITH_E1000
427 VBoxDDGC_DEFS += VBOX_WITH_E1000
428 VBoxDDGC_SOURCES += \
429 Network/DevE1000.cpp \
430 Network/DevE1000Phy.cpp
431endif
432
433ifdef VBOX_WITH_USB
434VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
435VBoxDDGC_SOURCES += \
436 USB/DevOHCI.cpp
437
438 ifdef VBOX_WITH_EHCI
439 VBoxDDGC_DEFS += VBOX_WITH_EHCI
440 VBoxDDGC_SOURCES += \
441 USB/DevEHCI.cpp
442 endif
443
444endif
445
446ifdef VBOX_WITH_AHCI
447VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
448VBoxDDGC_SOURCES += \
449 Storage/DevAHCI.cpp \
450 Storage/ATAController.cpp
451endif
452
453ifdef VBOX_WITH_BUSLOGIC
454VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
455VBoxDDGC_SOURCES += \
456 Storage/DevBusLogic.cpp
457endif
458
459ifdef VBOX_WITH_LSILOGIC
460VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
461VBoxDDGC_SOURCES += \
462 Storage/DevLsiLogicSCSI.cpp
463endif
464
465ifdef VBOX_WITH_HPET
466VBoxDDGC_DEFS += VBOX_WITH_HPET
467VBoxDDGC_SOURCES += PC/DevHPET.cpp
468endif
469
470ifeq ($(VBOX_LDR_FMT32),pe)
471VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
472endif
473if1of ($(VBOX_LDR_FMT32), pe lx)
474VBoxDDGC_LIBS = \
475 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
476 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
477endif
478
479
480#
481# VBoxDDR0 (sysmod)
482#
483VBoxDDR0_TEMPLATE = VBOXR0
484VBoxDDR0_SYSSUFF = .r0
485VBoxDDR0_DEFS.darwin.x86= VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
486VBoxDDR0_DEFS = IN_RT_R0
487VBoxDDR0_INCS := \
488 $(PATH_SUB_CURRENT)
489VBoxDDR0_SOURCES = \
490 Bus/DevPCI.cpp \
491 Graphics/DevVGA.cpp \
492 Input/DevPS2.cpp \
493 PC/DevACPI.cpp \
494 PC/DevPit-i8254.cpp \
495 PC/DevPIC.cpp \
496 PC/DevRTC.cpp \
497 Storage/DevATA.cpp \
498 Network/DevPCNet.cpp \
499 Serial/DevSerial.cpp \
500 Parallel/DevParallel.cpp
501
502ifdef VBOX_WITH_E1000
503 VBoxDDR0_DEFS += VBOX_WITH_E1000
504 VBoxDDR0_SOURCES += \
505 Network/DevE1000.cpp \
506 Network/DevE1000Phy.cpp
507endif
508
509ifdef VBOX_WITH_USB
510VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
511VBoxDDR0_SOURCES += \
512 USB/DevOHCI.cpp
513
514 ifdef VBOX_WITH_EHCI
515 VBoxDDR0_DEFS += VBOX_WITH_EHCI
516 VBoxDDR0_SOURCES += \
517 USB/DevEHCI.cpp
518 endif
519endif
520
521ifdef VBOX_WITH_AHCI
522VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
523VBoxDDR0_SOURCES += \
524 Storage/DevAHCI.cpp \
525 Storage/ATAController.cpp
526endif
527
528ifdef VBOX_WITH_BUSLOGIC
529VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
530VBoxDDR0_SOURCES += \
531 Storage/DevBusLogic.cpp
532endif
533
534ifdef VBOX_WITH_LSILOGIC
535VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
536VBoxDDR0_SOURCES += \
537 Storage/DevLsiLogicSCSI.cpp
538endif
539
540ifdef VBOX_WITH_HPET
541VBoxDDR0_DEFS += VBOX_WITH_HPET
542VBoxDDR0_SOURCES += PC/DevHPET.cpp
543endif
544
545ifeq ($(VBOX_LDR_FMT32),pe)
546VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
547endif
548if1of ($(VBOX_LDR_FMT), pe lx)
549VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
550endif
551
552#
553# VBoxDD2GC (LGPL sysmod)
554#
555VBoxDD2GC_TEMPLATE = VBOXGC
556VBoxDD2GC_DEFS =
557VBoxDD2GC_SYSSUFF = .gc
558VBoxDD2GC_INCS := \
559 $(PATH_SUB_CURRENT)
560VBoxDD2GC_SOURCES = \
561 PC/DevAPIC.cpp
562ifeq ($(VBOX_LDR_FMT32),pe)
563VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
564endif
565if1of ($(VBOX_LDR_FMT32), pe lx)
566VBoxDD2GC_LIBS = \
567 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
568 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
569endif
570
571
572#
573# VBoxDD2R0 (LGPL sysmod)
574#
575VBoxDD2R0_TEMPLATE = VBOXR0
576VBoxDD2R0_DEFS = IN_RT_R0
577VBoxDD2R0_SYSSUFF = .r0
578VBoxDD2R0_INCS := \
579 $(PATH_SUB_CURRENT)
580VBoxDD2R0_SOURCES = \
581 PC/DevAPIC.cpp
582ifeq ($(VBOX_LDR_FMT),pe)
583VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
584endif
585if1of ($(VBOX_LDR_FMT), pe lx)
586VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
587endif
588
589
590#
591# Drivers (library)
592#
593ifeq ($(KBUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
594Drivers_TEMPLATE = VBOXR3NP
595else
596Drivers_TEMPLATE = VBOXR3
597endif
598Drivers_SDKS.win = WINPSDK W2K3DDK
599Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
600Drivers_DEFS.win += _WIN32_WINNT=0x0510
601Drivers_DEFS = IN_IDE_R3
602ifdef VBOX_WITH_NETFLT
603Drivers_DEFS += VBOX_WITH_NETFLT
604endif
605ifdef VBOX_WITH_FAULT_INJECTION
606Drivers_DEFS += VBOX_WITH_FAULT_INJECTION
607endif
608Drivers_INCS := \
609 $(PATH_SUB_CURRENT) \
610 Network/slirp
611Drivers_SOURCES = \
612 Audio/audio.c \
613 Audio/audiosniffer.c \
614 Audio/mixeng.c \
615 Audio/noaudio.c \
616 Input/DrvKeyboardQueue.cpp \
617 Input/DrvMouseQueue.cpp \
618 Network/DrvIntNet.cpp \
619 PC/DrvACPI.cpp \
620 Serial/DrvChar.cpp \
621 Serial/DrvNamedPipe.cpp \
622 Storage/DrvBlock.cpp \
623 Storage/DrvHostBase.cpp \
624 Storage/DrvHostDVD.cpp \
625 Storage/DrvHostFloppy.cpp \
626 Storage/DrvMediaISO.cpp \
627 Storage/DrvRawImage.cpp \
628 Storage/Debug.cpp \
629 Storage/DrvVD.cpp \
630 Network/DrvNetSniffer.cpp \
631 Network/Pcap.cpp
632
633VBOX_SLIRP_SOURCES = \
634 Network/DrvNAT.cpp \
635 Network/slirp/bootp.c \
636 Network/slirp/cksum.c \
637 Network/slirp/debug.c \
638 Network/slirp/if.c \
639 Network/slirp/ip_icmp.c \
640 Network/slirp/ip_input.c \
641 Network/slirp/ip_output.c \
642 Network/slirp/mbuf.c \
643 Network/slirp/misc.c \
644 Network/slirp/sbuf.c \
645 Network/slirp/slirp.c \
646 Network/slirp/socket.c \
647 Network/slirp/tcp_input.c \
648 Network/slirp/tcp_output.c \
649 Network/slirp/tcp_subr.c \
650 Network/slirp/tcp_timer.c \
651 Network/slirp/tftp.c \
652 Network/slirp/udp.c
653
654ifdef VBOX_WITH_SLIRP_DNS_PROXY
655VBOX_SLIRP_SOURCES += \
656 Network/slirp/dnsproxy/hash.c \
657 Network/slirp/dnsproxy/dnsproxy.c \
658 Network/slirp/dnsproxy/internal.c
659endif
660
661# some day will be deleted
662VBOX_WITH_SIMPLIFIED_SLIRP_SYNC=1
663VBOX_WITH_MULTI_DNS=1
664
665Drivers_SOURCES += $(VBOX_SLIRP_SOURCES)
666define def_vbox_slirp_cflags
667 $(file)_DEFS += \
668 $(if $(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC), VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) \
669 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
670 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
671 $(if $(VBOX_WITH_MULTI_DNS),VBOX_WITH_MULTI_DNS,) \
672 $(if $(VBOX_WITH_SLIRP_DNS_PROXY),VBOX_WITH_SLIRP_DNS_PROXY,) \
673 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
674 ifeq ($(KBUILD_TARGET),win)
675 $(file)_CFLAGS = -wd4018
676 else
677 $(file)_CFLAGS = -Wno-sign-compare
678 endif
679endef
680$(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(def_vbox_slirp_cflags)))
681
682# -- OS specific --
683
684ifeq ($(KBUILD_TARGET),darwin)
685Drivers_SOURCES := $(filter-out \
686 Storage/DrvHostRaw% \
687 Storage/DrvHostFloppy% \
688 , $(Drivers_SOURCES)) \
689 Audio/coreaudio.c
690Drivers_SOURCES.darwin = \
691 Serial/DrvHostSerial.cpp
692endif # darwin
693
694ifeq ($(KBUILD_TARGET),freebsd)
695Drivers_SOURCES := $(filter-out \
696 Storage/DrvHost% \
697 , $(Drivers_SOURCES))
698Drivers_SOURCES.freebsd =
699endif # freebsd
700
701
702ifeq ($(KBUILD_TARGET),l4)
703Drivers_SOURCES = \
704 Input/DrvMouseQueue.cpp \
705 Input/DrvKeyboardQueue.cpp \
706 Storage/DrvBlock.cpp \
707 Storage/DrvMediaISO.cpp \
708 Storage/DrvRawImage.cpp \
709 Storage/DrvHostBase.cpp \
710 Storage/DrvHostDVD.cpp \
711 Storage/DrvVD.cpp \
712 PC/DrvACPI.cpp \
713 Network/DrvIntNet.cpp \
714 Network/DrvNetSniffer.cpp \
715 Network/Pcap.cpp \
716 Audio/audio.c \
717 Audio/mixeng.c \
718 Audio/noaudio.c \
719 Audio/audiosniffer.c
720
721Drivers_SOURCES.l4 = \
722 Network/DrvTAP.cpp \
723 Audio/ossaudio.c
724endif # l4
725
726Drivers_SOURCES.linux = \
727 Network/DrvTAP.cpp \
728 Audio/ossaudio.c \
729 Parallel/DrvHostParallel.cpp \
730 Serial/DrvHostSerial.cpp
731
732ifeq ($(KBUILD_TARGET),os2)
733Drivers_SOURCES := $(filter-out \
734 Storage/DrvHost% \
735 , $(Drivers_SOURCES))
736Drivers_SOURCES.os2 = \
737 Network/DrvTAPOs2.cpp
738endif
739
740ifeq ($(KBUILD_TARGET),solaris)
741Drivers_SOURCES := $(filter-out \
742 Storage/DrvHost% \
743 , $(Drivers_SOURCES))
744Drivers_SOURCES.solaris = \
745 Audio/solaudio.c \
746 $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
747 Storage/DrvHostBase.cpp \
748 Storage/DrvHostDVD.cpp \
749 Serial/DrvHostSerial.cpp
750 ifdef VBOX_WITH_CROSSBOW
751 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
752 Drivers_DEFS += VBOX_WITH_CROSSBOW
753 endif
754 ifdef VBOX_WITH_SUID_WRAPPER
755 Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
756 endif
757endif
758
759Drivers_SOURCES.win = \
760 Network/DrvTAPWin.cpp \
761 Audio/dsoundaudio.c \
762 Serial/DrvHostSerial.cpp
763
764if defined(VBOX_WITH_NETFLT)
765 if defined(VBOX_NETFLT_ONDEMAND_BIND)
766 Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
767 endif
768 Drivers_SOURCES.win += Network/win/DrvIntNet-win.cpp
769endif
770
771# -- features --
772
773ifdef VBOX_WITH_ISCSI
774 VBoxDDU_SOURCES += \
775 Storage/ISCSIHDDCore.cpp
776 VBoxDDU_DEFS += VBOX_WITH_ISCSI
777 Storage/DrvVD.cpp_INCS = \
778 Network/lwip/src/include \
779 Network/lwip/src/include/ipv4 \
780 Network/lwip/vbox/include
781endif # VBOX_WITH_ISCSI
782
783ifdef VBOX_WITH_ALSA
784 Drivers_DEFS.linux += VBOX_WITH_ALSA
785 Drivers_SOURCES.linux+= \
786 Audio/alsaaudio.c \
787 Audio/alsa_stubs.c
788# VBoxDD_LIBS.linux += asound
789endif
790
791ifdef VBOX_WITH_PULSE
792 Drivers_DEFS.linux += VBOX_WITH_PULSE
793 Drivers_SOURCES.linux+= \
794 Audio/pulseaudio.c \
795 Audio/pulse_stubs.c
796# VBoxDD_LIBS.linux += pulse
797endif
798
799ifdef VBOX_WITH_USB
800 Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
801 Drivers_SOURCES += \
802 USB/DrvVUSBRootHub.cpp \
803 USB/VUSBDevice.cpp \
804 USB/VUSBUrb.cpp
805 ifdef VBOX_WITH_VRDP
806 Drivers_DEFS += VBOX_WITH_VRDP
807 Drivers_SOURCES += \
808 USB/vrdp/USBProxyDevice-vrdp.cpp
809 endif
810
811 Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
812 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
813 Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
814 endif
815 Drivers_SOURCES.darwin += \
816 USB/USBProxyDevice.cpp \
817 USB/darwin/USBProxyDevice-darwin.cpp
818
819 Drivers_DEFS.linux += \
820 VUSB_HAVE_USBPROXY_DEVICE \
821 $(if $(VBOX_WITHOUT_LINUX_COMPILER_H),VBOX_WITHOUT_LINUX_COMPILER_H,) \
822 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
823 Drivers_SOURCES.linux += \
824 USB/USBProxyDevice.cpp \
825 USB/linux/USBProxyDevice-linux.cpp
826
827 Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
828 Drivers_SOURCES.l4 += \
829 USB/USBProxyDevice.cpp \
830 USB/linux/USBProxyDevice-linux.cpp
831
832 Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
833 Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
834 Drivers_SOURCES.os2 += \
835 USB/USBProxyDevice.cpp \
836 USB/os2/USBProxyDevice-os2.cpp
837
838 Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
839 Drivers_SOURCES.win += \
840 USB/USBProxyDevice.cpp \
841 USB/win/USBProxyDevice-win.cpp
842
843 Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
844 Drivers_SOURCES.solaris += \
845 USB/USBProxyDevice.cpp \
846 USB/solaris/USBProxyDevice-solaris.cpp
847endif # VBOX_WITH_USB
848
849ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
850 Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
851 Drivers_SOURCES += \
852 Storage/DrvRawImageAsync.cpp \
853 Storage/DrvTransportAsync.cpp
854endif #VBOX_WITH_PDM_ASYNC_COMPLETION
855
856ifdef VBOX_WITH_SCSI
857 Drivers_DEFS += VBOX_WITH_SCSI
858 Drivers_SOURCES += \
859 Storage/DrvSCSI.cpp
860 Drivers_SOURCES.linux += \
861 Storage/DrvSCSIHost.cpp
862endif # VBOX_WITH_SCSI
863
864ifdef VBOX_WITH_FAULT_INJECTION
865 Drivers_DEFS += VBOX_WITH_FAULT_INJECTION
866 Drivers_SOURCES += \
867 Storage/DrvFaultInject.cpp
868endif # VBOX_WITH_FAULT_INJECTION
869
870#
871# Ring-0 Services (library, linked into VMMR0.r0)
872#
873ServicesR0_TEMPLATE = VBOXR0
874ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
875ServicesR0_SOURCES = \
876 Network/SrvIntNetR0.cpp
877
878if defined(VBOX_WITH_NETFLT)
879 ServicesR0_SOURCES.win.amd64 += Network/win/SrvIntNetR0A-win.asm
880 ServicesR0_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
881endif
882
883
884#
885# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
886#
887ifdef VBOX_WITH_TESTCASES
888 PROGRAMS += tstIntNetR0
889 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
890 tstIntNetR0_DEFS = IN_INTNET_R0
891 tstIntNetR0_SOURCES = \
892 Network/testcase/tstIntNetR0.cpp
893endif
894
895#
896# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
897#
898ifdef VBOX_WITH_TESTCASES
899 PROGRAMS += tstIntNet-1
900 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
901 tstIntNet-1_SOURCES = \
902 Network/testcase/tstIntNet-1.cpp \
903 Network/Pcap.cpp
904endif
905
906
907#
908# EEPROM device unit test requires cppunit
909#
910ifdef VBOX_WITH_CPPUNIT_TESTCASES
911ifdef VBOX_WITH_E1000
912 PROGRAMS += tstDevEEPROM
913 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
914 tstDevEEPROM_SOURCES = \
915 Network/testcase/tstDevEEPROM.cpp
916 tstDevEEPROM_LIBS = \
917 $(TARGET_DevicesR3)
918 PROGRAMS += tstDevPhy
919 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
920 tstDevPhy_SOURCES = \
921 Network/testcase/tstDevPhy.cpp \
922 Network/DevE1000Phy.cpp
923 tstDevPhy_DEFS = PHY_UNIT_TEST
924endif
925endif
926
927include $(KBUILD_PATH)/subfooter.kmk
928
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