VirtualBox

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

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

VBOX_WITH_INTERNAL_NETWORKING. disabled for L4 and Darwin.

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