VirtualBox

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

Last change on this file since 39252 was 39252, checked in by vboxsync, 13 years ago

NOINST -> INSTTYPE=none; adding DEBUG_INSTTYPE=both if the NOINST was because of code signing. This will make the .PDBs be installed into stage/debug/ for signed drivers (i.e. with .INF files).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1# $Id: Makefile.kmk 39252 2011-11-09 14:00:21Z vboxsync $
2## @file
3# Sub-Makefile for the vboxvideo DRM module (linux kernel OpenGL module).
4#
5
6#
7# Copyright (C) 2006-2011 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
21#
22# Populate FILES_VBOXVIDEO_DRM_NOBIN
23#
24INSTALLS += vboxvideo_drm-mod
25if !defined(VBOX_WITH_GUEST_KMS_DRIVER)
26 include $(PATH_SUB_CURRENT)/files_vboxvideo_drm
27else
28 include $(PATH_SUB_CURRENT)/files_vboxvideo_drv
29endif
30vboxvideo_drm-mod_INST = $(INST_ADDITIONS)src/vboxvideo/
31vboxvideo_drm-mod_SOURCES = \
32 $(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_NOBIN))
33vboxvideo_drm-mod_EXEC_SOURCES = \
34 $(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_BIN)) \
35 $(vboxvideo_drm-mod_0_OUTDIR)/build_in_tmp \
36 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
37vboxvideo_drm-mod_CLEAN += $(vboxvideo_drm-mod_0_OUTDIR)/build_in_tmp
38
39# Script needed for building the kernel module.
40$$(vboxvideo_drm-mod_0_OUTDIR)/build_in_tmp: \
41 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
42 $(VBOX_VERSION_STAMP) \
43 | $$(dir $$@)
44 $(call MSG_TOOL,Creating,,$@)
45 $(QUIET)$(RM) -f -- $@
46 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxvideo;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" \
47 --output=$@ $<
48 $(QUIET)$(CHMOD) 0755 $@
49
50
51#
52# The kernel module.
53#
54# Note! Syntax checking only. Don't bother if drmP.h is missing (introduced
55# in 2.6.27).
56# Note! The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels.
57#
58if defined(VBOX_WITH_ADDITION_DRIVERS) \
59 && "$(strip $(foreach inc,$(VBOX_LINUX_INCS),$(wildcard $(inc)/drm/drmP.h)))" != ""
60 SYSMODS += vboxvideo_drm
61 vboxvideo_drm_TEMPLATE = VBOXGUESTR0
62 vboxvideo_drm_CFLAGS = -fshort-wchar
63 vboxvideo_drm_DEFS = \
64 MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
65 KBUILD_MODNAME=KBUILD_STR\(vboxvideo\) \
66 KBUILD_BASENAME=KBUILD_STR\(vboxvideo\) \
67 DEBUG_HASH=2 DEBUG_HASH2=3
68 # detect fc6 2.6.18
69 vboxvideo_drm_DEFS += \
70 $(foreach inc,$(VBOX_LINUX_INCS),\
71 $(if $(wildcard $(inc)/linux/utsrelease.h),\
72 $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
73 then echo yes; fi),KERNEL_FC6,),))
74 # detect rhel5 2.6.18
75 vboxvideo_drm_DEFS += \
76 $(foreach inc,$(VBOX_LINUX_INCS),\
77 $(if $(wildcard $(inc)/linux/utsrelease.h),\
78 $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
79 then echo yes; fi),KERNEL_FC6,),))
80 if !defined(VBOX_WITH_GUEST_KMS_DRIVER)
81 vboxvideo_drm_SOURCES = vboxvideo_drm.c
82 else
83 vboxvideo_drm_SOURCES = \
84 ../../common/VBoxVideo/Modesetting.cpp \
85 vboxvideo_device.c \
86 vboxvideo_display.c \
87 vboxvideo_drv.c \
88 vboxvideo_kms.c
89 endif
90
91endif
92
93include $(KBUILD_PATH)/subfooter.kmk
94
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