~ubuntu-branches/ubuntu/gutsy/linux-ubuntu-modules-2.6.22/gutsy

« back to all changes in this revision

Viewing changes to ubuntu/vmblock/Makefile.kernel

  • Committer: Bazaar Package Importer
  • Author(s): Kyle McMartin, Kyle McMartin, Soren Hansen
  • Date: 2007-10-09 01:39:47 UTC
  • Revision ID: james.westby@ubuntu.com-20071009013947-areevea06oz7cgl6
Tags: 2.6.22-14.35
[Kyle McMartin]

* update heci to 3.1.0.31

[Soren Hansen]

* Include modules from vmware tools and enable them for -virtual only

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
#############################################################
 
3
# Copyright 2006 VMware, Inc.  All rights reserved. 
 
4
#############################################################
 
5
####
 
6
#### This program is free software; you can redistribute it and/or modify it
 
7
#### under the terms of the GNU General Public License as published by the
 
8
#### Free Software Foundation version 2 and no later version.
 
9
####
 
10
#### This program is distributed in the hope that it will be useful, but
 
11
#### WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
12
#### or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
13
#### for more details.
 
14
####
 
15
#### You should have received a copy of the GNU General Public License along
 
16
#### with this program; if not, write to the Free Software Foundation, Inc.,
 
17
#### 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
18
 
 
19
####
 
20
####  VMware vmblock Makefile to be distributed externally
 
21
####
 
22
####
 
23
 
 
24
vm_check_build = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \
 
25
        $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
 
26
        -DKBUILD_BASENAME=\"$(DRIVER)\" \
 
27
        -Werror -S -o /dev/null -xc $(1) \
 
28
        > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)
 
29
 
 
30
CC_WARNINGS := -Wall -Wstrict-prototypes
 
31
 
 
32
CC_OPTS := $(GLOBAL_DEFS) $(CC_WARNINGS)
 
33
 
 
34
CC_OPTS += -DVMW_USING_KBUILD
 
35
 
 
36
ifdef VMX86_DEVEL
 
37
CC_OPTS += -DVMX86_DEVEL
 
38
endif
 
39
ifdef VMX86_DEBUG
 
40
CC_OPTS += -DVMX86_DEBUG
 
41
endif
 
42
 
 
43
INCLUDE := -I$(SRCROOT)/include
 
44
 
 
45
EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
 
46
 
 
47
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
 
48
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c,   -DVMW_HAVE_EPOLL, )
 
49
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c,   -DVMW_SKAS_MMAP, )
 
50
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, )
 
51
 
 
52
# Note: These tests are inverted.
 
53
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/getsb1.c, ,   -DVMW_GETSB_2618)
 
54
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/statfs1.c, ,  -DVMW_STATFS_2618)
 
55
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/filldir1.c, , -DVMW_FILLDIR_2618)
 
56
 
 
57
obj-m += $(DRIVER).o
 
58
 
 
59
$(DRIVER)-y := $(subst $(SRCROOT)/, , $(patsubst %.c, %.o, $(wildcard $(SRCROOT)/linux/*.c)))
 
60
 
 
61
clean:
 
62
        rm -rf $(wildcard $(DRIVER).mod.c $(DRIVER).ko .tmp_versions \
 
63
        Module.symvers Modules.symvers \
 
64
        $(foreach dir,./ linux/,$(addprefix $(dir),.*.cmd .*.o.flags *.o)))