~ubuntu-branches/ubuntu/saucy/xen-common/saucy

« back to all changes in this revision

Viewing changes to Config.mk

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-02-06 10:49:43 UTC
  • mfrom: (10.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20120206104943-fo54o8stjp2ikglj
Tags: 4.1.2-1ubuntu1
* Merge from Debian testing.  Remaining changes:
  - Upate maintainer according to spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- mode: Makefile; -*-
2
2
 
3
3
# A debug build of Xen and tools?
4
 
debug ?= y
 
4
debug ?= n
5
5
 
6
6
XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
7
7
                         -e s/i86pc/x86_32/ -e s/amd64/x86_64/)
62
62
#  https://bugs.launchpad.net/ubuntu/+bug/362570
63
63
 
64
64
# cc-option: Check if compiler supports first option, else fall back to second.
 
65
#
 
66
# This is complicated by the fact that unrecognised -Wno-* options:
 
67
#   (a) are ignored unless the compilation emits a warning; and
 
68
#   (b) even then produce a warning rather than an error
 
69
# To handle this we do a test compile, passing the option-under-test, on a code
 
70
# fragment that will always produce a warning (integer assigned to pointer).
 
71
# We then grep for the option-under-test in the compiler's output, the presence
 
72
# of which would indicate an "unrecognized command-line option" warning/error.
 
73
#
65
74
# Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
66
 
cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
67
 
              /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
 
75
cc-option = $(shell if test -z "`echo 'void*p=1;' | \
 
76
              $(1) $(2) -S -o /dev/null -xc - 2>&1 | grep -- $(2) -`"; \
 
77
              then echo "$(2)"; else echo "$(3)"; fi ;)
68
78
 
69
79
# cc-option-add: Add an option to compilation flags, but only if supported.
70
80
# Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6)
93
103
    endif
94
104
endef
95
105
 
96
 
define absolutify_xen_root
97
 
    case "$(XEN_ROOT)" in                                          \
98
 
    /*) XEN_ROOT=$(XEN_ROOT) ;;                                    \
99
 
    *)  xen_root_lhs=`pwd`;                                        \
100
 
        xen_root_rhs=$(XEN_ROOT)/;                                 \
101
 
        while [ "x$${xen_root_rhs#../}" != "x$$xen_root_rhs" ]; do \
102
 
            xen_root_rhs="$${xen_root_rhs#../}";                   \
103
 
            xen_root_rhs="$${xen_root_rhs#/}";                     \
104
 
            xen_root_rhs="$${xen_root_rhs#/}";                     \
105
 
            xen_root_lhs="$${xen_root_lhs%/*}";                    \
106
 
        done;                                                      \
107
 
        XEN_ROOT="$$xen_root_lhs/$$xen_root_rhs" ;;                \
108
 
    esac;                                                          \
109
 
    export XEN_ROOT
110
 
endef
111
 
 
112
106
define buildmakevars2shellvars
113
 
    PREFIX="$(PREFIX)";                                            \
114
 
    XEN_SCRIPT_DIR="$(XEN_SCRIPT_DIR)";                            \
115
 
    export PREFIX;                                                 \
116
 
    export XEN_SCRIPT_DIR
 
107
    export PREFIX="$(PREFIX)";                                            \
 
108
    export XEN_SCRIPT_DIR="$(XEN_SCRIPT_DIR)";                            \
 
109
    export XEN_ROOT="$(XEN_ROOT)"
117
110
endef
118
111
 
119
112
buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1)))
150
143
 
151
144
$(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
152
145
$(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
 
146
$(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable)
153
147
 
154
148
LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
155
149
CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
175
169
# near the place in the Xen Makefiles where the file is used.
176
170
 
177
171
ifeq ($(GIT_HTTP),y)
178
 
QEMU_REMOTE=http://xenbits.xensource.com/git-http/qemu-xen-unstable.git
 
172
QEMU_REMOTE=http://xenbits.xensource.com/git-http/qemu-xen-4.1-testing.git
179
173
else
180
 
QEMU_REMOTE=git://xenbits.xensource.com/qemu-xen-unstable.git
 
174
QEMU_REMOTE=git://xenbits.xensource.com/qemu-xen-4.1-testing.git
181
175
endif
182
176
 
183
177
# Specify which qemu-dm to use. This may be `ioemu' to use the old
185
179
# CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
186
180
CONFIG_QEMU ?= $(QEMU_REMOTE)
187
181
 
188
 
QEMU_TAG := xen-4.1.0-rc6
 
182
QEMU_TAG := xen-4.1.2
189
183
#QEMU_TAG ?= e073e69457b4d99b6da0b6536296e3498f7f6599
190
184
# Fri Feb 11 17:54:51 2011 +0000
191
185
# qemu-xen: fix segfault with empty cdroms