1 | #
|
---|
2 | # VirtualBox Guest Additions Module Makefile.
|
---|
3 | #
|
---|
4 | # (For 2.6.x this file must be 'Makefile'!)
|
---|
5 | #
|
---|
6 | # Copyright (C) 2006-2010 Oracle Corporation
|
---|
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 (GPL) as published by the Free Software
|
---|
12 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | #
|
---|
16 |
|
---|
17 | # Linux kbuild sets this to our source directory if we are called from there
|
---|
18 | obj ?= $(CURDIR)
|
---|
19 | include $(obj)/Makefile.include.header
|
---|
20 |
|
---|
21 | MOD_NAME = vboxvideo
|
---|
22 |
|
---|
23 | MOD_OBJS = HGSMIBase.o HGSMICommon.o HGSMIMemAlloc.o heapoffset.o \
|
---|
24 | Modesetting.o vbox_drv.o vbox_fb.o vbox_main.o vbox_mode.o \
|
---|
25 | vbox_ttm.o VBVABase.o
|
---|
26 |
|
---|
27 | ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxvideo),)
|
---|
28 | MANGLING := $(KBUILD_EXTMOD)/vboxvideo/include/VBox/VBoxGuestMangling.h
|
---|
29 | else
|
---|
30 | MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h
|
---|
31 | endif
|
---|
32 | MOD_CFLAGS = -fshort-wchar -include $(MANGLING)
|
---|
33 | MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include)
|
---|
34 | # What on earth is this?
|
---|
35 | MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxvideo,/ /include)
|
---|
36 | MOD_INCL += -Iinclude/drm
|
---|
37 | MOD_DEFS := -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
|
---|
38 | -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DIN_MODULE \
|
---|
39 | -DIN_GUEST_R0
|
---|
40 | # our module does not export any symbol
|
---|
41 | MOD_DEFS += -DRT_NO_EXPORT_SYMBOL
|
---|
42 | ifeq ($(BUILD_TARGET_ARCH),amd64)
|
---|
43 | MOD_DEFS += -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS
|
---|
44 | else
|
---|
45 | MOD_DEFS += -DRT_ARCH_X86
|
---|
46 | endif
|
---|
47 | MOD_CLEAN = . linux r0drv r0drv/linux
|
---|
48 |
|
---|
49 | include $(obj)/Makefile.include.footer
|
---|