ia64/xen-unstable

view tools/xentrace/Makefile @ 16899:221b867ee084

Add PRIVATE_BINDIR. Use it.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Jan 26 14:42:03 2008 +0000 (2008-01-26)
parents b9004e222fde
children ddf454872de4
line source
1 XEN_ROOT=../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 CFLAGS += -Werror
6 CFLAGS += -I $(XEN_XC)
7 CFLAGS += -I $(XEN_LIBXC)
8 CFLAGS += -I $(XEN_INCLUDE)
10 HDRS = $(wildcard *.h)
11 OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
13 BIN = xentrace xentrace_setsize
14 LIBBIN =
15 SCRIPTS = xentrace_format
16 MAN1 = $(wildcard *.1)
17 MAN8 = $(wildcard *.8)
19 ifeq ($(XEN_TARGET_ARCH),x86_32)
20 LIBBIN += xenctx
21 endif
23 ifeq ($(XEN_TARGET_ARCH),x86_64)
24 LIBBIN += xenctx
25 endif
27 ifeq ($(XEN_TARGET_ARCH),ia64)
28 LIBBIN += xenctx
29 endif
31 .PHONY: all
32 all: build
34 .PHONY: build
35 build: $(BIN) $(LIBBIN)
37 .PHONY: install
38 install: build
39 $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
40 [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
41 $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR)
42 $(INSTALL_DIR) $(DESTDIR)$(MAN8DIR)
43 $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
44 [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR)
45 $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR)
46 $(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)
48 .PHONY: clean
49 clean:
50 $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
52 %: %.c $(HDRS) Makefile
53 $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) $(LDFLAGS) -lxenctrl
54 xentrace_%: %.c $(HDRS) Makefile
55 $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) $(LDFLAGS) -lxenctrl