~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to tools/vnet/vnet-module/Makefile.ver

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- mode: Makefile; -*-
 
2
#============================================================================
 
3
#
 
4
# Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
 
5
#
 
6
# This program is free software; you can redistribute it and/or modify
 
7
# it under the terms of the GNU General Public License as published by the
 
8
# Free Software Foundation; either version 2 of the License, or (at your
 
9
# option) any later version.
 
10
#
 
11
# This program is distributed in the hope that it will be useful, but
 
12
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
13
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 
14
# for more details.
 
15
#
 
16
# You should have received a copy of the GNU General Public License along
 
17
# with this program; if not, write to the Free software Foundation, Inc.,
 
18
# 59 Temple Place, suite 330, Boston, MA 02111-1307 USA
 
19
#============================================================================
 
20
 
 
21
LINUX_SERIES?=2.6
 
22
 
 
23
LINUX_VERSION?=$(shell (/bin/ls -d $(XEN_ROOT)/linux-$(LINUX_SERIES).* 2>/dev/null) | \
 
24
                      sed -e 's!^.*linux-\(.\+\).hg!\1!' )
 
25
 
 
26
ifeq ($(LINUX_VERSION),)
 
27
$(error Kernel source for linux $(LINUX_SERIES) not found)
 
28
endif
 
29
 
 
30
KERNEL_VERSION?=$(shell (/bin/ls -d $(XEN_ROOT)/build-linux-$(LINUX_VERSION)* 2>/dev/null) | \
 
31
                      grep -v -m 1 -e '-xenU' | \
 
32
                      sed -e 's!^.*linux-\(.\+\)!\1!' )
 
33
 
 
34
KERNEL_SRC ?= $(XEN_ROOT)/build-linux-$(KERNEL_VERSION)
 
35
 
 
36
ifeq ($(KERNEL_SRC),)
 
37
$(error Kernel source for kernel $(KERNEL_VERSION) not found)
 
38
endif
 
39
 
 
40
# Get the full kernel release version from its makefile, as the source path
 
41
# may not have the extraversion, e.g. linux-2.6.12-xen0 may contain release 
 
42
# 2.6.12.6-xen0.
 
43
KERNEL_RELEASE=$(shell make -s -C $(KERNEL_SRC) kernelrelease)
 
44
 
 
45
KERNEL_MODULE_DIR=/lib/modules/$(KERNEL_RELEASE)/kernel
 
46
 
 
47
$(warning KERNEL_SRC            $(KERNEL_SRC))
 
48
$(warning LINUX_VERSION         $(LINUX_VERSION))
 
49
$(warning KERNEL_VERSION        $(KERNEL_VERSION))
 
50
$(warning KERNEL_RELEASE        $(KERNEL_RELEASE))
 
51
$(warning KERNEL_MODULE_DIR     $(KERNEL_MODULE_DIR))