1 | # $Id: Makefile.kmk 9693 2008-06-13 16:30:46Z 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 $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 | # Include sub-makefiles.
|
---|
26 | include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
|
---|
27 | ifndef VBOX_OSE # not yet
|
---|
28 | include $(PATH_SUB_CURRENT)/PC/VMI/Makefile.kmk
|
---|
29 | endif
|
---|
30 | include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
|
---|
31 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
32 | include $(PATH_SUB_CURRENT)/Storage/testcase/Makefile.kmk
|
---|
33 |
|
---|
34 | # Subdirs with complex makefiles.
|
---|
35 | ifdef VBOX_WITH_INTEL_PXE
|
---|
36 | SUBDIRS_LIBRARIES = PC/PXE
|
---|
37 | SUBDIRS_CLEAN = PC/PXE
|
---|
38 | else
|
---|
39 | SUBDIRS_LIBRARIES = PC/Etherboot-src
|
---|
40 | SUBDIRS_CLEAN = PC/Etherboot-src
|
---|
41 | endif
|
---|
42 |
|
---|
43 | ifndef VBOX_OSE
|
---|
44 | SUBDIRS_LIBRARIES += Storage/VBoxHDDFormats
|
---|
45 | SUBDIRS_CLEAN += Storage/VBoxHDDFormats
|
---|
46 | endif
|
---|
47 |
|
---|
48 | #
|
---|
49 | # Main targets.
|
---|
50 | #
|
---|
51 | LIBRARIES += DevicesR3 Drivers ServicesR0
|
---|
52 | DLLS += VBoxDDU VBoxDD VBoxDD2
|
---|
53 | SYSMODS += VBoxDDGC VBoxDD2GC VBoxDDR0 VBoxDD2R0
|
---|
54 |
|
---|
55 |
|
---|
56 | #
|
---|
57 | # Enable the pdm lock (experimental).
|
---|
58 | #
|
---|
59 | ifdef VBOX_WITH_PDM_LOCK
|
---|
60 | DEFS += VBOX_WITH_PDM_LOCK
|
---|
61 | endif
|
---|
62 |
|
---|
63 |
|
---|
64 | #
|
---|
65 | # VBoxDDU (shared object)
|
---|
66 | #
|
---|
67 | VBoxDDU_TEMPLATE = VBOXR3
|
---|
68 | VBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
|
---|
69 | VBoxDDU_DEFS = IN_VBOXDDU
|
---|
70 | ifdef 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
|
---|
79 | else
|
---|
80 | VBoxDDU_SDKS.win = WINPSDK
|
---|
81 | endif
|
---|
82 | VBoxDDU_SOURCES = \
|
---|
83 | Storage/VBoxHDD-new.cpp \
|
---|
84 | Storage/VDICore.cpp \
|
---|
85 | Storage/VDIHDDCore.cpp \
|
---|
86 | Storage/VmdkHDDCore.cpp \
|
---|
87 | Storage/RawHDDCore.cpp \
|
---|
88 | VBoxDDUDeps.cpp
|
---|
89 | ifndef VBOX_OSE
|
---|
90 | VBoxDDU_SOURCES += \
|
---|
91 | Storage/VHDHDDCore.cpp
|
---|
92 | endif
|
---|
93 | ifdef VBOX_WITH_USB
|
---|
94 | VBoxDDU_INCS.os2 += \
|
---|
95 | $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
|
---|
96 | endif
|
---|
97 | VBoxDDU_LIBS = \
|
---|
98 | $(LIB_RUNTIME)
|
---|
99 | ifdef VBOX_WITH_USB
|
---|
100 | VBoxDDU_LIBS += \
|
---|
101 | $(PATH_LIB)/USBLib$(VBOX_SUFF_LIB)
|
---|
102 | endif
|
---|
103 | ifeq ($(KBUILD_TARGET),l4)
|
---|
104 | VBoxDDU_LIBS += \
|
---|
105 | $(L4_LIBDIR)/libl4sys.p.a
|
---|
106 | endif
|
---|
107 | VBoxDDU_LDFLAGS.darwin = -install_name @executable_path/VBoxDDU.dylib
|
---|
108 | ifdef VBOX_WITH_USB
|
---|
109 | ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
|
---|
110 | VBoxDDU_LDFLAGS.darwin += -framework IOKit
|
---|
111 | endif
|
---|
112 | endif
|
---|
113 |
|
---|
114 | VBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
|
---|
115 | VBoxDDU_LDFLAGS.l4 = -Wl,--no-undefined
|
---|
116 |
|
---|
117 | #
|
---|
118 | # VBoxDDULnxHostR3 (Only needed for l4, currently for executing vditool on L4Linux.)
|
---|
119 | #
|
---|
120 | ifeq ($(KBUILD_TARGET),l4)
|
---|
121 | LIBRARIES += VBoxDDULnxHostR3
|
---|
122 | VBoxDDULnxHostR3_TEMPLATE = VBOXLNXHOSTR3LIB
|
---|
123 | VBoxDDULnxHostR3_DEFS = IN_VBOXDDU
|
---|
124 | VBoxDDULnxHostR3_SOURCES = $(VBoxDDU_SOURCES)
|
---|
125 | endif
|
---|
126 |
|
---|
127 | #
|
---|
128 | # VBoxDD (shared object)
|
---|
129 | #
|
---|
130 | VBoxDD_TEMPLATE = VBOXR3
|
---|
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 | endif
|
---|
147 | ifdef VBOX_WITH_E1000
|
---|
148 | VBoxDD_DEFS += VBOX_WITH_E1000
|
---|
149 | endif
|
---|
150 | ifndef VBOX_OSE
|
---|
151 | VBoxDD_DEFS += VBOX_WITH_INIP
|
---|
152 | endif
|
---|
153 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
154 | VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
155 | endif
|
---|
156 | VBoxDD_LIBS = \
|
---|
157 | $(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
|
---|
158 | $(PATH_LIB)/Drivers$(VBOX_SUFF_LIB) \
|
---|
159 | $(PATH_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
|
---|
160 | $(LIB_VMM) \
|
---|
161 | $(LIB_RUNTIME)
|
---|
162 | ifeq ($(KBUILD_TARGET),win)
|
---|
163 | VBoxDD_LIBS += \
|
---|
164 | $(LIB_DDU) \
|
---|
165 | $(PATH_LIB)/VBoxDD2.lib \
|
---|
166 | $(PATH_SDK_DXSDK_LIB)/dxguid.lib
|
---|
167 | else
|
---|
168 | VBoxDD_LIBS += \
|
---|
169 | $(INSTARGET_VBoxDDU) \
|
---|
170 | $(INSTARGET_VBoxDD2)
|
---|
171 | endif
|
---|
172 | ifeq ($(KBUILD_TARGET),l4)
|
---|
173 | VBoxDD_LIBS += \
|
---|
174 | $(L4_LIBDIR)/libl4sys.p.a
|
---|
175 | endif
|
---|
176 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
177 | VBoxDD_LIBS += adm
|
---|
178 | ifdef VBOX_WITH_SUID_WRAPPER
|
---|
179 | VBoxDD_LIBS += secdb
|
---|
180 | endif
|
---|
181 | endif
|
---|
182 | VBoxDD_LIBS.darwin += \
|
---|
183 | $(LIB_REM)
|
---|
184 | VBoxDD_LDFLAGS.darwin = -install_name @executable_path/VBoxDD.dylib \
|
---|
185 | -framework CoreAudio \
|
---|
186 | -framework IOKit \
|
---|
187 | -framework Carbon \
|
---|
188 | -framework DiskArbitration
|
---|
189 | VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
|
---|
190 | VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
|
---|
191 |
|
---|
192 |
|
---|
193 | # damn, fix this.
|
---|
194 | ifeq ($(KBUILD_TARGET),win)
|
---|
195 | $(PATH_LIB)/VBoxDD2.lib: $(PATH_BIN)/VBoxDD2.dll
|
---|
196 | $(PATH_LIB)/VBoxDDU.lib: $(PATH_BIN)/VBoxDDU.dll
|
---|
197 | endif
|
---|
198 |
|
---|
199 |
|
---|
200 | #
|
---|
201 | # VBoxDD2 (shared object)
|
---|
202 | #
|
---|
203 | VBoxDD2_TEMPLATE = VBOXR3
|
---|
204 | VBoxDD2_DEFS = IN_VBOXDD2
|
---|
205 | VBoxDD2_INCS := \
|
---|
206 | $(PATH_SUB_CURRENT)
|
---|
207 | VBoxDD2_SOURCES = \
|
---|
208 | Builtins2.cpp \
|
---|
209 | PC/DevAPIC.cpp
|
---|
210 | VBoxDD2_LIBS = \
|
---|
211 | $(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
|
---|
212 | $(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
|
---|
213 | $(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB) \
|
---|
214 | $(PATH_LIB)/VmiBiosBin$(VBOX_SUFF_LIB) \
|
---|
215 | $(LIB_VMM) \
|
---|
216 | $(LIB_RUNTIME)
|
---|
217 | ifeq ($(KBUILD_TARGET),l4)
|
---|
218 | VBoxDD2_LIBS += \
|
---|
219 | $(L4_LIBDIR)/libl4sys.p.a
|
---|
220 | endif
|
---|
221 | VBoxDD2_LIBS.darwin += $(LIB_REM)
|
---|
222 | VBoxDD2_LDFLAGS.darwin = -install_name @executable_path/VBoxDD2.dylib
|
---|
223 | VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
|
---|
224 | VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
|
---|
225 |
|
---|
226 |
|
---|
227 | #
|
---|
228 | # DevicesR3 (library)
|
---|
229 | #
|
---|
230 | DevicesR3_TEMPLATE = VBOXR3
|
---|
231 | DevicesR3_SDKS.win = WINPSDK W2K3DDK
|
---|
232 | DevicesR3_DEFS += VBOX_HGCM_HOST_CODE
|
---|
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 ($(KBUILD_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 ($(KBUILD_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 ($(KBUILD_TARGET),freebsd)
|
---|
566 | Drivers_SOURCES := $(filter-out \
|
---|
567 | Storage/DrvHost% \
|
---|
568 | , $(Drivers_SOURCES))
|
---|
569 | Drivers_SOURCES.freebsd =
|
---|
570 | endif # freebsd
|
---|
571 |
|
---|
572 |
|
---|
573 | ifeq ($(KBUILD_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 ($(KBUILD_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 ($(KBUILD_TARGET),solaris)
|
---|
612 | Drivers_SOURCES := $(filter-out \
|
---|
613 | Storage/DrvHost% \
|
---|
614 | , $(Drivers_SOURCES))
|
---|
615 | Drivers_SOURCES.solaris = \
|
---|
616 | Audio/solaudio.c \
|
---|
617 | $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
|
---|
618 | Storage/DrvHostBase.cpp \
|
---|
619 | Storage/DrvHostDVD.cpp
|
---|
620 | ifdef VBOX_WITH_CROSSBOW
|
---|
621 | Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
|
---|
622 | Drivers_DEFS += VBOX_WITH_CROSSBOW
|
---|
623 | endif
|
---|
624 | ifdef VBOX_WITH_SUID_WRAPPER
|
---|
625 | Drivers_DEFS += VBOX_WITH_SUID_WRAPPER
|
---|
626 | endif
|
---|
627 | endif
|
---|
628 |
|
---|
629 | Drivers_SOURCES.win = \
|
---|
630 | Network/DrvTAPWin.cpp \
|
---|
631 | Audio/dsoundaudio.c \
|
---|
632 | Serial/DrvHostSerial.cpp
|
---|
633 |
|
---|
634 |
|
---|
635 | # -- features --
|
---|
636 |
|
---|
637 | ifdef VBOX_WITH_ISCSI
|
---|
638 | Drivers_SOURCES += \
|
---|
639 | Storage/DrvISCSI.cpp \
|
---|
640 | Storage/DrvISCSITransportTCP.cpp
|
---|
641 | Drivers_DEFS += VBOX_WITH_ISCSI
|
---|
642 | Storage/DrvISCSITransportTCP.cpp_INCS = \
|
---|
643 | Network/lwip/src/include \
|
---|
644 | Network/lwip/src/include/ipv4 \
|
---|
645 | Network/lwip/vbox/include
|
---|
646 | endif # VBOX_WITH_ISCSI
|
---|
647 |
|
---|
648 | ifdef VBOX_WITH_ALSA
|
---|
649 | Drivers_DEFS.linux += VBOX_WITH_ALSA
|
---|
650 | Drivers_SOURCES.linux+= \
|
---|
651 | Audio/alsaaudio.c \
|
---|
652 | Audio/alsa_stubs.c
|
---|
653 | # VBoxDD_LIBS.linux += asound
|
---|
654 | endif
|
---|
655 |
|
---|
656 | ifdef VBOX_WITH_PULSE
|
---|
657 | Drivers_DEFS.linux += VBOX_WITH_PULSE
|
---|
658 | Drivers_SOURCES.linux+= \
|
---|
659 | Audio/pulseaudio.c \
|
---|
660 | Audio/pulse_stubs.c
|
---|
661 | # VBoxDD_LIBS.linux += pulse
|
---|
662 | endif
|
---|
663 |
|
---|
664 | ifdef VBOX_WITH_USB
|
---|
665 | Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
|
---|
666 | Drivers_SOURCES += \
|
---|
667 | USB/DrvVUSBRootHub.cpp \
|
---|
668 | USB/VUSBDevice.cpp \
|
---|
669 | USB/VUSBUrb.cpp
|
---|
670 | ifdef VBOX_WITH_VRDP
|
---|
671 | Drivers_DEFS += VBOX_VRDP
|
---|
672 | Drivers_SOURCES += \
|
---|
673 | USB/vrdp/USBProxyDevice-vrdp.cpp
|
---|
674 | endif
|
---|
675 |
|
---|
676 | Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
|
---|
677 | ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
|
---|
678 | Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
|
---|
679 | endif
|
---|
680 | Drivers_SOURCES.darwin += \
|
---|
681 | USB/USBProxyDevice.cpp \
|
---|
682 | USB/darwin/USBProxyDevice-darwin.cpp
|
---|
683 |
|
---|
684 | Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
|
---|
685 | ifdef VBOX_WITHOUT_LINUX_COMPILER_H
|
---|
686 | Drivers_DEFS.linux += VBOX_WITHOUT_LINUX_COMPILER_H
|
---|
687 | endif
|
---|
688 | Drivers_SOURCES.linux+= \
|
---|
689 | USB/USBProxyDevice.cpp \
|
---|
690 | USB/linux/USBProxyDevice-linux.cpp
|
---|
691 |
|
---|
692 | Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
|
---|
693 | Drivers_SOURCES.l4 += \
|
---|
694 | USB/USBProxyDevice.cpp \
|
---|
695 | USB/linux/USBProxyDevice-linux.cpp
|
---|
696 |
|
---|
697 | Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
|
---|
698 | Drivers_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
|
---|
699 | Drivers_SOURCES.os2 += \
|
---|
700 | USB/USBProxyDevice.cpp \
|
---|
701 | USB/os2/USBProxyDevice-os2.cpp
|
---|
702 |
|
---|
703 | Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
|
---|
704 | Drivers_SOURCES.win += \
|
---|
705 | USB/USBProxyDevice.cpp \
|
---|
706 | USB/win/USBProxyDevice-win.cpp
|
---|
707 |
|
---|
708 | Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
|
---|
709 | Drivers_SOURCES.solaris += \
|
---|
710 | USB/USBProxyDevice.cpp \
|
---|
711 | USB/USBProxyDevice-stub.cpp
|
---|
712 | endif # VBOX_WITH_USB
|
---|
713 |
|
---|
714 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
715 | Drivers_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
716 | Drivers_SOURCES += \
|
---|
717 | Storage/DrvRawImageAsync.cpp \
|
---|
718 | Storage/DrvTransportAsync.cpp
|
---|
719 | endif #VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
720 |
|
---|
721 | #
|
---|
722 | # Ring-0 Services (library, linked into VMMR0.r0)
|
---|
723 | #
|
---|
724 | ServicesR0_TEMPLATE = VBOXR0
|
---|
725 | ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
|
---|
726 | ServicesR0_SOURCES = \
|
---|
727 | Network/SrvIntNetR0.cpp
|
---|
728 |
|
---|
729 | #
|
---|
730 | # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
|
---|
731 | #
|
---|
732 | ifdef VBOX_WITH_TESTCASES
|
---|
733 | PROGRAMS += tstIntNetR0
|
---|
734 | tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
|
---|
735 | tstIntNetR0_DEFS = IN_INTNET_R0
|
---|
736 | tstIntNetR0_SOURCES = \
|
---|
737 | Network/testcase/tstIntNetR0.cpp
|
---|
738 | endif
|
---|
739 |
|
---|
740 | #
|
---|
741 | # EEPROM device unit test requires cppunit
|
---|
742 | #
|
---|
743 | ifdef VBOX_WITH_CPPUNIT_TESTCASES
|
---|
744 | ifdef VBOX_WITH_E1000
|
---|
745 | PROGRAMS += tstDevEEPROM
|
---|
746 | tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
|
---|
747 | tstDevEEPROM_SOURCES = \
|
---|
748 | Network/testcase/tstDevEEPROM.cpp
|
---|
749 | tstDevEEPROM_LIBS = \
|
---|
750 | $(TARGET_DevicesR3)
|
---|
751 | PROGRAMS += tstDevPhy
|
---|
752 | tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
|
---|
753 | tstDevPhy_SOURCES = \
|
---|
754 | Network/testcase/tstDevPhy.cpp \
|
---|
755 | Network/DevE1000Phy.cpp
|
---|
756 | tstDevPhy_DEFS = PHY_UNIT_TEST
|
---|
757 | endif
|
---|
758 | endif
|
---|
759 |
|
---|
760 | include $(KBUILD_PATH)/subfooter.kmk
|
---|