VirtualBox

Ignore:
Timestamp:
Jul 27, 2011 9:55:19 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73158
Message:

Additions/linux|x11/*kmk: some cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/Makefile.kmk

    r35380 r38194  
    55
    66#
    7 # Copyright (C) 2006-2010 Oracle Corporation
     7# Copyright (C) 2006-2011 Oracle Corporation
    88#
    99# This file is part of VirtualBox Open Source Edition (OSE), as
     
    1919include $(KBUILD_PATH)/subheader.kmk
    2020
    21 INSTALLS += vboxvideo_drm-mod vboxvideo_drm-sh
    22 ifdef 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,)
    26 endif
    27 
    2821#
    2922# Populate FILES_VBOXVIDEO_DRM_NOBIN
    3023#
     24INSTALLS += vboxvideo_drm-mod
    3125include $(PATH_SUB_CURRENT)/files_vboxvideo_drm
     26vboxvideo_drm-mod_INST         = $(INST_ADDITIONS)src/vboxvideo/
     27vboxvideo_drm-mod_SOURCES      = \
     28        $(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_NOBIN))
     29vboxvideo_drm-mod_EXEC_SOURCES = \
     30        $(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_BIN)) \
     31        $(vboxvideo_drm-mod_0_OUTDIR)/build_in_tmp \
     32        $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
     33vboxvideo_drm-mod_CLEAN       += $(vboxvideo_drm-mod_0_OUTDIR)/build_in_tmp
    3234
    33 vboxvideo_drm-mod_INST        = $(INST_ADDITIONS)src/vboxvideo/
    34 vboxvideo_drm-mod_MODE        = a+r,u+w
    35 vboxvideo_drm-mod_SOURCES     = $(subst ",,$(FILES_VBOXVIDEO_DRM_NOBIN))
    36 
    37 vboxvideo_drm-sh_INST        = $(INST_ADDITIONS)src/vboxvideo/
    38 vboxvideo_drm-sh_MODE        = a+rx,u+w
    39 vboxvideo_drm-sh_SOURCES     = $(subst ",,$(FILES_VBOXVIDEO_DRM_BIN))
    40 vboxvideo_drm-sh_SOURCES    += \
    41         $(vboxvideo_drm-sh_0_OUTDIR)/build_in_tmp \
    42         $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
    43 vboxvideo_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 #
    50 vboxvideo_drm_TEMPLATE        = VBOXGUESTR0
    51 vboxvideo_drm_NOINST          = 1
    52 vboxvideo_drm_CFLAGS          = -fshort-wchar
    53 vboxvideo_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
    58 vboxvideo_drm_SOURCES         = vboxvideo_drm.c
    59 
    60 # detect fc6 2.6.18
    61 vboxvideo_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
    66 vboxvideo_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: \
     35# Script needed for building the kernel module.
     36$$(vboxvideo_drm-mod_0_OUTDIR)/build_in_tmp: \
    7537                $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
    7638                $(VBOX_VERSION_STAMP) \
    7739                | $$(dir $$@)
    7840        $(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 $@
     41        $(QUIET)$(RM) -f -- $@
     42        $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxvideo;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" \
     43                --output=$@ $<
     44        $(QUIET)$(CHMOD) 0755 $@
     45
     46
     47#
     48# The kernel module.
     49#
     50# Note! Syntax checking only.  Don't bother if drmP.h is missing (introduced
     51#       in 2.6.27).
     52# Note! The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels.
     53#
     54if defined(VBOX_WITH_ADDITION_DRIVERS) \
     55  && "$(strip $(foreach inc,$(VBOX_LINUX_INCS),$(wildcard $(inc)/drm/drmP.h)))" != ""
     56 SYSMODS += vboxvideo_drm
     57 vboxvideo_drm_TEMPLATE        = VBOXGUESTR0
     58 vboxvideo_drm_NOINST          = 1
     59 vboxvideo_drm_CFLAGS          = -fshort-wchar
     60 vboxvideo_drm_DEFS            = \
     61        MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
     62        KBUILD_MODNAME=KBUILD_STR\(vboxvideo\) \
     63        KBUILD_BASENAME=KBUILD_STR\(vboxvideo\) \
     64        DEBUG_HASH=2 DEBUG_HASH2=3
     65 # detect fc6 2.6.18
     66 vboxvideo_drm_DEFS           += \
     67        $(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
     72 vboxvideo_drm_DEFS           += \
     73        $(foreach inc,$(VBOX_LINUX_INCS),\
     74                $(if $(wildcard $(inc)/linux/utsrelease.h),\
     75                 $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
     76                               then echo yes; fi),KERNEL_FC6,),))
     77 vboxvideo_drm_SOURCES         = vboxvideo_drm.c
     78
     79endif
    8180
    8281include $(KBUILD_PATH)/subfooter.kmk
Note: See TracChangeset for help on using the changeset viewer.

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