ia64/xen-unstable

view Config.mk @ 16560:822d4ec5cfb1

tools: Rationalise library soname versions.

* Arrange for the sonames of libxenstore, libxc, libfsimage and
libblktap to be set from a single place in Config.mk.
* Bumps the soname major version number to 3.2 in preparation for
3.2 rc1 after which we do not expect to have ABI changes.

I have not done anything about libaio and libflask. The former is
imported from elsewhere and if we're lucky will have sane versioning
upstream.

libflask has a very small interface and I'm hoping that the XSM
authors have been keeping some ABI discipline.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Dec 07 14:44:13 2007 +0000 (2007-12-07)
parents 1ed990bc8da9
children 47efaa78e3ac
line source
1 # -*- mode: Makefile; -*-
3 # A debug build of Xen and tools?
4 debug ?= n
6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
7 -e s/ppc/powerpc/ -e s/i86pc/x86_32/ \
8 -e s/amd64/x86_64/)
9 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
10 XEN_OS ?= $(shell uname -s)
12 ifeq ($(XEN_TARGET_ARCH),x86_32)
13 XEN_TARGET_X86_PAE ?= y
14 endif
16 LIBRARIES_VERSION_MAJOR = 3.2
17 LIBRARIES_VERSION_MINOR = 0
19 CONFIG_$(XEN_OS) := y
21 SHELL ?= /bin/sh
23 # Tools to run on system hosting the build
24 HOSTCC = gcc
25 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
26 HOSTCFLAGS += -fno-strict-aliasing
27 HOSTCFLAGS_x86_32 = -m32
28 HOSTCFLAGS_x86_64 = -m64
29 HOSTCFLAGS += $(HOSTCFLAGS_$(XEN_COMPILE_ARCH))
31 DISTDIR ?= $(XEN_ROOT)/dist
32 DESTDIR ?= /
34 include $(XEN_ROOT)/config/$(XEN_OS).mk
35 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
37 ifneq ($(EXTRA_PREFIX),)
38 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
39 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
40 endif
42 # cc-option: Check if compiler supports first option, else fall back to second.
43 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
44 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
45 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
47 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
48 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
49 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
50 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
51 then echo y; else echo n; fi ;)
53 # cc-ver-check: Check compiler is at least specified version, else fail.
54 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
55 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
56 define cc-ver-check-closure
57 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
58 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
59 cc-option := n
60 endif
61 endef
63 ifneq ($(debug),y)
64 CFLAGS += -DNDEBUG
65 else
66 CFLAGS += -g
67 endif
69 CFLAGS += -fno-strict-aliasing
71 CFLAGS += -std=gnu99
73 CFLAGS += -Wall -Wstrict-prototypes
75 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
76 # result of any casted expression causes a warning.
77 CFLAGS += -Wno-unused-value
79 HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
80 CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
82 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
83 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
85 # Enable XSM security module. Enabling XSM requires selection of an
86 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
87 XSM_ENABLE ?= n
88 FLASK_ENABLE ?= n
89 ACM_SECURITY ?= n
91 # Optional components
92 XENSTAT_XENTOP ?= y
93 VTPM_TOOLS ?= n
94 LIBXENAPI_BINDINGS ?= n
95 PYTHON_TOOLS ?= y
97 -include $(XEN_ROOT)/.config