aboutsummaryrefslogtreecommitdiffstats
path: root/tools/Rules.mk
Commit message (Collapse)AuthorAgeFilesLines
* tools: fix dependency file generationJan Beulich2013-05-211-1/+1
| | | | | | | | | | | | | | | There is a small set of places where files in subdirectories get compiled from the parent directory. Dependency file wise this is no problem as long as the files use names distinct without regard to the directories they sit in, and tools/console/ violates this (in having two main.c files). Hence we need to avoid losing the directory name, both to ensure the two compiler instances don't simultaneously write to the same file (happening of which is what triggered me looking into this) and to guarantee dependencies for all files will be seen by make on an incremental rebuild. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Use AC_SYS_LARGEFILE instead of calling getconf(1)Ian Campbell2013-04-111-2/+3
| | | | | | | | | | | | | getconf is not cross-compile friendly since it reports the features of the host and not the target. There doesn't appear to be a $triplet-getconf. AC_SYS_LARGEFILE arranges for #defines to appear in config.h however Xen's build system expects these to be part of C{PP}FLAGS. Since I'm not confident that everything in Xen includes config.h I instead arrange for the result of running AC_SYS_LARGERFILE to end up in CFLAGS. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* build: Require GCC 4.1 or later.Keir Fraser2012-09-131-5/+0
| | | | | | | Centralise the version check in Config.mk. Any more strict version requirements can be added to specific subdirs/arches. Signed-off-by: Keir Fraser <keir@xen.org>
* tools/config: Allow building of components to be controlled from .configAndrew Cooper2012-08-011-2/+2
| | | | | | | | | | | | For build systems which build certain Xen components separately, allow certain components to be conditionally built based on .config, rather than always building them. This patch allows qemu and blktap to be configured in this manner. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* build: include Tools.mk first in tools/Rules.mkRoger Pau Monne2012-07-251-1/+1
| | | | | | | | | Tools.mk should be included first, or PREFIX is not honoured in the other conf/ files that define the paths of several tools. Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: pass EXTRA_CFLAGS via environmentOlaf Hering2012-06-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently qemu-xen will be compiled with CFLAGS only if CFLAGS was already in the environment during make invocation. If CFLAGS is in environment then make will append all of the various flags specified in xen Makefiles to this environment variable, which is then used in qemu configure. Since qemu-xen is not ready for compiler flags like "-std=gnu99" compilation will fail. If CFLAGS is not in environment, then configure will use just its own "-O2 -g" because make does not export its own CFLAGS variable. >From a distro perspective, it is required to build libraries and binaries with certain global cflags (arbitrary gcc options). Up to the point when qemu-xen was imported it worked as expected by exporting CFLAGS before 'make tools'. Now qemu-upstream reuses these CFLAGS, but it cant deal with the result. This patch extends the tools Makefiles so that three new environment variables are recognized: EXTRA_CFLAGS_XEN_TOOLS= specifies CFLAGS for the tools build. EXTRA_CFLAGS_QEMU_TRADITIONAL= specifies CFLAGS for old qemu. EXTRA_CFLAGS_QEMU_XEN= specifies CFLAGS for new qemu. Special care needs to be taken in tools/firmware because the resulting binaries are not linked with the hosts runtime libraries. These binaries run in guest context. To avoid build errors from gcc options like -fstack-protector, reuse existing practice to unset the new EXTRA_CFLAGS_XEN_TOOLS for the firmware dirs. The new feature can be used like this in a rpm xen.spec file: export EXTRA_CFLAGS_XEN_TOOLS="${RPM_OPT_FLAGS}" export EXTRA_CFLAGS_QEMU_TRADITIONAL="${RPM_OPT_FLAGS}" export EXTRA_CFLAGS_QEMU_XEN="${RPM_OPT_FLAGS}" ./configure \ --libdir=%{_libdir} \ --prefix=/usr make Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/build: fix distcleanRoger Pau Monne2012-04-241-3/+4
| | | | | | | | | | | distclean removed config/Tools.mk which was needed by tools/Rules.mk, thus preventing distclean from running properly in the tools directory. This patch only enforces config/Tools.mk presence when not performing a clean/distclean target Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Cc: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* build: add autoconf to replace custom checks in tools/checkIan Jackson2012-02-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added autotools magic to replace custom check scripts. The previous checks have been ported to autoconf, and some additional ones have been added (plus the suggestions from running autoscan). Two files are created as a result from executing configure script, config/Tools.mk and config.h. conf/Tools.mk is included by tools/Rules.mk, and contains most of the options previously defined in .config, that can now be set passing parameters or defining environment variables when executing configure script. config.h is only used by libxl/xl to detect yajl_version.h. [ tools/config.sub and config.guess copied from autotools-dev 20100122.1 from Debian squeeze i386, which is GPLv2. tools/configure generated using the included ./autogen.sh which ran autoconf 2.67-2 from Debian squeeze i386. autoconf is GPLv3+ but has a special exception for the autoconf output; this exception applies to us and exempts us from complying with GPLv3+ for configure, which is good as Xen is GPL2 only. - Ian Jackson ] Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Tested-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES}Roger Pau Monne2011-11-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Create two new variables called APPEND_ and PREPEND_ to add compile flags at the beginning or at the end of the search path. Added a new semantic for user defined compile flags, here is the list of possible options: PREPEND_LIB: add libraries to the search path before xen (before xen installation folders). PREPEND_INCLUDES: add headers to the search path before xen (before xen installation folders). APPEND_LIB: add libraries to the search path at the end (after all xen installation folders have been added). APPEND_INCLUDES: add libraries to the search path at the end (after all xen installation folders have been added). EXTRA_INCLUDES and EXTRA_LIB can still be used, and they will have the same effect as PREPEND_INCLUDES and PREPEND_LIB. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libvchan: interdomain communications libraryDaniel De Graaf2011-10-061-0/+5
| | | | | | | | | | | | | | | | | | | | | This library implements a bidirectional communication interface between applications in different domains, similar to unix sockets. Data can be sent using the byte-oriented libvchan_read/libvchan_write or the packet-oriented libvchan_recv/libvchan_send. Channel setup is done using a client-server model; domain IDs and a port number must be negotiated prior to initialization. The server allocates memory for the shared pages and determines the sizes of the communication rings (which may span multiple pages, although the default places rings and control within a single page). With properly sized rings, testing has shown that this interface provides speed comparable to pipes within a single Linux domain; it is significantly faster than network-based communication. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools build: link to specific library version (libxs, libxl, xenstore, xenstat)Roger Pau Monne2011-10-061-5/+5
| | | | | | | | | | To avoid linking to unexpected copies (eg wrong versions) of xen libraries, explicitly pass the linker the library file to link to. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: do not expose libxenctrl/libxenstore headers via libxl.hIan Campbell2011-04-061-1/+1
| | | | | | | | | | | | This completely removes libxenstore from libxl users' view. xl still needs libxenctrl directly due to the direct use of the xentoollog functionality but it is not exposed to the indirect linkage anymore. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: provide generic rules for compiling .S filesIan Campbell2011-03-231-0/+5
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: users of libxl currently need to see libxc and libxenstoreIan Campbell2011-03-231-1/+1
| | | | | | | | | | headers So add them to CFLAGS_libxenlight Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: allow Makefiles to define CFLAGS_foo.oIan Campbell2011-03-231-3/+3
| | | | | | | | To provide per-file flags. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Drop $(X11_LDPATH) from build.Ian Campbell2011-03-231-2/+0
| | | | | | | | Nothing uses it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: xenstat: install and use shared libraryIan Campbell2011-03-231-0/+4
| | | | | | | | Remove .so files from the .a file. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: consistently use $(CFLAGS_xeninclude) instead of open coding.Ian Campbell2011-03-211-6/+6
| | | | | | | | Renamed from the slightly ambiguous CFLAGS_include. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Drop XEN_XC variableIan Campbell2011-03-211-1/+0
| | | | | | | | | There is nothing to include in the python bindings source directory and likely never was/will be ... Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: support building with --as-neededIan Campbell2011-03-171-3/+0
| | | | | | | | | Tested by forcing --as-needed via tools/Rules.mk but this is included since the intention is simply to support diustros which default to --as-needed, not to enable it everywhere. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: link each shared library or binary only against the libraries it usesIan Campbell2011-03-171-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular if binary A uses libB and libB uses libC entirely internally then A does not need to link against libC only libB. However when linking binary A the linker does need to have visibility of the libraries which libB links against (libC in this example). For out of tree uses this is achieved without fuss due because the libraries are installed in a standard path. However in the case of in-tree users the linker needs a hint in the form of the -rpath-link option. Therefore a new class of build variable, $(SHLIB_FOO), is introduced which includes the linker options needed to link against a library which uses libFOO. The intention is that $(LDLIBS_bar) will include the $(SHLIB_foo)s which it uses where necessary rather requiring that users are aware of this. For the python extensions this change appears particularly large since previously each of python bindings were linked against the union of all possible libraries used by all bindings instead of just what they individually needed. This change removes a dependency on libdl.so from nearly everything in the system, only libxenctrl actually uses it. In the context of xl/libxl the intention of libxl is to remove any need for a user of libxl to know about libxenstore or libxenctrl, however in the current build it is xl which links against those libraries rather than libxl (which only links against libc). After this change libxl correctly depends on the libraries it uses and xl does not depend on libraries which it is not support to be required to know about. Note that xl does depend on libxenctrl.so since it uses xtl_* directly. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: disable linker --as-needed option.Ian Campbell2011-02-011-0/+3
| | | | | | | | | | | | | | | | The Xen build system is not currently compatible with the --as-needed linker option. The proper fix for this is turning out to be rather invasive to the build system so simply disable for now with the intention of revisiting for the 4.2 release. The --no-as-needed option is available at least since binutils 2.15 (released in May 2004) and hence I think can be unconditionally relied on. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reported-by: Nathan March <nathan@gt.net> Tested-by: Nathan March <nathan@gt.net> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Fix flask does not build because linking fails withKeir Fraser2011-01-111-1/+1
| | | | | | | missing dlopen/dlsym etc. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* Make blktap support optional.Christoph Egger2010-08-161-0/+11
| | | | | | | | Enable it by default on Linux, disable it on non-Linux. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* split LDLIBS from LDFLAGS to fix link errors in recent toolchainsStefano Stabellini2010-08-111-4/+4
| | | | | | | | | | | | | | | | Linker command lines are order-sensitive. Move linker options -Lfoo -lfoo from LDFLAGS to LDLIBS and place this new variable after the objects to link. This resolves build errors in xenpagin and blktap with recent toolchains. rename SHLIB_CFLAGS to SHLIB_LDFLAGS rename LDFLAGS_* to LDLIBS_* move LDFLAGS usage after CFLAGS in CC calls remove stale comments in xenpaging Makefile Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/libxl: Revert broken NetBSD portability patchesIan Jackson2010-07-231-5/+0
| | | | | | | | | Revert df9d8319bd37 Fix blktap2 NetBSD build and also revert broken change e76befc7fe2d portability fixes from tools/console 24277e3237ca Fix linking error when creating the xl binary. Now it builds again.
* MergeKeir Fraser2010-07-201-0/+5
|\
| * Attached patch takes over some portability fixes from tools/consoleStefano Stabellini2010-07-201-0/+5
| | | | | | | | | | | | | | | | | | to make libxl build on NetBSD. blktapctl is build on Linux only. This will be another patch to finally unbreak libxl. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* | tools: Update distclean target to remove auto-gen'ed tarballs.Keir Fraser2010-07-201-1/+4
|/ | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap2: Build libblktapctl.soKeir Fraser2010-06-101-0/+4
| | | | Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
* memshr: Must be built on ia64 as well as x86, as blktap depends on it.Keir Fraser2009-12-281-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* memshr: Build fixesKeir Fraser2009-12-281-1/+1
| | | | | | | | * Build memshr/xenpaging on x86/Linux only * Remove dependency on GCC 4.1+ __sync_*() intrinsics. Signed-off-by: Keir Fraser <keir.fraser@citrix.com> Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* tools: simplify PYTHON_PATH computation (and fixes for NetBSD)Keir Fraser2009-12-091-2/+2
| | | | | | | | Doesn't work when build-time python path differs from install-time. Do we care about this given tools should be packaged/built for the specific run-time distro? Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* pygrub: Set path in #! line of pygrub, tooKeir Fraser2009-08-251-0/+5
| | | | | | | | | | | | | pygrub currently has a hardcoded path of /usr/bin/python which is not correct if the version of python at install time is not the same as that at build time. This patch uses the existing install-wrap and python/get-path machinery. (It does not address the currently-existing bug that the get-path machinery works by assuming that `python' is a symlink, rather than querying the python interpreter for its version.) Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: get rid of hardcoded config dirsKeir Fraser2009-05-201-4/+0
| | | | | | | | | Remove *all* hardcoded "/etc/xen" strings in python code. Additionally, it removes pygrub_path from osdep.py. Its use has been replaced with auxbin.pathTo("pygrub"). Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools: clean up handling of xen config and scripts directories.Keir Fraser2009-05-191-0/+4
| | | | | | | For now hardcode /etc w/o a prefix as there are hardcoded config paths in the code which would break otherwise. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools build: No need for LFS flags on NetBSD.Keir Fraser2009-03-311-0/+2
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Use -MMD -MF in tools/* rather than -Wp,-M...Keir Fraser2009-01-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | If you use -MMD -MF then the correct .o filename is written to the .*.d file as the compiler driver arranges everything. This was done in 19010:275abe1c5d24 for the hypervisor. In this patch we do the same elsewhere in the xen-unstable tree, particularly tools/. Specifically: * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS. * Remove -Wp,-MD... from every other Makefile * Remove setting of DEPS from every other Makefile * Ensure that every Makefile says -include $(DEPS) * Ensure that every Makefile's clean target removes $(DEPS) Some Makefiles were already halfway there, but often for a different variable name eg PROG_DEP. The variable name is now standardised in Rules.mk as DEPS. I have done a test build with this change, on Debian etch. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* cross-install: Only apply in tools directory, and automatically wrap $INSTALL.Keir Fraser2008-08-301-0/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools build: Fix build after subdir rules cleanups.Keir Fraser2008-03-251-4/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* build: Add generic subdirs rules.Keir Fraser2008-03-251-0/+10
| | | | | | Use them in the toplevel Makefile. Signed-off-by: Bastian Blank <waldi@debian.org>
* build: Make PREFIX work by fixing LIBDIRKeir Fraser2008-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | In the current tree, setting PREFIX does not work very well. This is because of confusion about the meaning of LIBDIR. In some places it is the pathname tail of directories containing libraries (lib, lib64 or lib/amd64). But in other places it is a destination pathname (implicitly, including any PREFIX). This can result in PREFIX or /usr being added the wrong number of times. This patch splits LIBDIR into two variables, LIBLEAFDIR and LIBDIR. LIBDIR is the directory into which Xen libraries and other similar code is to be placed, and includes any PREFIX. LIBLEAFDIR is just the library tail and can be appended to various different prefixes; for example, to construct the X11 library directory for -L. Neither variable contains the value of DESTDIR, which is of course used only to redirect the results of `make install' when desired. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenstore headers also need public includes.Keir Fraser2008-01-271-1/+1
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Define CFLAGS and LDFLAGS for libxenstore.Keir Fraser2008-01-271-0/+3
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Define CFLAGS and LDFLAGS for libxenguest.Keir Fraser2008-01-271-0/+3
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Define CFLAGS and LDFLAGS for libxenctrl.Keir Fraser2008-01-271-0/+5
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Move generation of public header hierarchy into the tools.Keir Fraser2008-01-261-23/+1
| | | | | | | This patch merges the two versions of public header generation currently used in the build into one. Signed-off-by: Bastian Blank <waldi@debian.org>
* [IA64] Fix XenITP buildAlex Williamson2007-12-131-0/+2
| | | | Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* Cleanups after XSM checkin.kfraser@localhost.localdomain2007-08-311-0/+2
| | | | | | | | | | | Signed-off-by: Keir Fraser <keir@xensource.com> --HG-- rename : xen/include/public/acm.h => xen/include/public/xsm/acm.h rename : xen/include/public/acm_ops.h => xen/include/public/xsm/acm_ops.h rename : xen/include/acm/acm_core.h => xen/include/xsm/acm/acm_core.h rename : xen/include/acm/acm_endian.h => xen/include/xsm/acm/acm_endian.h rename : xen/include/acm/acm_hooks.h => xen/include/xsm/acm/acm_hooks.h
* Include Solaris kernel headerskfraser@localhost.localdomain2007-06-111-13/+5
| | | | | | | | | | Add the Solaris kernel headers used be the userspace tools to the distribution. The same setup as used by Linux is taken. We modify the Linux kernel headers to also install in /usr/include/xen/sys/ - without a kernel-neutral path, it can make using the headers very difficult, and encourages errors. Signed-off-by: John Levon <john.levon@sun.com>