VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/drm/Makefile.module.kms@ 60617

Last change on this file since 60617 was 60617, checked in by vboxsync, 9 years ago

Additions/linux/drm: handle KERNELRELEASE / KERNELVERSION on newer kernels

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1# $Id: Makefile.module.kms 60617 2016-04-21 09:07:38Z 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-2010 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
21obj ?= $(CURDIR)
22include $(obj)/Makefile.include.header
23
24MOD_NAME = vboxvideo
25
26MY_KERNELRELEASE := $(KERNELRELEASE)
27ifeq ($(MY_KERNELRELEASE),)
28 # as of 2.6.16 KERNELRELEASE is only set if the kernel is configured
29 MY_KERNELRELEASE := $(KERNELVERSION)
30endif
31ifeq ($(filter 1.% 2.% 3.0.% 3.1.% 3.2.% 3.3.% 3.4.% 3.5.% 3.6.% 3.7.% \
323.8.% 3.9.% 3.10.%,$(MY_KERNELRELEASE)),)
33MOD_OBJS = HGSMIBase.o HGSMICommon.o HGSMIMemAlloc.o heapoffset.o \
34 Modesetting.o vbox_drv.o vbox_fb.o vbox_irq.o vbox_main.o \
35 vbox_mode.o vbox_ttm.o VBVABase.o
36else
37MOD_OBJS = vbox_dummy.o
38endif
39
40ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxvideo),)
41 MANGLING := $(KBUILD_EXTMOD)/vboxvideo/include/VBox/VBoxGuestMangling.h
42else
43 MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h
44endif
45MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -include $(MANGLING)
46MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include)
47# What on earth is this?
48MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxvideo,/ /include)
49MOD_INCL += -Iinclude/drm
50MOD_DEFS := -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
51 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DIN_MODULE \
52 -DIN_GUEST_R0
53# our module does not export any symbol
54MOD_DEFS += -DRT_NO_EXPORT_SYMBOL
55ifeq ($(BUILD_TARGET_ARCH),amd64)
56 MOD_DEFS += -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS
57else
58 MOD_DEFS += -DRT_ARCH_X86
59endif
60MOD_CLEAN = . linux r0drv r0drv/linux
61
62include $(obj)/Makefile.include.footer
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