VirtualBox

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

Last change on this file since 584 was 584, checked in by vboxsync, 18 years ago

drop the *Host* drivers for now.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.5 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_TARGET)/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 VBOX_NTDLL
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
81VBoxDD_LIBS.linux = \
82 $(PATH_BIN)/VBoxDD2.so
83
84#
85ifeq ($(BUILD_TARGET),l4)
86VBoxDD_LIBS += \
87 $(L4_LIBDIR)/libl4sys.p.a
88endif
89VBoxDD_LIBS.l4 = \
90 $(PATH_BIN)/VBoxDD2.s.so
91VBoxDD_LIBS.darwin = \
92 $(PATH_BIN)/VBoxDD2.dylib \
93 $(LIB_REM)
94VBoxDD_LIBS.os2 = \
95 $(PATH_BIN)/VBoxDD2.dll
96VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
97VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
98
99
100# damn, fix this.
101$(PATH_LIB)/VBoxDD2.lib: $(PATH_BIN)/VBoxDD2.dll
102
103
104#
105# VBoxDD2 (shared object)
106#
107VBoxDD2_TEMPLATE = VBOXR3
108VBoxDD2_DEFS = IN_VBOXDD2
109VBoxDD2_SOURCES = \
110 Builtins2.cpp \
111 PC/apic.c
112VBoxDD2_LIBS = \
113 $(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
114 $(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
115 $(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB) \
116 $(LIB_VMM) \
117 $(LIB_RUNTIME)
118VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
119ifeq ($(BUILD_TARGET),l4)
120VBoxDD2_LIBS += \
121 $(L4_LIBDIR)/libl4sys.p.a
122endif
123VBoxDD2_LIBS.darwin += $(LIB_REM)
124VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
125
126
127#
128# DevicesR3 (library)
129#
130DevicesR3_TEMPLATE = VBOXR3
131DevicesR3_SDKS.win = WINPSDK W2K3DDK
132DevicesR3_INCS = \
133 $(PATH_CURRENT)
134DevicesR3_SOURCES = \
135 Input/pckbd.c \
136 Bus/DevPCI.cpp \
137 Graphics/DevVGA.cpp \
138 Storage/DevATA.cpp \
139 PC/DevPit-i8254.cpp \
140 PC/DevPIC.cpp \
141 PC/DevACPI.cpp \
142 PC/DevRTC.cpp \
143 PC/DevPcBios.cpp \
144 PC/DevPcArch.c \
145 VMMDev/VBoxDev.cpp \
146 VMMDev/VMMDevHGCM.cpp \
147 Network/DevPCNet.cpp \
148 Audio/DevIchAc97.cpp \
149 PC/dma.c \
150 Storage/fdc.c \
151 Serial/serial.c
152
153ifeq (0,1)
154DevicesR3_SOURCES += \
155 Network/ne2000.c
156endif
157
158ifdef VBOX_WITH_USB
159DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
160DevicesR3_SOURCES += \
161 USB/DevOHCI.cpp
162endif
163
164DevicesR3_DEFS += VBOX_HGCM
165DevicesR3_DEFS.linux += _GNU_SOURCE
166DevicesR3_DEFS.l4 += _GNU_SOURCE
167
168
169# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl.
170PC/DevACPI.cpp_DEPS = $(PATH_TARGET)/vboxaml.hex
171PC/DevACPI.cpp_INCS = $(PATH_TARGET)
172Bus/DevPCI.cpp_INCS = Bus
173
174
175#
176# VBoxDDGC
177#
178VBoxDDGC_TEMPLATE = VBOXGC
179VBoxDDGC_DEFS =
180VBoxDDGC_SYSSUFF = .gc
181VBoxDDGC_INCS = \
182 $(PATH_CURRENT)
183VBoxDDGC_SOURCES = \
184 muldiv64.c \
185 Bus/DevPCI.cpp \
186 Graphics/DevVGA.cpp \
187 Input/pckbd.c \
188 PC/DevACPI.cpp \
189 PC/DevPit-i8254.cpp \
190 PC/DevPIC.cpp \
191 PC/DevRTC.cpp \
192 Storage/DevATA.cpp \
193 Network/DevPCNet.cpp
194
195ifdef VBOX_WITH_USB
196VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
197VBoxDDGC_SOURCES += \
198 USB/DevOHCI.cpp
199endif
200
201ifeq ($(VBOX_LDR_FMT32),pe)
202VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
203endif
204ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
205VBoxDDGC_LIBS = \
206 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
207 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
208endif
209
210
211#
212# VBoxDDR0
213#
214VBoxDDR0_TEMPLATE = VBOXR0
215VBoxDDR0_SYSSUFF = .r0
216VBoxDDR0_DEFS = IN_RT_R0
217VBoxDDR0_INCS = \
218 $(PATH_CURRENT)
219VBoxDDR0_SOURCES = \
220 muldiv64.c \
221 Bus/DevPCI.cpp \
222 Graphics/DevVGA.cpp \
223 Input/pckbd.c \
224 PC/DevACPI.cpp \
225 PC/DevPit-i8254.cpp \
226 PC/DevPIC.cpp \
227 PC/DevRTC.cpp \
228 Storage/DevATA.cpp \
229 Network/DevPCNet.cpp
230
231ifdef VBOX_WITH_USB
232VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
233VBoxDDR0_SOURCES += \
234 USB/DevOHCI.cpp
235endif
236
237ifeq ($(VBOX_LDR_FMT32),pe)
238VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
239endif
240ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
241VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
242endif
243VBoxDDR0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
244ifeq ($(VBOX_LDR_FMT32),elf) # this is template stuff!
245VBoxDDR0_LIBS += $(VBOX_GCC_LIBGCC)
246endif
247
248
249#
250# VBoxDD2GC (LGPL code)
251#
252VBoxDD2GC_TEMPLATE = VBOXGC
253VBoxDD2GC_DEFS =
254VBoxDD2GC_SYSSUFF = .gc
255VBoxDD2GC_INCS = \
256 $(PATH_CURRENT)
257VBoxDD2GC_SOURCES = \
258 PC/apic.c
259ifeq ($(VBOX_LDR_FMT32),pe)
260VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
261endif
262ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
263VBoxDD2GC_LIBS = \
264 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
265 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
266endif
267
268
269#
270# VBoxDD2R0 (LGPL code)
271#
272VBoxDD2R0_TEMPLATE = VBOXR0
273VBoxDD2R0_DEFS = IN_RT_R0
274VBoxDD2R0_SYSSUFF = .r0
275VBoxDD2R0_INCS = \
276 $(PATH_CURRENT)
277VBoxDD2R0_SOURCES = \
278 PC/apic.c
279ifeq ($(VBOX_LDR_FMT),pe)
280VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
281endif
282ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
283VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
284endif
285VBoxDD2R0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
286ifeq ($(VBOX_LDR_FMT),elf)
287VBoxDD2R0_LIBS += $(VBOX_GCC_LIBGCC)
288endif
289
290
291#
292# Drivers (library)
293#
294ifeq ($(BUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
295Drivers_TEMPLATE = VBOXR3NP
296else
297Drivers_TEMPLATE = VBOXR3
298endif
299Drivers_SDKS.win = WINPSDK W2K3DDK
300Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
301Drivers_DEFS = IN_IDE_R3
302Drivers_INCS = \
303 Network/slirp
304Drivers_SOURCES = \
305 Input/DrvMouseQueue.cpp \
306 Input/DrvKeyboardQueue.cpp \
307 Storage/VBoxHDD.cpp \
308 Storage/DrvBlock.cpp \
309 Storage/VmdkHDD.cpp \
310 Storage/DrvMediaISO.cpp \
311 Storage/DrvRawImage.cpp \
312 Storage/DrvHostBase.cpp \
313 Storage/DrvHostDVD.cpp \
314 Storage/DrvHostFloppy.cpp \
315 PC/DrvACPI.cpp \
316 Network/DrvIntNet.cpp \
317 Network/DrvNetSniffer.cpp \
318 Network/DrvNAT.cpp \
319 Network/slirp/cksum.c \
320 Network/slirp/if.c \
321 Network/slirp/ip_icmp.c \
322 Network/slirp/ip_input.c \
323 Network/slirp/ip_output.c \
324 Network/slirp/slirp.c \
325 Network/slirp/mbuf.c \
326 Network/slirp/misc.c \
327 Network/slirp/sbuf.c \
328 Network/slirp/socket.c \
329 Network/slirp/tcp_input.c \
330 Network/slirp/tcp_output.c \
331 Network/slirp/tcp_subr.c \
332 Network/slirp/tcp_timer.c \
333 Network/slirp/tftp.c \
334 Network/slirp/udp.c \
335 Network/slirp/bootp.c \
336 Network/slirp/debug.c \
337 Audio/audio.c \
338 Audio/mixeng.c \
339 Audio/noaudio.c \
340 Audio/audiosniffer.c
341
342# -- OS specific --
343
344ifeq ($(BUILD_TARGET),darwin)
345Drivers_SOURCES := $(filter-out \
346 Storage/DrvHost% \
347 , $(Drivers_SOURCES))
348Drivers_SOURCES.darwin =
349endif # darwin
350
351ifeq ($(BUILD_TARGET),freebsd)
352Drivers_SOURCES := $(filter-out \
353 Storage/DrvHost% \
354 , $(Drivers_SOURCES))
355Drivers_SOURCES.freebsd =
356endif # freebsd
357
358
359ifeq ($(BUILD_TARGET),l4)
360Drivers_SOURCES = \
361 Input/DrvMouseQueue.cpp \
362 Input/DrvKeyboardQueue.cpp \
363 Storage/VBoxHDD.cpp \
364 Storage/DrvBlock.cpp \
365 Storage/VmdkHDD.cpp \
366 Storage/DrvMediaISO.cpp \
367 Storage/DrvRawImage.cpp \
368 Storage/DrvHostBase.cpp \
369 Storage/DrvHostDVD.cpp \
370 PC/DrvACPI.cpp \
371 Network/DrvIntNet.cpp \
372 Network/DrvNetSniffer.cpp \
373 Audio/audio.c \
374 Audio/mixeng.c \
375 Audio/noaudio.c \
376 Audio/audiosniffer.c
377
378Drivers_SOURCES.l4 = \
379 Network/DrvTAP.cpp \
380 Audio/ossaudio.c
381endif # l4
382
383Drivers_SOURCES.linux = \
384 Network/DrvTAP.cpp \
385 Audio/ossaudio.c
386
387ifeq ($(BUILD_TARGET),os2)
388Drivers_SOURCES := $(filter-out \
389 Storage/DrvHost% \
390 , $(Drivers_SOURCES))
391Drivers_SOURCES.os2 =
392endif
393
394Drivers_SOURCES.win = \
395 Network/DrvTAPWin32.cpp \
396 Audio/dsoundaudio.c
397
398
399# -- features --
400
401ifdef VBOX_WITH_ISCSI
402Drivers_SOURCES += \
403 Storage/DrvISCSI.cpp \
404 Storage/DrvISCSITransportTCP.cpp
405Drivers_DEFS += VBOX_WITH_ISCSI
406endif # VBOX_WITH_ISCSI
407
408ifdef VBOX_WITH_ALSA
409Drivers_DEFS += VBOX_WITH_ALSA
410Drivers_SOURCES.linux += \
411 Audio/alsaaudio.c
412VBoxDD_LIBS.linux += asound
413endif
414
415ifdef VBOX_WITH_USB
416Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
417Drivers_SOURCES += \
418 USB/DrvVUSBRootHub.cpp \
419 USB/VUSBDevice.cpp \
420 USB/VUSBUrb.cpp
421ifdef VBOX_WITH_VRDP
422Drivers_SOURCES += \
423 USB/vrdp/USBProxyDevice-vrdp.cpp
424endif
425
426Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
427Drivers_SOURCES.linux += \
428 USB/USBProxyDevice.cpp \
429 USB/linux/USBProxyDevice-linux.cpp
430
431Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
432Drivers_SOURCES.l4 += \
433 USB/USBProxyDevice.cpp \
434 USB/linux/USBProxyDevice-linux.cpp
435
436Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
437Drivers_SOURCES.win += \
438 USB/USBProxyDevice.cpp \
439 USB/win32/USBProxyDevice-win32.cpp \
440 USB/win32/USBLib-win32.cpp
441endif # VBOX_WITH_USB
442
443
444
445#
446# Ring-0 Services (library, linked into VMMR0.r0)
447#
448ServicesR0_TEMPLATE = VBOXR0
449ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
450ServicesR0_SOURCES = \
451 Network/SrvIntNetR0.cpp
452
453#
454# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
455#
456tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
457tstIntNetR0_DEFS = IN_INTNET_R0
458tstIntNetR0_SOURCES = \
459 Network/testcase/tstIntNetR0.cpp
460tstIntNetR0_LIBS = \
461 $(LIB_RUNTIME)
462
463
464include $(PATH_KBUILD)/footer.kmk
465
466
467# ACPI DSL generation
468$(PATH_TARGET)/vboxaml.hex: PC/vbox.dsl
469 $(call MSG_L1,iasl $<,=> $@)
470 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
471
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