1 | # $Id: Makefile.module 58129 2015-10-08 22:29:48Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # VirtualBox Guest Additions Module Makefile.
|
---|
4 | #
|
---|
5 | # (For 2.6.x this file must be 'Makefile'!)
|
---|
6 | #
|
---|
7 |
|
---|
8 | #
|
---|
9 | # Copyright (C) 2006-2011 Oracle Corporation
|
---|
10 | #
|
---|
11 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | # available from http://www.virtualbox.org. This file is free software;
|
---|
13 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | # General Public License (GPL) as published by the Free Software
|
---|
15 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 | #
|
---|
19 |
|
---|
20 | # Linux kbuild sets this to our source directory if we are called from there
|
---|
21 | obj ?= $(CURDIR)
|
---|
22 | include $(obj)/Makefile.include.header
|
---|
23 |
|
---|
24 | MOD_NAME = vboxvideo
|
---|
25 |
|
---|
26 | MOD_OBJS = vboxvideo_drm.o
|
---|
27 |
|
---|
28 | ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxvideo),)
|
---|
29 | MANGLING := $(KBUILD_EXTMOD)/vboxvideo/include/VBox/VBoxGuestMangling.h
|
---|
30 | else
|
---|
31 | MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h
|
---|
32 | endif
|
---|
33 | MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -include $(MANGLING)
|
---|
34 | MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
|
---|
35 | # What on earth is this?
|
---|
36 | MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxvideo,/ /include /r0drv/linux)
|
---|
37 | # Enterprise Linux 6.5 does not include the drm user API headers with the kernel
|
---|
38 | # headers.
|
---|
39 | MOD_INCL += $(foreach inc,$(KERN_INCL) include,\
|
---|
40 | $(if $(wildcard $(inc)/linux/utsrelease.h),\
|
---|
41 | $(if $(shell grep '"2.6.32.*el6.*"' $(inc)/linux/utsrelease.h),\
|
---|
42 | -I/usr/include,),))
|
---|
43 | MOD_DEFS := -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
|
---|
44 | -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DIN_MODULE \
|
---|
45 | -DIN_GUEST_R0
|
---|
46 | # our module does not export any symbol
|
---|
47 | MOD_DEFS += -DRT_NO_EXPORT_SYMBOL
|
---|
48 | ifeq ($(BUILD_TARGET_ARCH),amd64)
|
---|
49 | MOD_DEFS += -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS
|
---|
50 | else
|
---|
51 | MOD_DEFS += -DRT_ARCH_X86
|
---|
52 | endif
|
---|
53 | MOD_CLEAN = . linux r0drv r0drv/linux
|
---|
54 |
|
---|
55 | include $(obj)/Makefile.include.footer
|
---|
56 |
|
---|