Files
xen/tools/xcutils/Makefile
T
Roger Pau Monne 9163062a39 tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES}
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>
2011-11-14 18:14:07 +00:00

53 lines
1.3 KiB
Makefile

#
# tools/xcutils/Makefile
#
# This file is subject to the terms and conditions of the GNU General
# Public License. See the file "COPYING" in the main directory of
# this archive for more details.
#
# Copyright (C) 2005 by Christian Limpach
#
XEN_ROOT = $(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
PROGRAMS = xc_restore xc_save readnotes lsevtchn
CFLAGS += -Werror
CFLAGS_xc_restore.o := $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest)
CFLAGS_xc_save.o := $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
CFLAGS_readnotes.o := $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest)
CFLAGS_lsevtchn.o := $(CFLAGS_libxenctrl)
.PHONY: all
all: build
.PHONY: build
build: $(PROGRAMS)
xc_restore: xc_restore.o
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(APPEND_LDFLAGS)
xc_save: xc_save.o
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(APPEND_LDFLAGS)
readnotes: readnotes.o
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(APPEND_LDFLAGS)
lsevtchn: lsevtchn.o
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
.PHONY: install
install: build
$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
$(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PRIVATE_BINDIR)
.PHONY: clean
clean:
$(RM) *.o $(PROGRAMS)
$(RM) $(DEPS)
-include $(DEPS)