~n-muench/ubuntu/precise/open-vm-tools/open-vm-tools.raring-precise.backport

« back to all changes in this revision

Viewing changes to .pc/01-kvers.patch/modules/linux/vsock/Makefile

  • Committer: Package Import Robot
  • Author(s): Nate Muench
  • Date: 2012-01-23 16:09:45 UTC
  • mfrom: (1.4.6) (2.4.26 sid)
  • Revision ID: package-import@ubuntu.com-20120123160945-b6s0r1vkcovucpf3
Tags: 2011.12.20-562307-0ubuntu1
* Merge latest upstream git tag. Fixes building on Precise
  (LP: #898289, LP: #905612)

* Items merged from Debian unstable:
  - debian/control:
    + open-vm-tools recommends open-vm-dkms. (LP: #598933)
    + open-vm-tools now suggests open-vm-toolbox. (LP: #604998)
  (From 2011.08.21-471295-1 release)
  - Updating maintainer and uploaders fields.
  - Removing vcs fields.
  - Removing references to Daniel's old email address.
  - Updating years in copyright file.
  - Updating to standards version 3.9.2.
  - Updating to debhelper version 8.
  - Switching to source format 3.0 (quilt).
  - Removing manual chrpath setting.
  - Removing exclusion from plugins from debhelper shlibs.
  - Rediffing kvers.patch.
  (From 2011.09.23-491607-1 release)
  - Marking binary architecture-dependend packages as linux and kfreebsd
  only.
  - Removing liburiparser-dev from build-depends as upstream dropped
  unity support.
  - Building with libproc-dev on amd64 again.
  - Dropping disabling of dnet support.
  (From 2011.09.23-491607-2 release)
  - Adding doxygen to build-depends for api documentation.
  - Adding libcunit1-dev to build-depends for test suites.
  - Minimizing rules file.
  - Adding open-vm-tools-dev package, containing only the api
    documentation for now.
  (From 2011.09.23-491607-3 release)
  - Sorting overrides in rules alphabetically.
  - Compacting copyright file.
  - Adding udev rule to set timeout for vmware scsi devices
  (From 2011.12.20-562307-1 release)
  - Adding patch to correct typo in upstreams dkms configuration

* Remaining Changes:
  - Remove Stable part of version numbering.
  - debian folder:
    + Re-added open-vm-dkms.postinst & open-vm-dkms.prerm.
      * Allows dkms modules to compile upon installation.
  - debian/control:
    + Re-add open-vm-source and make into a transitional package
      for open-vm-toolbox.
    + Return dependancies that were moved to open-vm-tools back to
      open-vm-toolbox.
  - debian/rules and debian/open-vm-toolbox.lintian-overrides:
    + Make vmware-user-suid-wrapper suid-root
  - debian/rules:
    + Added CFLAGS field with -Wno-deprecated-declarations
      * Will suppress issues with glib 2.31 or later.
    + Add line to copy vmware-xdg-detect-de into place.
    + Install vmware-user.desktop through toolbox package.
  - debian/open-vm-tools.init:
    + Re-add 'modprobe [-r] vmblock'.
    + Add 'modprobe [-r] vmxnet'.
      * Incase it's not loaded during boot.
    + Remove and re-add pcnet32 module
      * Will be done before (remove) and after (readd) vmxnet module
        is added.
      * If vmxnet doesn't exist (aka modules fail to build), pcnet32 can be
        still used for network connectivity.
      * Workaround until a better fix can be done.
  - Re-add gnome-session to debian/local/xautostart.conf
  - Manpages removed (from debian/manpages):
    + vmmemctl.9
    + vmxnet3.9
    + Remove references to manpages that have been removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
##########################################################
 
3
# Copyright (C) 1998 VMware, Inc. All rights reserved.
 
4
#
 
5
# This program is free software; you can redistribute it and/or modify it
 
6
# under the terms of the GNU General Public License as published by the
 
7
# Free Software Foundation version 2 and no later version.
 
8
#
 
9
# This program is distributed in the hope that it will be useful, but
 
10
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
11
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
12
# for more details.
 
13
#
 
14
# You should have received a copy of the GNU General Public License along
 
15
# with this program; if not, write to the Free Software Foundation, Inc.,
 
16
# 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
17
#
 
18
##########################################################
 
19
 
 
20
####
 
21
####  VMware kernel module Makefile to be distributed externally
 
22
####
 
23
 
 
24
####
 
25
#### SRCROOT _must_ be a relative path.
 
26
####
 
27
SRCROOT = .
 
28
 
 
29
#
 
30
# open-vm-tools doesn't replicate shared source files for different modules;
 
31
# instead, files are kept in shared locations. So define a few useful macros
 
32
# to be able to handle both cases cleanly.
 
33
#
 
34
INCLUDE      :=
 
35
ifdef OVT_SOURCE_DIR
 
36
AUTOCONF_DIR := $(OVT_SOURCE_DIR)/modules/linux/shared/autoconf
 
37
VMLIB_PATH   = $(OVT_SOURCE_DIR)/lib/$(1)
 
38
INCLUDE      += -I$(OVT_SOURCE_DIR)/modules/linux/shared
 
39
INCLUDE      += -I$(OVT_SOURCE_DIR)/lib/include
 
40
else
 
41
AUTOCONF_DIR := $(SRCROOT)/shared/autoconf
 
42
INCLUDE      += -I$(SRCROOT)/shared
 
43
endif
 
44
 
 
45
 
 
46
VM_UNAME = $(shell uname -r)
 
47
 
 
48
# Header directory for the running kernel
 
49
ifdef LINUXINCLUDE
 
50
HEADER_DIR = $(LINUXINCLUDE)
 
51
else
 
52
HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
 
53
endif
 
54
 
 
55
BUILD_DIR = $(HEADER_DIR)/..
 
56
 
 
57
DRIVER := vsock
 
58
PRODUCT := tools-source
 
59
 
 
60
# Grep program
 
61
GREP = /bin/grep
 
62
 
 
63
vm_check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
 
64
        > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
 
65
vm_check_file = $(shell if test -f $(1); then echo "yes"; else echo "no"; fi)
 
66
 
 
67
ifndef VM_KBUILD
 
68
VM_KBUILD := no
 
69
ifeq ($(call vm_check_file,$(BUILD_DIR)/Makefile), yes)
 
70
ifneq ($(call vm_check_file,$(BUILD_DIR)/Rules.make), yes)
 
71
VM_KBUILD := 26
 
72
endif
 
73
endif
 
74
export VM_KBUILD
 
75
endif
 
76
 
 
77
ifndef VM_KBUILD_SHOWN
 
78
ifeq ($(VM_KBUILD), no)
 
79
VM_DUMMY := $(shell echo >&2 "Using standalone build system.")
 
80
else
 
81
ifeq ($(VM_KBUILD), 24)
 
82
VM_DUMMY := $(shell echo >&2 "Using 2.4.x kernel build system.")
 
83
else
 
84
VM_DUMMY := $(shell echo >&2 "Using 2.6.x kernel build system.")
 
85
endif
 
86
endif
 
87
VM_KBUILD_SHOWN := yes
 
88
export VM_KBUILD_SHOWN
 
89
endif
 
90
 
 
91
ifneq ($(VM_KBUILD), no)
 
92
 
 
93
VMCCVER := $(shell $(CC) -dumpversion)
 
94
 
 
95
# If there is no version defined, we are in toplevel pass, not yet in kernel makefiles...
 
96
ifeq ($(VERSION),)
 
97
 
 
98
ifeq ($(VM_KBUILD), 24)
 
99
DRIVER_KO := $(DRIVER).o
 
100
else
 
101
DRIVER_KO := $(DRIVER).ko
 
102
endif
 
103
 
 
104
.PHONY: $(DRIVER_KO)
 
105
 
 
106
auto-build: $(DRIVER_KO)
 
107
        cp -f $< $(SRCROOT)/../$(DRIVER).o
 
108
 
 
109
# $(DRIVER_KO) is a phony target, so compare file times explicitly
 
110
$(DRIVER): $(DRIVER_KO)
 
111
        if [ $< -nt $@ ] || [ ! -e $@ ] ; then cp -f $< $@; fi
 
112
 
 
113
# Pass gcc version down the chain, so we can detect if kernel attempts to use unapproved compiler
 
114
VM_CCVER := $(VMCCVER)
 
115
export VM_CCVER
 
116
VM_CC := $(CC)
 
117
export VM_CC
 
118
 
 
119
MAKEOVERRIDES := $(filter-out CC=%,$(MAKEOVERRIDES))
 
120
 
 
121
#
 
122
# Define a setup target that gets built before the actual driver.
 
123
# This target may not be used at all, but if it is then it will be defined
 
124
# in Makefile.kernel
 
125
#
 
126
prebuild:: ;
 
127
postbuild:: ;
 
128
 
 
129
$(DRIVER_KO): prebuild
 
130
        $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
 
131
          MODULEBUILDDIR=$(MODULEBUILDDIR) modules
 
132
        $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
 
133
          MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
 
134
endif
 
135
 
 
136
vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \
 
137
        $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) $(LINUXINCLUDE) \
 
138
        $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
 
139
        -DKBUILD_BASENAME=\"$(DRIVER)\" \
 
140
        -Werror -S -o /dev/null -xc $(1) \
 
141
        > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)
 
142
 
 
143
CC_WARNINGS := -Wall -Wstrict-prototypes
 
144
CC_OPTS := $(GLOBAL_DEFS) $(CC_WARNINGS) -DVMW_USING_KBUILD
 
145
ifdef VMX86_DEVEL
 
146
CC_OPTS += -DVMX86_DEVEL
 
147
endif
 
148
ifdef VMX86_DEBUG
 
149
CC_OPTS += -DVMX86_DEBUG
 
150
endif
 
151
 
 
152
include $(SRCROOT)/Makefile.kernel
 
153
 
 
154
ifdef TOPDIR
 
155
ifeq ($(VM_KBUILD), 24)
 
156
 
 
157
O_TARGET := $(DRIVER).o
 
158
 
 
159
obj-y := $($(DRIVER)-y)
 
160
 
 
161
include $(TOPDIR)/Rules.make
 
162
endif
 
163
endif
 
164
 
 
165
else
 
166
 
 
167
include $(SRCROOT)/Makefile.normal
 
168
 
 
169
endif
 
170
 
 
171
#.SILENT: