VirtualBox

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

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

disabled compilation of ne2000, we don't use it since ages (since disabled in ConsoleImpl.cpp)

  • 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_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/DrvMediaISO.cpp \
310 Storage/DrvRawImage.cpp \
311 Storage/DrvHostBase.cpp \
312 Storage/DrvHostDVD.cpp \
313 Storage/DrvHostFloppy.cpp \
314 PC/DrvACPI.cpp \
315 Network/DrvIntNet.cpp \
316 Network/DrvNetSniffer.cpp \
317 Network/DrvNAT.cpp \
318 Network/slirp/cksum.c \
319 Network/slirp/if.c \
320 Network/slirp/ip_icmp.c \
321 Network/slirp/ip_input.c \
322 Network/slirp/ip_output.c \
323 Network/slirp/slirp.c \
324 Network/slirp/mbuf.c \
325 Network/slirp/misc.c \
326 Network/slirp/sbuf.c \
327 Network/slirp/socket.c \
328 Network/slirp/tcp_input.c \
329 Network/slirp/tcp_output.c \
330 Network/slirp/tcp_subr.c \
331 Network/slirp/tcp_timer.c \
332 Network/slirp/tftp.c \
333 Network/slirp/udp.c \
334 Network/slirp/bootp.c \
335 Network/slirp/debug.c \
336 Audio/audio.c \
337 Audio/mixeng.c \
338 Audio/noaudio.c \
339 Audio/audiosniffer.c
340
341# -- OS specific --
342
343ifeq ($(BUILD_TARGET),darwin)
344Drivers_SOURCES := $(filter-out \
345 Storage/DrvHost% \
346 , $(Drivers_SOURCES))
347Drivers_SOURCES.darwin =
348endif # darwin
349
350
351ifeq ($(BUILD_TARGET),l4)
352Drivers_SOURCES = \
353 Input/DrvMouseQueue.cpp \
354 Input/DrvKeyboardQueue.cpp \
355 Storage/VBoxHDD.cpp \
356 Storage/DrvBlock.cpp \
357 Storage/DrvMediaISO.cpp \
358 Storage/DrvRawImage.cpp \
359 Storage/DrvHostBase.cpp \
360 Storage/DrvHostDVD.cpp \
361 PC/DrvACPI.cpp \
362 Network/DrvIntNet.cpp \
363 Network/DrvNetSniffer.cpp \
364 Audio/audio.c \
365 Audio/mixeng.c \
366 Audio/noaudio.c \
367 Audio/audiosniffer.c
368
369Drivers_SOURCES.l4 = \
370 Network/DrvTAP.cpp \
371 Audio/ossaudio.c
372endif # l4
373
374Drivers_SOURCES.linux = \
375 Network/DrvTAP.cpp \
376 Audio/ossaudio.c
377
378ifeq ($(BUILD_TARGET),os2)
379Drivers_SOURCES := $(filter-out \
380 Storage/DrvHost% \
381 , $(Drivers_SOURCES))
382Drivers_SOURCES.os2 =
383endif
384
385Drivers_SOURCES.win = \
386 Network/DrvTAPWin32.cpp \
387 Audio/dsoundaudio.c
388
389
390# -- features --
391
392ifdef VBOX_WITH_ISCSI
393Drivers_SOURCES += \
394 Storage/DrvISCSI.cpp \
395 Storage/DrvISCSITransportTCP.cpp
396Drivers_DEFS += VBOX_WITH_ISCSI
397endif # VBOX_WITH_ISCSI
398
399ifdef VBOX_WITH_ALSA
400Drivers_DEFS += VBOX_WITH_ALSA
401Drivers_SOURCES.linux += \
402 Audio/alsaaudio.c
403VBoxDD_LIBS.linux += asound
404endif
405
406ifdef VBOX_WITH_USB
407Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
408Drivers_SOURCES += \
409 USB/DrvVUSBRootHub.cpp \
410 USB/VUSBDevice.cpp \
411 USB/VUSBUrb.cpp
412ifdef VBOX_WITH_VRDP
413Drivers_SOURCES += \
414 USB/vrdp/USBProxyDevice-vrdp.cpp
415endif
416
417Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
418Drivers_SOURCES.linux += \
419 USB/USBProxyDevice.cpp \
420 USB/linux/USBProxyDevice-linux.cpp
421
422Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
423Drivers_SOURCES.l4 += \
424 USB/USBProxyDevice.cpp \
425 USB/linux/USBProxyDevice-linux.cpp
426
427Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
428Drivers_SOURCES.win += \
429 USB/USBProxyDevice.cpp \
430 USB/win32/USBProxyDevice-win32.cpp \
431 USB/win32/USBLib-win32.cpp
432endif # VBOX_WITH_USB
433
434
435
436#
437# Ring-0 Services (library, linked into VMMR0.r0)
438#
439ServicesR0_TEMPLATE = VBOXR0
440ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
441ServicesR0_SOURCES = \
442 Network/SrvIntNetR0.cpp
443
444#
445# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
446#
447tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
448tstIntNetR0_DEFS = IN_INTNET_R0
449tstIntNetR0_SOURCES = \
450 Network/testcase/tstIntNetR0.cpp
451tstIntNetR0_LIBS = \
452 $(LIB_RUNTIME)
453
454
455include $(PATH_KBUILD)/footer.kmk
456
457
458# ACPI DSL generation
459$(PATH_TARGET)/vboxaml.hex: PC/vbox.dsl
460 $(call MSG_L1,iasl $<,=> $@)
461 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
462
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