VirtualBox

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

Last change on this file since 18703 was 17415, checked in by vboxsync, 16 years ago

simplified check

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1# $Id: Makefile.kmk 17415 2009-03-05 16:22:25Z vboxsync $
2## @file
3# Sub-Makefile for the vboxvideo DRM module (linux kernel OpenGL module).
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25INSTALLS += vboxvideo_drm-mod vboxvideo_drm-sh
26ifdef VBOX_WITH_ADDITION_DRIVERS
27# Only do a test build on kernels as of 2.6.27
28 SYSMODS += $(if $(strip $(foreach inc,$(VBOX_LINUX_INCS),\
29 $(wildcard $(inc)/drm/drmP.h))),vboxvideo_drm,)
30endif
31
32#
33# Populate FILES_VBOXVIDEO_DRM_NOBIN
34#
35include $(PATH_SUB_CURRENT)/files_vboxvideo_drm
36
37vboxvideo_drm-mod_INST = $(INST_ADDITIONS)src/vboxvideo_drm/
38vboxvideo_drm-mod_MODE = a+r,u+w
39vboxvideo_drm-mod_SOURCES = $(subst ",,$(FILES_VBOXVIDEO_DRM_NOBIN))
40vboxvideo_drm-mod_SOURCES += $(if $(VBOX_OSE),,\
41 $(PATH_vboxvideo_drm-mod)/dkms.conf)
42vboxvideo_drm-mod_CLEAN += $(PATH_vboxvideo_drm-mod)/dkms.conf
43
44vboxvideo_drm-sh_INST = $(INST_ADDITIONS)src/vboxvideo_drm/
45vboxvideo_drm-sh_MODE = a+rx,u+w
46vboxvideo_drm-sh_SOURCES = $(subst ",,$(FILES_VBOXVIDEO_DRM_BIN))
47vboxvideo_drm-sh_SOURCES += \
48 $(PATH_vboxvideo_drm-sh)/build_in_tmp \
49 $(if $(VBOX_OSE),,\
50 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
51vboxvideo_drm-sh_CLEAN += $(PATH_vboxvideo_drm-sh)/build_in_tmp
52
53
54#
55# The module (for syntax checking).
56#
57vboxvideo_drm_TEMPLATE = VBOXGUESTR0
58vboxvideo_drm_NOINST = 1
59vboxvideo_drm_CFLAGS = -fshort-wchar
60vboxvideo_drm_DEFS = \
61 MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
62 KBUILD_MODNAME=KBUILD_STR\(vboxvideo\) \
63 KBUILD_BASENAME=KBUILD_STR\(vboxvideo\)
64vboxvideo_drm_SOURCES = vboxvideo_drm.c
65
66# detect fc6 2.6.18
67vboxvideo_drm_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
68 $(if $(wildcard $(inc)/linux/utsrelease.h),\
69 $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
70 then echo yes; fi),KERNEL_FC6,),))
71# detect rhel5 2.6.18
72vboxvideo_drm_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
73 $(if $(wildcard $(inc)/linux/utsrelease.h),\
74 $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
75 then echo yes; fi),KERNEL_FC6,),))
76
77
78## Scripts needed for building kernel modules
79
80$$(PATH_vboxvideo_drm-sh)/build_in_tmp: \
81 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
82 $(VBOX_VERSION_STAMP) \
83 | $$(dir $$@)
84 $(call MSG_TOOL,Creating,,$@)
85 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxvideo;g" < $< > $@
86 $(QUIET)chmod 0755 $@
87
88$$(PATH_vboxvideo_drm-mod)/dkms.conf: \
89 $(PATH_SUB_CURRENT)/dkms.conf \
90 $(VBOX_VERSION_STAMP) \
91 | $$(dir $$@)
92 $(call MSG_TOOL,Creating,,$@)
93 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
94
95include $(KBUILD_PATH)/subfooter.kmk
96
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