VirtualBox

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

Last change on this file since 28283 was 26336, checked in by vboxsync, 15 years ago

Installers/linux: enable debug builds of the Linux installers again

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1# $Id: Makefile.kmk 26336 2010-02-08 22:30:14Z 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/
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/
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# The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels
57#
58vboxvideo_drm_TEMPLATE = VBOXGUESTR0
59vboxvideo_drm_NOINST = 1
60vboxvideo_drm_CFLAGS = -fshort-wchar
61vboxvideo_drm_DEFS = \
62 MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
63 KBUILD_MODNAME=KBUILD_STR\(vboxvideo\) \
64 KBUILD_BASENAME=KBUILD_STR\(vboxvideo\) \
65 DEBUG_HASH=2 DEBUG_HASH2=3
66vboxvideo_drm_SOURCES = vboxvideo_drm.c
67
68# detect fc6 2.6.18
69vboxvideo_drm_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
70 $(if $(wildcard $(inc)/linux/utsrelease.h),\
71 $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
72 then echo yes; fi),KERNEL_FC6,),))
73# detect rhel5 2.6.18
74vboxvideo_drm_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
75 $(if $(wildcard $(inc)/linux/utsrelease.h),\
76 $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
77 then echo yes; fi),KERNEL_FC6,),))
78
79
80## Scripts needed for building kernel modules
81
82$$(PATH_vboxvideo_drm-sh)/build_in_tmp: \
83 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
84 $(VBOX_VERSION_STAMP) \
85 | $$(dir $$@)
86 $(call MSG_TOOL,Creating,,$@)
87 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxvideo;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" < $< > $@
88 $(QUIET)chmod 0755 $@
89
90$$(PATH_vboxvideo_drm-mod)/dkms.conf: \
91 $(PATH_SUB_CURRENT)/dkms.conf \
92 $(VBOX_VERSION_STAMP) \
93 | $$(dir $$@)
94 $(call MSG_TOOL,Creating,,$@)
95 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
96
97include $(KBUILD_PATH)/subfooter.kmk
98
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette