VirtualBox

source: vbox/trunk/src/VBox/Devices/Makefile@ 1

Last change on this file since 1 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.3 KB
Line 
1#
2# Makefile for the devices, drivers and services.
3#
4
5#
6# Copyright (C) 2006 InnoTek Systemberatung GmbH
7#
8# This file is part of VirtualBox Open Source Edition (OSE), as
9# available from http://www.virtualbox.org. This file is free software;
10# you can redistribute it and/or modify it under the terms of the GNU
11# General Public License as published by the Free Software Foundation,
12# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13# distribution. VirtualBox OSE is distributed in the hope that it will
14# be useful, but WITHOUT ANY WARRANTY of any kind.
15#
16# If you received this file as part of a commercial VirtualBox
17# distribution, then only the terms of your commercial VirtualBox
18# license agreement apply instead of the previous paragraph.
19#
20
21DEPTH = ../../..
22include $(PATH_KBUILD)/header.kmk
23
24ifdef VBOX_WITH_TESTCASES
25 PROGRAMS = tstIntNetR0
26endif
27LIBRARIES = DevicesR3 Drivers ServicesR0
28DLLS = VBoxDD VBoxDD2
29SYSMODS = VBoxDDGC VBoxDD2GC VBoxDDR0 VBoxDD2R0
30
31OTHER_CLEAN = \
32 $(PATH_TARGET)/vboxaml.hex \
33 $(PATH_DevicesR3)/vboxaml.aml
34
35SUBDIRS = \
36 PC/BIOS \
37 PC/Etherboot-src \
38 Graphics/BIOS
39SUBDIRS_AFTER = \
40 Storage/testcase
41
42
43#
44# Check for VBOX_* stuff which governs defines.
45#
46ifdef VBOX_USE_IOAPIC
47DEFS += USE_IOAPIC
48endif
49ifdef VBOX_WITH_VRDP
50DEFS += VBOX_VRDP
51endif
52
53# enable the pdm lock.
54#DEFS += VBOX_WITH_PDM_LOCK
55
56
57#
58# VBoxDD (shared object)
59#
60VBoxDD_TEMPLATE = VBOXR3
61VBoxDD_SDKS.win = WINPSDK DXSDK W2K3DDK
62VBoxDD_SOURCES = \
63 Builtins.cpp \
64 muldiv64.c
65VBoxDD_DEFS = VBOX_ACPI
66ifdef VBOX_WITH_USB
67VBoxDD_DEFS += VBOX_WITH_USB IN_USB_R3
68endif
69ifdef VBOX_WITH_ISCSI
70VBoxDD_DEFS += VBOX_WITH_ISCSI
71endif
72VBoxDD_LIBS = \
73 $(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
74 $(PATH_LIB)/Drivers$(VBOX_SUFF_LIB) \
75 $(PATH_LIB)/PcDefBiosLogo$(VBOX_SUFF_LIB) \
76 $(LIB_VMM) \
77 $(LIB_RUNTIME)
78VBoxDD_LIBS.win = \
79 $(PATH_LIB)/VBoxDD2.lib \
80 $(PATH_SDK_DXSDK_LIB)/dxguid.lib \
81 $(PATH_SDK_W2K3DDK_LIB)/ntdll.lib
82VBoxDD_LIBS.linux = \
83 $(PATH_BIN)/VBoxDD2.so
84
85#
86ifeq ($(BUILD_TARGET),l4)
87VBoxDD_LIBS += \
88 $(L4_LIBDIR)/libl4sys.p.a
89endif
90VBoxDD_LIBS.l4 = \
91 $(PATH_BIN)/VBoxDD2.s.so
92VBoxDD_LIBS.darwin = \
93 $(PATH_BIN)/VBoxDD2.dylib \
94 $(LIB_REM)
95VBoxDD_LIBS.os2 = \
96 $(PATH_BIN)/VBoxDD2.dll
97VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
98VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
99
100
101# damn, fix this.
102$(PATH_LIB)/VBoxDD2.lib: $(PATH_BIN)/VBoxDD2.dll
103
104
105#
106# VBoxDD2 (shared object)
107#
108VBoxDD2_TEMPLATE = VBOXR3
109VBoxDD2_DEFS = IN_VBOXDD2
110VBoxDD2_SOURCES = \
111 Builtins2.cpp \
112 PC/apic.c
113VBoxDD2_LIBS = \
114 $(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
115 $(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
116 $(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB) \
117 $(LIB_VMM) \
118 $(LIB_RUNTIME)
119VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
120ifeq ($(BUILD_TARGET),l4)
121VBoxDD2_LIBS += \
122 $(L4_LIBDIR)/libl4sys.p.a
123endif
124VBoxDD2_LIBS.darwin += $(LIB_REM)
125VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
126
127
128#
129# DevicesR3 (library)
130#
131DevicesR3_TEMPLATE = VBOXR3
132DevicesR3_SDKS.win = WINPSDK W2K3DDK
133DevicesR3_INCS = \
134 $(PATH_CURRENT)
135DevicesR3_SOURCES = \
136 Input/pckbd.c \
137 Bus/DevPCI.cpp \
138 Graphics/DevVGA.cpp \
139 Storage/DevATA.cpp \
140 PC/DevPit-i8254.cpp \
141 PC/DevPIC.cpp \
142 PC/DevACPI.cpp \
143 PC/DevRTC.cpp \
144 PC/DevPcBios.cpp \
145 PC/DevPcArch.c \
146 VMMDev/VBoxDev.cpp \
147 VMMDev/VMMDevHGCM.cpp \
148 Network/DevPCNet.cpp \
149 Network/ne2000.c \
150 Audio/DevIchAc97.cpp \
151 PC/dma.c \
152 Storage/fdc.c \
153 Serial/serial.c
154
155ifdef VBOX_WITH_USB
156DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
157DevicesR3_SOURCES += \
158 USB/DevOHCI.cpp
159endif
160
161DevicesR3_DEFS += VBOX_HGCM
162DevicesR3_DEFS.linux += _GNU_SOURCE
163DevicesR3_DEFS.l4 += _GNU_SOURCE
164
165
166# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl.
167PC/DevACPI.cpp_DEPS = $(PATH_TARGET)/vboxaml.hex
168PC/DevACPI.cpp_INCS = $(PATH_TARGET)
169Bus/DevPCI.cpp_INCS = Bus
170
171
172#
173# VBoxDDGC
174#
175VBoxDDGC_TEMPLATE = VBOXGC
176VBoxDDGC_DEFS =
177VBoxDDGC_SYSSUFF = .gc
178VBoxDDGC_INCS = \
179 $(PATH_CURRENT)
180VBoxDDGC_SOURCES = \
181 muldiv64.c \
182 Bus/DevPCI.cpp \
183 Graphics/DevVGA.cpp \
184 Input/pckbd.c \
185 PC/DevACPI.cpp \
186 PC/DevPit-i8254.cpp \
187 PC/DevPIC.cpp \
188 PC/DevRTC.cpp \
189 Storage/DevATA.cpp \
190 Network/DevPCNet.cpp
191
192ifdef VBOX_WITH_USB
193VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
194VBoxDDGC_SOURCES += \
195 USB/DevOHCI.cpp
196endif
197
198ifeq ($(VBOX_LDR_FMT32),pe)
199VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
200endif
201ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
202VBoxDDGC_LIBS = \
203 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
204 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
205endif
206
207
208#
209# VBoxDDR0
210#
211VBoxDDR0_TEMPLATE = VBOXR0
212VBoxDDR0_SYSSUFF = .r0
213VBoxDDR0_DEFS = IN_RT_R0
214VBoxDDR0_INCS = \
215 $(PATH_CURRENT)
216VBoxDDR0_SOURCES = \
217 muldiv64.c \
218 Bus/DevPCI.cpp \
219 Graphics/DevVGA.cpp \
220 Input/pckbd.c \
221 PC/DevACPI.cpp \
222 PC/DevPit-i8254.cpp \
223 PC/DevPIC.cpp \
224 PC/DevRTC.cpp \
225 Storage/DevATA.cpp \
226 Network/DevPCNet.cpp
227
228ifdef VBOX_WITH_USB
229VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
230VBoxDDR0_SOURCES += \
231 USB/DevOHCI.cpp
232endif
233
234ifeq ($(VBOX_LDR_FMT32),pe)
235VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
236endif
237ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
238VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
239endif
240VBoxDDR0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
241ifeq ($(VBOX_LDR_FMT32),elf) # this is template stuff!
242VBoxDDR0_LIBS += $(VBOX_GCC_LIBGCC)
243endif
244
245
246#
247# VBoxDD2GC (LGPL code)
248#
249VBoxDD2GC_TEMPLATE = VBOXGC
250VBoxDD2GC_DEFS =
251VBoxDD2GC_SYSSUFF = .gc
252VBoxDD2GC_INCS = \
253 $(PATH_CURRENT)
254VBoxDD2GC_SOURCES = \
255 PC/apic.c
256ifeq ($(VBOX_LDR_FMT32),pe)
257VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
258endif
259ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
260VBoxDD2GC_LIBS = \
261 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
262 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
263endif
264
265
266#
267# VBoxDD2R0 (LGPL code)
268#
269VBoxDD2R0_TEMPLATE = VBOXR0
270VBoxDD2R0_DEFS = IN_RT_R0
271VBoxDD2R0_SYSSUFF = .r0
272VBoxDD2R0_INCS = \
273 $(PATH_CURRENT)
274VBoxDD2R0_SOURCES = \
275 PC/apic.c
276ifeq ($(VBOX_LDR_FMT),pe)
277VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
278endif
279ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
280VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
281endif
282VBoxDD2R0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
283ifeq ($(VBOX_LDR_FMT),elf)
284VBoxDD2R0_LIBS += $(VBOX_GCC_LIBGCC)
285endif
286
287
288#
289# Drivers (library)
290#
291ifeq ($(BUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
292Drivers_TEMPLATE = VBOXR3NP
293else
294Drivers_TEMPLATE = VBOXR3
295endif
296Drivers_SDKS.win = WINPSDK W2K3DDK
297Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
298Drivers_DEFS = IN_IDE_R3
299Drivers_INCS = \
300 Network/slirp
301Drivers_SOURCES = \
302 Input/DrvMouseQueue.cpp \
303 Input/DrvKeyboardQueue.cpp \
304 Storage/VBoxHDD.cpp \
305 Storage/DrvBlock.cpp \
306 Storage/DrvMediaISO.cpp \
307 Storage/DrvRawImage.cpp \
308 Storage/DrvHostBase.cpp \
309 Storage/DrvHostDVD.cpp \
310 Storage/DrvHostFloppy.cpp \
311 PC/DrvACPI.cpp \
312 Network/DrvIntNet.cpp \
313 Network/DrvNetSniffer.cpp \
314 Network/DrvNAT.cpp \
315 Network/slirp/cksum.c \
316 Network/slirp/if.c \
317 Network/slirp/ip_icmp.c \
318 Network/slirp/ip_input.c \
319 Network/slirp/ip_output.c \
320 Network/slirp/slirp.c \
321 Network/slirp/mbuf.c \
322 Network/slirp/misc.c \
323 Network/slirp/sbuf.c \
324 Network/slirp/socket.c \
325 Network/slirp/tcp_input.c \
326 Network/slirp/tcp_output.c \
327 Network/slirp/tcp_subr.c \
328 Network/slirp/tcp_timer.c \
329 Network/slirp/tftp.c \
330 Network/slirp/udp.c \
331 Network/slirp/bootp.c \
332 Network/slirp/debug.c \
333 Audio/audio.c \
334 Audio/mixeng.c \
335 Audio/noaudio.c \
336 Audio/audiosniffer.c
337
338# -- OS specific --
339
340ifeq ($(BUILD_TARGET),darwin)
341Drivers_SOURCES := $(filter-out \
342 Storage/DrvHost% \
343 , $(Drivers_SOURCES))
344Drivers_SOURCES.darwin =
345endif # darwin
346
347
348ifeq ($(BUILD_TARGET),l4)
349Drivers_SOURCES = \
350 Input/DrvMouseQueue.cpp \
351 Input/DrvKeyboardQueue.cpp \
352 Storage/VBoxHDD.cpp \
353 Storage/DrvBlock.cpp \
354 Storage/DrvMediaISO.cpp \
355 Storage/DrvRawImage.cpp \
356 Storage/DrvHostBase.cpp \
357 Storage/DrvHostDVD.cpp \
358 PC/DrvACPI.cpp \
359 Network/DrvIntNet.cpp \
360 Network/DrvNetSniffer.cpp \
361 Audio/audio.c \
362 Audio/mixeng.c \
363 Audio/noaudio.c \
364 Audio/audiosniffer.c
365
366Drivers_SOURCES.l4 = \
367 Network/DrvTAP.cpp \
368 Audio/ossaudio.c
369endif # l4
370
371Drivers_SOURCES.linux = \
372 Network/DrvTAP.cpp \
373 Audio/ossaudio.c
374
375ifeq ($(BUILD_TARGET),os2)
376Drivers_SOURCES := $(filter-out \
377 Storage/DrvHost% \
378 , $(Drivers_SOURCES))
379Drivers_SOURCES.os2 =
380endif
381
382Drivers_SOURCES.win = \
383 Network/DrvTAPWin32.cpp \
384 Audio/dsoundaudio.c
385
386
387# -- features --
388
389ifdef VBOX_WITH_ISCSI
390Drivers_SOURCES += \
391 Storage/DrvISCSI.cpp \
392 Storage/DrvISCSITransportTCP.cpp
393Drivers_DEFS += VBOX_WITH_ISCSI
394endif # VBOX_WITH_ISCSI
395
396ifdef VBOX_WITH_ALSA
397Drivers_DEFS += VBOX_WITH_ALSA
398Drivers_SOURCES.linux += \
399 Audio/alsaaudio.c
400VBoxDD_LIBS.linux += asound
401endif
402
403ifdef VBOX_WITH_USB
404Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
405Drivers_SOURCES += \
406 USB/DrvVUSBRootHub.cpp \
407 USB/VUSBDevice.cpp \
408 USB/VUSBUrb.cpp
409ifdef VBOX_WITH_VRDP
410Drivers_SOURCES += \
411 USB/vrdp/USBProxyDevice-vrdp.cpp
412endif
413
414Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
415Drivers_SOURCES.linux += \
416 USB/USBProxyDevice.cpp \
417 USB/linux/USBProxyDevice-linux.cpp
418
419Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
420Drivers_SOURCES.l4 += \
421 USB/USBProxyDevice.cpp \
422 USB/linux/USBProxyDevice-linux.cpp
423
424Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
425Drivers_SOURCES.win += \
426 USB/USBProxyDevice.cpp \
427 USB/win32/USBProxyDevice-win32.cpp \
428 USB/win32/USBLib-win32.cpp
429endif # VBOX_WITH_USB
430
431
432
433#
434# Ring-0 Services (library, linked into VMMR0.r0)
435#
436ServicesR0_TEMPLATE = VBOXR0
437ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
438ServicesR0_SOURCES = \
439 Network/SrvIntNetR0.cpp
440
441#
442# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
443#
444tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
445tstIntNetR0_DEFS = IN_INTNET_R0
446tstIntNetR0_SOURCES = \
447 Network/testcase/tstIntNetR0.cpp
448tstIntNetR0_LIBS = \
449 $(LIB_RUNTIME)
450
451
452include $(PATH_KBUILD)/footer.kmk
453
454
455# ACPI DSL generation
456$(PATH_TARGET)/vboxaml.hex: PC/vbox.dsl
457 $(call MSG_L1,iasl $<,=> $@)
458 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
459
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette