VirtualBox

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

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

Realigned pcnet. Added the alignment testcase to the makefile walk.

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