Files
xen/tools/xenmon/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

50 lines
1.4 KiB
Makefile

# Copyright (C) HP Labs, Palo Alto and Fort Collins, 2005
# Author: Diwaker Gupta <diwaker.gupta@hp.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; under version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
XEN_ROOT=$(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
CFLAGS += -Werror
CFLAGS += $(CFLAGS_libxenctrl)
LDLIBS += $(LDLIBS_libxenctrl)
SCRIPTS = xenmon.py
.PHONY: all
all: build
.PHONY: build
build: xentrace_setmask xenbaked
.PHONY: install
install: build
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
$(INSTALL_PROG) xenbaked $(DESTDIR)$(SBINDIR)/xenbaked
$(INSTALL_PROG) xentrace_setmask $(DESTDIR)$(SBINDIR)/xentrace_setmask
$(INSTALL_PROG) xenmon.py $(DESTDIR)$(SBINDIR)/xenmon.py
$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
$(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.xenmon
.PHONY: clean
clean:
$(RM) -f $(DEPS)
$(RM) -f xenbaked xenbaked.o
$(RM) -f xentrace_setmake setmask.o
xenbaked: xenbaked.o Makefile
$(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS)
xentrace_setmask: setmask.o Makefile
$(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS)
-include $(DEPS)