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