VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/drm/Makefile.kmk@ 38093

Last change on this file since 38093 was 35380, checked in by vboxsync, 14 years ago

Makefiles: The PATH_<target> variable is deprated, use <target>_0_OUTDIR instead.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1# $Id: Makefile.kmk 35380 2010-12-30 16:06:17Z vboxsync $
2## @file
3# Sub-Makefile for the vboxvideo DRM module (linux kernel OpenGL module).
4#
5
6#
7# Copyright (C) 2006-2010 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21INSTALLS += vboxvideo_drm-mod vboxvideo_drm-sh
22ifdef VBOX_WITH_ADDITION_DRIVERS
23# Only do a test build on kernels as of 2.6.27
24 SYSMODS += $(if $(strip $(foreach inc,$(VBOX_LINUX_INCS),\
25 $(wildcard $(inc)/drm/drmP.h))),vboxvideo_drm,)
26endif
27
28#
29# Populate FILES_VBOXVIDEO_DRM_NOBIN
30#
31include $(PATH_SUB_CURRENT)/files_vboxvideo_drm
32
33vboxvideo_drm-mod_INST = $(INST_ADDITIONS)src/vboxvideo/
34vboxvideo_drm-mod_MODE = a+r,u+w
35vboxvideo_drm-mod_SOURCES = $(subst ",,$(FILES_VBOXVIDEO_DRM_NOBIN))
36
37vboxvideo_drm-sh_INST = $(INST_ADDITIONS)src/vboxvideo/
38vboxvideo_drm-sh_MODE = a+rx,u+w
39vboxvideo_drm-sh_SOURCES = $(subst ",,$(FILES_VBOXVIDEO_DRM_BIN))
40vboxvideo_drm-sh_SOURCES += \
41 $(vboxvideo_drm-sh_0_OUTDIR)/build_in_tmp \
42 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
43vboxvideo_drm-sh_CLEAN += $(vboxvideo_drm-sh_0_OUTDIR)/build_in_tmp
44
45
46#
47# The module (for syntax checking).
48# The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels
49#
50vboxvideo_drm_TEMPLATE = VBOXGUESTR0
51vboxvideo_drm_NOINST = 1
52vboxvideo_drm_CFLAGS = -fshort-wchar
53vboxvideo_drm_DEFS = \
54 MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
55 KBUILD_MODNAME=KBUILD_STR\(vboxvideo\) \
56 KBUILD_BASENAME=KBUILD_STR\(vboxvideo\) \
57 DEBUG_HASH=2 DEBUG_HASH2=3
58vboxvideo_drm_SOURCES = vboxvideo_drm.c
59
60# detect fc6 2.6.18
61vboxvideo_drm_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
62 $(if $(wildcard $(inc)/linux/utsrelease.h),\
63 $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
64 then echo yes; fi),KERNEL_FC6,),))
65# detect rhel5 2.6.18
66vboxvideo_drm_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
67 $(if $(wildcard $(inc)/linux/utsrelease.h),\
68 $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
69 then echo yes; fi),KERNEL_FC6,),))
70
71
72## Scripts needed for building kernel modules
73
74$$(vboxvideo_drm-sh_0_OUTDIR)/build_in_tmp: \
75 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
76 $(VBOX_VERSION_STAMP) \
77 | $$(dir $$@)
78 $(call MSG_TOOL,Creating,,$@)
79 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxvideo;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" < $< > $@
80 $(QUIET)chmod 0755 $@
81
82include $(KBUILD_PATH)/subfooter.kmk
83
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