Files
xen/tools/misc/Makefile
T
iap10@labyrinth.cl.cam.ac.uk d2f5d53621 bitkeeper revision 1.1159.223.26 (41f2cdb6LNpheOtPoAKEUn-czlZFig)
Description: use DESTDIR correctly
Standard makefiles always attempt to install to the root(/).  Setting
DESTDIR is the normal way to install to an alternative location.
Setting prefix has the possibility of breaking programs, as the prefix
may have been embedded inside a compiled binary.

From: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
2005-01-22 22:03:34 +00:00

38 lines
807 B
Makefile

INSTALL = install
INSTALL_PROG = $(INSTALL) -m0755
INSTALL_DIR = $(INSTALL) -d -m0755
XEN_ROOT=../..
include $(XEN_ROOT)/tools/Make.defs
CC = gcc
CFLAGS = -Wall -Werror -O3
INCLUDES += -I $(XEN_XC)
INCLUDES += -I $(XEN_LIBXC)
CFLAGS += $(INCLUDES)
HDRS = $(wildcard *.h)
TARGETS = xenperf
INSTALL_BIN = $(TARGETS) xencons
INSTALL_SBIN = netfix xm xend xensv xenperf
all: $(TARGETS)
$(MAKE) -C miniterm
install: all
$(INSTALL_DIR) $(DESTDIR)/usr/bin
$(INSTALL_DIR) $(DESTDIR)/usr/sbin
$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
$(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
$(MAKE) -C miniterm install
clean:
$(RM) *.o $(TARGETS) *~
$(MAKE) -C miniterm clean
%: %.c $(HDRS) Makefile
$(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxc -L$(XEN_LIBXUTIL) -lxutil