1 | # $Id: Makefile.kmk 8251 2008-04-21 19:05:24Z 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 | DEPTH = ../../..
|
---|
23 | include $(PATH_KBUILD)/subheader.kmk
|
---|
24 |
|
---|
25 | # Include sub-makefiles.
|
---|
26 | include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
|
---|
27 | include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
|
---|
28 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
29 | include $(PATH_SUB_CURRENT)/Storage/testcase/Makefile.kmk
|
---|
30 |
|
---|
31 | # Subdirs with complex makefiles.
|
---|
32 | ifdef VBOX_WITH_INTEL_PXE
|
---|
33 | SUBDIRS_LIBRARIES = PC/PXE
|
---|
34 | SUBDIRS_CLEAN = PC/PXE
|
---|
35 | else
|
---|
36 | SUBDIRS_LIBRARIES = PC/Etherboot-src
|
---|
37 | SUBDIRS_CLEAN = PC/Etherboot-src
|
---|
38 | endif
|
---|
39 |
|
---|
40 | ifndef VBOX_OSE
|
---|
41 | SUBDIRS_LIBRARIES += Storage/VBoxHDDFormats
|
---|
42 | SUBDIRS_CLEAN += Storage/VBoxHDDFormats
|
---|
43 | endif
|
---|
44 |
|
---|
45 | #
|
---|
46 | # Main targets.
|
---|
47 | #
|
---|
48 | LIBRARIES += DevicesR3 Drivers ServicesR0
|
---|
49 | DLLS += VBoxDDU VBoxDD VBoxDD2
|
---|
50 | SYSMODS += VBoxDDGC VBoxDD2GC VBoxDDR0 VBoxDD2R0
|
---|
51 |
|
---|
52 |
|
---|
53 | #
|
---|
54 | # Enable the pdm lock (experimental).
|
---|
55 | #
|
---|
56 | ifdef VBOX_WITH_PDM_LOCK
|
---|
57 | DEFS += VBOX_WITH_PDM_LOCK
|
---|
58 | endif
|
---|
59 |
|
---|
60 |
|
---|
61 | #
|
---|
62 | # VBoxDDU (shared object)
|
---|
63 | #
|
---|
64 | VBoxDDU_TEMPLATE = VBOXR3
|
---|
65 | VBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
|
---|
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 | VBoxDDU_SOURCES = \
|
---|
80 | Storage/VBoxHDD-new.cpp \
|
---|
81 | Storage/VDICore.cpp \
|
---|
82 | Storage/VDIHDDCore.cpp \
|
---|
83 | Storage/VmdkHDDCore.cpp \
|
---|
84 | Storage/RawHDDCore.cpp \
|
---|
85 | VBoxDDUDeps.cpp
|
---|
86 | ifndef VBOX_OSE
|
---|
87 | VBoxDDU_SOURCES += \
|
---|
88 | Storage/VHDHDDCore.cpp
|
---|
89 | endif
|
---|
90 | ifdef VBOX_WITH_USB
|
---|
91 | VBoxDDU_SOURCES.win = \
|
---|
92 | USB/win32/USBLib-win32.cpp
|
---|
93 | VBoxDDU_INCS.os2 += \
|
---|
94 | $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
|
---|
95 | endif
|
---|
96 | VBoxDDU_LIBS = \
|
---|
97 | $(LIB_RUNTIME)
|
---|
98 | ifdef VBOX_WITH_USB
|
---|
99 | VBoxDDU_LIBS += \
|
---|
100 | $(PATH_LIB)/USBLib$(VBOX_SUFF_LIB)
|
---|
101 | endif
|
---|
102 | ifeq ($(BUILD_TARGET),l4)
|
---|
103 | VBoxDDU_LIBS += \
|
---|
104 | $(L4_LIBDIR)/libl4sys.p.a
|
---|
105 | endif
|
---|
106 | VBoxDDU_LDFLAGS.darwin = -install_name @executable_path/VBoxDDU.dylib
|
---|
107 | ifdef VBOX_WITH_USB
|
---|
108 | ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
|
---|
109 | VBoxDDU_LDFLAGS.darwin += -framework IOKit
|
---|
110 | endif
|
---|
111 | endif
|
---|
112 |
|
---|
113 | VBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
|
---|
114 | VBoxDDU_LDFLAGS.l4 = -Wl,--no-undefined
|
---|
115 |
|
---|
116 | #
|
---|
117 | # VBoxDDULnxHostR3 (Only needed for l4, currently for executing vditool on L4Linux.)
|
---|
118 | #
|
---|
119 | ifeq ($(BUILD_TARGET),l4)
|
---|
120 | LIBRARIES += VBoxDDULnxHostR3
|
---|
121 | VBoxDDULnxHostR3_TEMPLATE = VBOXLNXHOSTR3LIB
|
---|
122 | VBoxDDULnxHostR3_DEFS = IN_VBOXDDU
|
---|
123 | VBoxDDULnxHostR3_SOURCES = $(VBoxDDU_SOURCES)
|
---|
124 | endif
|
---|
125 |
|
---|
126 | #
|
---|
127 | # VBoxDD (shared object)
|
---|
128 | #
|
---|
129 | VBoxDD_TEMPLATE = VBOXR3
|
---|
130 | VBoxDD_SDKS.win = WINPSDK DXSDK W2K3DDK VBOX_NTDLL
|
---|
131 | VBoxDD_SOURCES = \
|
---|
132 | Builtins.cpp
|
---|
133 | VBoxDD_DEFS = VBOX_ACPI
|
---|
134 | ifdef VBOX_WITH_USB
|
---|
135 | VBoxDD_DEFS += VBOX_WITH_USB IN_USB_R3
|
---|
136 | ifdef VBOX_WITH_EHCI
|
---|
137 | VBoxDD_DEFS += VBOX_WITH_EHCI
|
---|
138 | endif
|
---|
139 | endif
|
---|
140 | ifdef VBOX_WITH_AHCI
|
---|
141 | VBoxDD_DEFS += VBOX_WITH_AHCI
|
---|
142 | endif
|
---|
143 | ifdef VBOX_WITH_ISCSI
|
---|
144 | VBoxDD_DEFS += VBOX_WITH_ISCSI
|
---|
145 | endif
|
---|
146 | ifdef VBOX_WITH_E1000
|
---|
147 | VBoxDD_DEFS += VBOX_WITH_E1000
|
---|
148 | endif
|
---|
149 | ifndef VBOX_OSE
|
---|
150 | VBoxDD_DEFS += VBOX_WITH_INIP
|
---|
151 | endif
|
---|
152 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
153 | VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
154 | endif
|
---|
155 | VBoxDD_LIBS = \
|
---|
156 | $(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
|
---|
157 | $(PATH_LIB)/Drivers$(VBOX_SUFF_LIB) \
|
---|
158 | $(PATH_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
|
---|
159 | $(LIB_VMM) \
|
---|
160 | $(LIB_RUNTIME)
|
---|
161 | ifeq ($(BUILD_TARGET),win)
|
---|
162 | VBoxDD_LIBS += \
|
---|
163 | $(LIB_DDU) \
|
---|
164 | $(PATH_LIB)/VBoxDD2.lib \
|
---|
165 | $(PATH_SDK_DXSDK_LIB)/dxguid.lib
|
---|
166 | else
|
---|
167 | VBoxDD_LIBS += \
|
---|
168 | $(INSTARGET_VBoxDDU) \
|
---|
169 | $(INSTARGET_VBoxDD2)
|
---|
170 | endif
|
---|
171 | ifeq ($(BUILD_TARGET),l4)
|
---|
172 | VBoxDD_LIBS += \
|
---|
173 | $(L4_LIBDIR)/libl4sys.p.a
|
---|
174 | endif
|
---|
175 | ifeq ($(BUILD_TARGET),solaris)
|
---|
176 | VBoxDD_LIBS += adm
|
---|
177 | ifdef VBOX_WITH_CROSSBOW
|
---|
178 | VBoxDD_LIBS += dlpi
|
---|
179 | endif
|
---|
180 | ifdef VBOX_WITH_SUID_WRAPPER
|
---|
181 | VBoxDD_LIBS += secdb
|
---|
182 | endif
|
---|
183 | endif
|
---|
184 | VBoxDD_LIBS.darwin += \
|
---|
185 | $(LIB_REM)
|
---|
186 | VBoxDD_LDFLAGS.darwin = -install_name @executable_path/VBoxDD.dylib \
|
---|
187 | -framework CoreAudio \
|
---|
188 | -framework IOKit \
|
---|
189 | -framework Carbon \
|
---|
190 | -framework DiskArbitration
|
---|
191 | VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
|
---|
192 | VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
|
---|
193 |
|
---|
194 |
|
---|
195 | # damn, fix this.
|
---|
196 | ifeq ($(BUILD_TARGET),win)
|
---|
197 | $(PATH_LIB)/VBoxDD2.lib: $(PATH_BIN)/VBoxDD2.dll
|
---|
198 | $(PATH_LIB)/VBoxDDU.lib: $(PATH_BIN)/VBoxDDU.dll
|
---|
199 | endif
|
---|
200 |
|
---|
201 |
|
---|
202 | #
|
---|
203 | # VBoxDD2 (shared object)
|
---|
204 | #
|
---|
205 | VBoxDD2_TEMPLATE = VBOXR3
|
---|
206 | VBoxDD2_DEFS = IN_VBOXDD2
|
---|
207 | VBoxDD2_INCS := \
|
---|
208 | $(PATH_SUB_CURRENT)
|
---|
209 | VBoxDD2_SOURCES = \
|
---|
210 | Builtins2.cpp \
|
---|
211 | PC/DevAPIC.cpp
|
---|
212 | VBoxDD2_LIBS = \
|
---|
213 | $(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
|
---|
214 | $(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
|
---|
215 | $(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB) \
|
---|
216 | $(LIB_VMM) \
|
---|
217 | $(LIB_RUNTIME)
|
---|
218 | ifeq ($(BUILD_TARGET),l4)
|
---|
219 | VBoxDD2_LIBS += \
|
---|
220 | $(L4_LIBDIR)/libl4sys.p.a
|
---|
221 | endif
|
---|
222 | VBoxDD2_LIBS.darwin += $(LIB_REM)
|
---|
223 | VBoxDD2_LDFLAGS.darwin = -install_name @executable_path/VBoxDD2.dylib
|
---|
224 | VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
|
---|
225 | VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
|
---|
226 |
|
---|
227 |
|
---|
228 | #
|
---|
229 | # DevicesR3 (library)
|
---|
230 | #
|
---|
231 | DevicesR3_TEMPLATE = VBOXR3
|
---|
232 | DevicesR3_SDKS.win = WINPSDK W2K3DDK
|
---|
233 | DevicesR3_INCS := \
|
---|
234 | $(PATH_SUB_CURRENT)
|
---|
235 | DevicesR3_SOURCES = \
|
---|
236 | Input/DevPS2.cpp \
|
---|
237 | Bus/DevPCI.cpp \
|
---|
238 | Graphics/DevVGA.cpp \
|
---|
239 | Storage/DevATA.cpp \
|
---|
240 | PC/DevPit-i8254.cpp \
|
---|
241 | PC/DevPIC.cpp \
|
---|
242 | PC/DevACPI.cpp \
|
---|
243 | PC/DevRTC.cpp \
|
---|
244 | PC/DevPcBios.cpp \
|
---|
245 | PC/DevPcArch.c \
|
---|
246 | VMMDev/VBoxDev.cpp \
|
---|
247 | VMMDev/VMMDevHGCM.cpp \
|
---|
248 | Network/DevPCNet.cpp \
|
---|
249 | Audio/DevIchAc97.cpp \
|
---|
250 | Audio/DevSB16.cpp \
|
---|
251 | PC/DevDMA.cpp \
|
---|
252 | Storage/fdc.c \
|
---|
253 | Serial/DevSerial.cpp \
|
---|
254 | Parallel/DevParallel.cpp
|
---|
255 |
|
---|
256 | ifdef VBOX_WITH_E1000
|
---|
257 | DevicesR3_DEFS += VBOX_WITH_E1000
|
---|
258 | DevicesR3_SOURCES += \
|
---|
259 | Network/DevE1000.cpp \
|
---|
260 | Network/DevE1000Phy.cpp \
|
---|
261 | Network/DevEEPROM.cpp
|
---|
262 | endif
|
---|
263 |
|
---|
264 | ifndef VBOX_OSE
|
---|
265 | DevicesR3_INCS += \
|
---|
266 | Network/lwip/src/include \
|
---|
267 | Network/lwip/src/include/ipv4 \
|
---|
268 | Network/lwip/vbox/include
|
---|
269 | DevicesR3_SOURCES += \
|
---|
270 | Network/lwip/src/api/api_lib.c \
|
---|
271 | Network/lwip/src/api/api_msg.c \
|
---|
272 | Network/lwip/src/api/err.c \
|
---|
273 | Network/lwip/src/api/sockets.c \
|
---|
274 | Network/lwip/src/api/tcpip.c \
|
---|
275 | Network/lwip/src/core/tcp_in.c \
|
---|
276 | Network/lwip/src/core/dhcp.c \
|
---|
277 | Network/lwip/src/core/inet.c \
|
---|
278 | Network/lwip/src/core/mem.c \
|
---|
279 | Network/lwip/src/core/memp.c \
|
---|
280 | Network/lwip/src/core/netif.c \
|
---|
281 | Network/lwip/src/core/pbuf.c \
|
---|
282 | Network/lwip/src/core/raw.c \
|
---|
283 | Network/lwip/src/core/stats.c \
|
---|
284 | Network/lwip/src/core/sys.c \
|
---|
285 | Network/lwip/src/core/tcp.c \
|
---|
286 | Network/lwip/src/core/ipv4/ip_addr.c \
|
---|
287 | Network/lwip/src/core/ipv4/icmp.c \
|
---|
288 | Network/lwip/src/core/ipv4/ip.c \
|
---|
289 | Network/lwip/src/core/ipv4/ip_frag.c \
|
---|
290 | Network/lwip/src/core/tcp_out.c \
|
---|
291 | Network/lwip/src/core/udp.c \
|
---|
292 | Network/lwip/src/netif/etharp.c \
|
---|
293 | Network/lwip/vbox/sys_arch.c \
|
---|
294 | Network/DevINIP.cpp
|
---|
295 | DevicesR3_DEFS += VBOX_WITH_INIP
|
---|
296 | endif
|
---|
297 |
|
---|
298 | ifdef VBOX_WITH_AHCI
|
---|
299 | DevicesR3_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
|
---|
300 | DevicesR3_SOURCES += \
|
---|
301 | Storage/DevAHCI.cpp \
|
---|
302 | Storage/ATAController.cpp
|
---|
303 | endif
|
---|
304 |
|
---|
305 | ifdef VBOX_WITH_USB
|
---|
306 | DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
|
---|
307 |
|
---|
308 | DevicesR3_SOURCES += \
|
---|
309 | USB/DevOHCI.cpp
|
---|
310 |
|
---|
311 | ifdef VBOX_WITH_EHCI
|
---|
312 | DevicesR3_DEFS += VBOX_WITH_EHCI
|
---|
313 | DevicesR3_SOURCES += \
|
---|
314 | USB/DevEHCI.cpp
|
---|
315 | endif
|
---|
316 |
|
---|
317 | endif
|
---|
318 |
|
---|
319 | DevicesR3_DEFS += VBOX_HGCM
|
---|
320 | DevicesR3_DEFS.linux += _GNU_SOURCE
|
---|
321 | DevicesR3_DEFS.l4 += _GNU_SOURCE
|
---|
322 |
|
---|
323 | # DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl.
|
---|
324 | DevicesR3_CLEAN += $(PATH_TARGET)/vboxaml.hex $(PATH_TARGET)/vboxaml.aml
|
---|
325 | PC/DevACPI.cpp_DEPS = $(PATH_TARGET)/vboxaml.hex
|
---|
326 | PC/DevACPI.cpp_INCS = $(PATH_TARGET)
|
---|
327 |
|
---|
328 | $(PATH_TARGET)/vboxaml.hex: PC/vbox.dsl
|
---|
329 | $(call MSG_TOOL,iasl,DevicesR3,$<,$@)
|
---|
330 | $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
|
---|
331 |
|
---|
332 | # For finding PCIInternal.h from VBox/pci.h.
|
---|
333 | Bus/DevPCI.cpp_INCS = Bus
|
---|
334 |
|
---|
335 | # for finding vbetables.h
|
---|
336 | Graphics/DevVGA.cpp_INCS = $(PATH_TARGET)
|
---|
337 |
|
---|
338 |
|
---|
339 |
|
---|
340 | #
|
---|
341 | # VBoxDDGC (sysmod)
|
---|
342 | #
|
---|
343 | VBoxDDGC_TEMPLATE = VBOXGC
|
---|
344 | VBoxDDGC_DEFS =
|
---|
345 | VBoxDDGC_SYSSUFF = .gc
|
---|
346 | VBoxDDGC_INCS := \
|
---|
347 | $(PATH_SUB_CURRENT)
|
---|
348 | VBoxDDGC_SOURCES = \
|
---|
349 | Bus/DevPCI.cpp \
|
---|
350 | Graphics/DevVGA.cpp \
|
---|
351 | Input/DevPS2.cpp \
|
---|
352 | PC/DevACPI.cpp \
|
---|
353 | PC/DevPit-i8254.cpp \
|
---|
354 | PC/DevPIC.cpp \
|
---|
355 | PC/DevRTC.cpp \
|
---|
356 | Storage/DevATA.cpp \
|
---|
357 | Network/DevPCNet.cpp \
|
---|
358 | Serial/DevSerial.cpp \
|
---|
359 | Parallel/DevParallel.cpp
|
---|
360 |
|
---|
361 | ifdef VBOX_WITH_E1000
|
---|
362 | VBoxDDGC_DEFS += VBOX_WITH_E1000
|
---|
363 | VBoxDDGC_SOURCES += \
|
---|
364 | Network/DevE1000.cpp \
|
---|
365 | Network/DevE1000Phy.cpp
|
---|
366 | endif
|
---|
367 |
|
---|
368 | ifdef VBOX_WITH_USB
|
---|
369 | VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
|
---|
370 | VBoxDDGC_SOURCES += \
|
---|
371 | USB/DevOHCI.cpp
|
---|
372 |
|
---|
373 | ifdef VBOX_WITH_EHCI
|
---|
374 | VBoxDDGC_DEFS += VBOX_WITH_EHCI
|
---|
375 | VBoxDDGC_SOURCES += \
|
---|
376 | USB/DevEHCI.cpp
|
---|
377 | endif
|
---|
378 |
|
---|
379 | endif
|
---|
380 |
|
---|
381 | ifdef VBOX_WITH_AHCI
|
---|
382 | VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
|
---|
383 | VBoxDDGC_SOURCES += \
|
---|
384 | Storage/DevAHCI.cpp \
|
---|
385 | Storage/ATAController.cpp
|
---|
386 | endif
|
---|
387 |
|
---|
388 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
389 | VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
|
---|
390 | endif
|
---|
391 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
|
---|
392 | VBoxDDGC_LIBS = \
|
---|
393 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
|
---|
394 | $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
|
---|
395 | endif
|
---|
396 |
|
---|
397 |
|
---|
398 | #
|
---|
399 | # VBoxDDR0 (sysmod)
|
---|
400 | #
|
---|
401 | VBoxDDR0_TEMPLATE = VBOXR0
|
---|
402 | VBoxDDR0_SYSSUFF = .r0
|
---|
403 | VBoxDDR0_DEFS = IN_RT_R0
|
---|
404 | VBoxDDR0_INCS := \
|
---|
405 | $(PATH_SUB_CURRENT)
|
---|
406 | VBoxDDR0_SOURCES = \
|
---|
407 | Bus/DevPCI.cpp \
|
---|
408 | Graphics/DevVGA.cpp \
|
---|
409 | Input/DevPS2.cpp \
|
---|
410 | PC/DevACPI.cpp \
|
---|
411 | PC/DevPit-i8254.cpp \
|
---|
412 | PC/DevPIC.cpp \
|
---|
413 | PC/DevRTC.cpp \
|
---|
414 | Storage/DevATA.cpp \
|
---|
415 | Network/DevPCNet.cpp \
|
---|
416 | Serial/DevSerial.cpp \
|
---|
417 | Parallel/DevParallel.cpp
|
---|
418 |
|
---|
419 | ifdef VBOX_WITH_E1000
|
---|
420 | VBoxDDR0_DEFS += VBOX_WITH_E1000
|
---|
421 | VBoxDDR0_SOURCES += \
|
---|
422 | Network/DevE1000.cpp \
|
---|
423 | Network/DevE1000Phy.cpp
|
---|
424 | endif
|
---|
425 |
|
---|
426 | ifdef VBOX_WITH_USB
|
---|
427 | VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
|
---|
428 | VBoxDDR0_SOURCES += \
|
---|
429 | USB/DevOHCI.cpp
|
---|
430 |
|
---|
431 | ifdef VBOX_WITH_EHCI
|
---|
432 | VBoxDDR0_DEFS += VBOX_WITH_EHCI
|
---|
433 | VBoxDDR0_SOURCES += \
|
---|
434 | USB/DevEHCI.cpp
|
---|
435 | endif
|
---|
436 | endif
|
---|
437 |
|
---|
438 | ifdef VBOX_WITH_AHCI
|
---|
439 | VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
|
---|
440 | VBoxDDR0_SOURCES += \
|
---|
441 | Storage/DevAHCI.cpp \
|
---|
442 | Storage/ATAController.cpp
|
---|
443 | endif
|
---|
444 |
|
---|
445 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
446 | VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
|
---|
447 | endif
|
---|
448 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
|
---|
449 | VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
|
---|
450 | endif
|
---|
451 | VBoxDDR0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
|
---|
452 | ifeq ($(VBOX_LDR_FMT32),elf) # this is template stuff!
|
---|
453 | VBoxDDR0_LIBS += $(VBOX_GCC_LIBGCC)
|
---|
454 | endif
|
---|
455 |
|
---|
456 |
|
---|
457 | #
|
---|
458 | # VBoxDD2GC (LGPL sysmod)
|
---|
459 | #
|
---|
460 | VBoxDD2GC_TEMPLATE = VBOXGC
|
---|
461 | VBoxDD2GC_DEFS =
|
---|
462 | VBoxDD2GC_SYSSUFF = .gc
|
---|
463 | VBoxDD2GC_INCS := \
|
---|
464 | $(PATH_SUB_CURRENT)
|
---|
465 | VBoxDD2GC_SOURCES = \
|
---|
466 | PC/DevAPIC.cpp
|
---|
467 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
468 | VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
|
---|
469 | endif
|
---|
470 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
|
---|
471 | VBoxDD2GC_LIBS = \
|
---|
472 | $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
|
---|
473 | $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
|
---|
474 | endif
|
---|
475 |
|
---|
476 |
|
---|
477 | #
|
---|
478 | # VBoxDD2R0 (LGPL sysmod)
|
---|
479 | #
|
---|
480 | VBoxDD2R0_TEMPLATE = VBOXR0
|
---|
481 | VBoxDD2R0_DEFS = IN_RT_R0
|
---|
482 | VBoxDD2R0_SYSSUFF = .r0
|
---|
483 | VBoxDD2R0_INCS := \
|
---|
484 | $(PATH_SUB_CURRENT)
|
---|
485 | VBoxDD2R0_SOURCES = \
|
---|
486 | PC/DevAPIC.cpp
|
---|
487 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
488 | VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
|
---|
489 | endif
|
---|
490 | ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
|
---|
491 | VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
|
---|
492 | endif
|
---|
493 | VBoxDD2R0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
|
---|
494 | ifeq ($(VBOX_LDR_FMT),elf)
|
---|
495 | VBoxDD2R0_LIBS += $(VBOX_GCC_LIBGCC)
|
---|
496 | endif
|
---|
497 |
|
---|
498 |
|
---|
499 | #
|
---|
500 | # Drivers (library)
|
---|
501 | #
|
---|
502 | ifeq ($(BUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
|
---|
503 | Drivers_TEMPLATE = VBOXR3NP
|
---|
504 | else
|
---|
505 | Drivers_TEMPLATE = VBOXR3
|
---|
506 | endif
|
---|
507 | Drivers_SDKS.win = WINPSDK W2K3DDK
|
---|
508 | Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
|
---|
509 | Drivers_DEFS = IN_IDE_R3
|
---|
510 | Drivers_DEFS.win += _WIN32_WINNT=0x0510
|
---|
511 | Drivers_INCS := \
|
---|
512 | $(PATH_SUB_CURRENT) \
|
---|
513 | Network/slirp
|
---|
514 | Drivers_SOURCES = \
|
---|
515 | Audio/audio.c \
|
---|
516 | Audio/audiosniffer.c \
|
---|
517 | Audio/mixeng.c \
|
---|
518 | Audio/noaudio.c \
|
---|
519 | Input/DrvKeyboardQueue.cpp \
|
---|
520 | Input/DrvMouseQueue.cpp \
|
---|
521 | Network/DrvIntNet.cpp \
|
---|
522 | Network/DrvNAT.cpp \
|
---|
523 | Network/DrvNetSniffer.cpp \
|
---|
524 | Network/slirp/bootp.c \
|
---|
525 | Network/slirp/cksum.c \
|
---|
526 | Network/slirp/debug.c \
|
---|
527 | Network/slirp/if.c \
|
---|
528 | Network/slirp/ip_icmp.c \
|
---|
529 | Network/slirp/ip_input.c \
|
---|
530 | Network/slirp/ip_output.c \
|
---|
531 | Network/slirp/mbuf.c \
|
---|
532 | Network/slirp/misc.c \
|
---|
533 | Network/slirp/sbuf.c \
|
---|
534 | Network/slirp/slirp.c \
|
---|
535 | Network/slirp/socket.c \
|
---|
536 | Network/slirp/tcp_input.c \
|
---|
537 | Network/slirp/tcp_output.c \
|
---|
538 | Network/slirp/tcp_subr.c \
|
---|
539 | Network/slirp/tcp_timer.c \
|
---|
540 | Network/slirp/tftp.c \
|
---|
541 | Network/slirp/udp.c \
|
---|
542 | PC/DrvACPI.cpp \
|
---|
543 | Serial/DrvChar.cpp \
|
---|
544 | Serial/DrvNamedPipe.cpp \
|
---|
545 | Storage/DrvBlock.cpp \
|
---|
546 | Storage/DrvHostBase.cpp \
|
---|
547 | Storage/DrvHostDVD.cpp \
|
---|
548 | Storage/DrvHostFloppy.cpp \
|
---|
549 | Storage/DrvMediaISO.cpp \
|
---|
550 | Storage/DrvRawImage.cpp \
|
---|
551 | Storage/DrvVD.cpp \
|
---|
552 | Storage/VBoxHDD.cpp
|
---|
553 |
|
---|
554 | # -- OS specific --
|
---|
555 |
|
---|
556 | ifeq ($(BUILD_TARGET),darwin)
|
---|
557 | Drivers_SOURCES := $(filter-out \
|
---|
558 | Storage/DrvHostRaw% \
|
---|
559 | Storage/DrvHostFloppy% \
|
---|
560 | , $(Drivers_SOURCES)) \
|
---|
561 | Audio/coreaudio.c
|
---|
562 | Drivers_SOURCES.darwin =
|
---|
563 | endif # darwin
|
---|
564 |
|
---|
565 | ifeq ($(BUILD_TARGET),freebsd)
|
---|
566 | Drivers_SOURCES := $(filter-out \
|
---|
567 | Storage/DrvHost% \
|
---|
568 | , $(Drivers_SOURCES))
|
---|
569 | Drivers_SOURCES.freebsd =
|
---|
570 | endif # freebsd
|
---|
571 |
|
---|
572 |
|
---|
573 | ifeq ($(BUILD_TARGET),l4)
|
---|
574 | Drivers_SOURCES = \
|
---|
575 | Input/DrvMouseQueue.cpp \
|
---|
576 | Input/DrvKeyboardQueue.cpp \
|
---|
577 | Storage/VBoxHDD.cpp \
|
---|
578 | Storage/DrvBlock.cpp \
|
---|
579 | Storage/DrvMediaISO.cpp \
|
---|
580 | Storage/DrvRawImage.cpp \
|
---|
581 | Storage/DrvHostBase.cpp \
|
---|
582 | Storage/DrvHostDVD.cpp \
|
---|
583 | Storage/DrvVD.cpp \
|
---|
584 | PC/DrvACPI.cpp \
|
---|
585 | Network/DrvIntNet.cpp \
|
---|
586 | Network/DrvNetSniffer.cpp \
|
---|
587 | Audio/audio.c \
|
---|
588 | Audio/mixeng.c \
|
---|
589 | Audio/noaudio.c \
|
---|
590 | Audio/audiosniffer.c
|
---|
591 |
|
---|
592 | Drivers_SOURCES.l4 = \
|
---|
593 | Network/DrvTAP.cpp \
|
---|
594 | Audio/ossaudio.c
|
---|
595 | endif # l4
|
---|
596 |
|
---|
597 | Drivers_SOURCES.linux = \
|
---|
598 | Network/DrvTAP.cpp \
|
---|
599 | Audio/ossaudio.c \
|
---|
600 | Parallel/DrvHostParallel.cpp \
|
---|
601 | Serial/DrvHostSerial.cpp
|
---|
602 |
|
---|
603 | ifeq ($(BUILD_TARGET),os2)
|
---|
604 | Drivers_SOURCES := $(filter-out \
|
---|
605 | Storage/DrvHost% \
|
---|
606 | , $(Drivers_SOURCES))
|
---|
607 | Drivers_SOURCES.os2 = \
|
---|
608 | Network/DrvTAPOs2.cpp
|
---|
609 | endif
|
---|
610 |
|
---|
611 | ifeq ($(BUILD_TARGET),solaris)
|
---|
612 | Drivers_SOURCES := $(filter-out \
|
---|
613 | Storage/DrvHost% \
|
---|
614 | , $(Drivers_SOURCES))
|
---|
615 | Drivers_SOURCES.solaris = \
|
---|
616 | Audio/solaudio.c \
|
---|
617 | Network/DrvTAP.cpp \
|
---|
618 | Storage/DrvHostBase.cpp \
|
---|
619 | Storage/DrvHostDVD.cpp
|
---|
620 | ifdef VBOX_WITH_CROSSBOW
|
---|
621 | Drivers_DEFS += VBOX_WITH_CROSSBOW
|
---|
622 | endif
|
---|
623 | ifdef VBOX_WITH_SUID_WRAPPER
|
---|
624 | Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
|
---|
625 | endif
|
---|
626 | endif
|
---|
627 |
|
---|
628 | Drivers_SOURCES.win = \
|
---|
629 | Network/DrvTAPWin32.cpp \
|
---|
630 | Audio/dsoundaudio.c \
|
---|
631 | Serial/DrvHostSerial.cpp
|
---|
632 |
|
---|
633 |
|
---|
634 | # -- features --
|
---|
635 |
|
---|
636 | ifdef VBOX_WITH_ISCSI
|
---|
637 | Drivers_SOURCES += \
|
---|
638 | Storage/DrvISCSI.cpp \
|
---|
639 | Storage/DrvISCSITransportTCP.cpp
|
---|
640 | Drivers_DEFS += VBOX_WITH_ISCSI
|
---|
641 | Storage/DrvISCSITransportTCP.cpp_INCS = \
|
---|
642 | Network/lwip/src/include \
|
---|
643 | Network/lwip/src/include/ipv4 \
|
---|
644 | Network/lwip/vbox/include
|
---|
645 | endif # VBOX_WITH_ISCSI
|
---|
646 |
|
---|
647 | ifdef VBOX_WITH_ALSA
|
---|
648 | Drivers_DEFS.linux += VBOX_WITH_ALSA
|
---|
649 | Drivers_SOURCES.linux+= \
|
---|
650 | Audio/alsaaudio.c \
|
---|
651 | Audio/alsa_stubs.c
|
---|
652 | # VBoxDD_LIBS.linux += asound
|
---|
653 | endif
|
---|
654 |
|
---|
655 | ifdef VBOX_WITH_PULSE
|
---|
656 | Drivers_DEFS.linux += VBOX_WITH_PULSE
|
---|
657 | Drivers_SOURCES.linux+= \
|
---|
658 | Audio/pulseaudio.c \
|
---|
659 | Audio/pulse_stubs.c
|
---|
660 | # VBoxDD_LIBS.linux += pulse
|
---|
661 | endif
|
---|
662 |
|
---|
663 | ifdef VBOX_WITH_USB
|
---|
664 | Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
|
---|
665 | Drivers_SOURCES += \
|
---|
666 | USB/DrvVUSBRootHub.cpp \
|
---|
667 | USB/VUSBDevice.cpp \
|
---|
668 | USB/VUSBUrb.cpp
|
---|
669 | ifdef VBOX_WITH_VRDP
|
---|
670 | Drivers_DEFS += VBOX_VRDP
|
---|
671 | Drivers_SOURCES += \
|
---|
672 | USB/vrdp/USBProxyDevice-vrdp.cpp
|
---|
673 | endif
|
---|
674 |
|
---|
675 | Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
|
---|
676 | ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
|
---|
677 | Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
|
---|
678 | endif
|
---|
679 | Drivers_SOURCES.darwin += \
|
---|
680 | USB/USBProxyDevice.cpp \
|
---|
681 | USB/darwin/USBProxyDevice-darwin.cpp
|
---|
682 |
|
---|
683 | Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
|
---|
684 | ifdef VBOX_WITHOUT_LINUX_COMPILER_H
|
---|
685 | Drivers_DEFS.linux += VBOX_WITHOUT_LINUX_COMPILER_H
|
---|
686 | endif
|
---|
687 | Drivers_SOURCES.linux+= \
|
---|
688 | USB/USBProxyDevice.cpp \
|
---|
689 | USB/linux/USBProxyDevice-linux.cpp
|
---|
690 |
|
---|
691 | Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
|
---|
692 | Drivers_SOURCES.l4 += \
|
---|
693 | USB/USBProxyDevice.cpp \
|
---|
694 | USB/linux/USBProxyDevice-linux.cpp
|
---|
695 |
|
---|
696 | Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
|
---|
697 | Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
|
---|
698 | Drivers_SOURCES.os2 += \
|
---|
699 | USB/USBProxyDevice.cpp \
|
---|
700 | USB/os2/USBProxyDevice-os2.cpp
|
---|
701 |
|
---|
702 | Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
|
---|
703 | Drivers_SOURCES.win += \
|
---|
704 | USB/USBProxyDevice.cpp \
|
---|
705 | USB/win32/USBProxyDevice-win32.cpp
|
---|
706 |
|
---|
707 | Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
|
---|
708 | Drivers_SOURCES.solaris += \
|
---|
709 | USB/USBProxyDevice.cpp \
|
---|
710 | USB/USBProxyDevice-stub.cpp
|
---|
711 | endif # VBOX_WITH_USB
|
---|
712 |
|
---|
713 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
714 | Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
715 | Drivers_SOURCES.linux += \
|
---|
716 | Storage/DrvRawImageAsync.cpp \
|
---|
717 | Storage/DrvTransportAsync.cpp
|
---|
718 |
|
---|
719 | Drivers_SOURCES.win += \
|
---|
720 | Storage/DrvRawImageAsync.cpp \
|
---|
721 | Storage/DrvTransportAsync.cpp
|
---|
722 | endif #VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
723 |
|
---|
724 | #
|
---|
725 | # Ring-0 Services (library, linked into VMMR0.r0)
|
---|
726 | #
|
---|
727 | ServicesR0_TEMPLATE = VBOXR0
|
---|
728 | ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
|
---|
729 | ServicesR0_SOURCES = \
|
---|
730 | Network/SrvIntNetR0.cpp
|
---|
731 |
|
---|
732 | #
|
---|
733 | # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
|
---|
734 | #
|
---|
735 | ifdef VBOX_WITH_TESTCASES
|
---|
736 | PROGRAMS += tstIntNetR0
|
---|
737 | tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
|
---|
738 | tstIntNetR0_DEFS = IN_INTNET_R0
|
---|
739 | tstIntNetR0_SOURCES = \
|
---|
740 | Network/testcase/tstIntNetR0.cpp
|
---|
741 | endif
|
---|
742 |
|
---|
743 | #
|
---|
744 | # EEPROM device unit test requires cppunit
|
---|
745 | #
|
---|
746 | ifdef VBOX_WITH_CPPUNIT_TESTCASES
|
---|
747 | ifndef VBOX_OSE
|
---|
748 | PROGRAMS += tstDevEEPROM
|
---|
749 | tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
|
---|
750 | tstDevEEPROM_SOURCES = \
|
---|
751 | Network/testcase/tstDevEEPROM.cpp
|
---|
752 | tstDevEEPROM_LIBS = \
|
---|
753 | $(TARGET_DevicesR3)
|
---|
754 | endif
|
---|
755 | endif
|
---|
756 |
|
---|
757 | include $(PATH_KBUILD)/subfooter.kmk
|
---|