ia64/xen-unstable

view tools/xentrace/Makefile @ 10067:bc7d49df1651

Fix the tools build:
1. xenctrl.h needs to include stddef.h to define size_t
2. tbctl is broken -- remove it since xenmon and xentrace
both automatcially enable tracing now
3. Fix setsize after xc_tbug interface changes

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue May 16 13:35:59 2006 +0100 (2006-05-16)
parents b454a09cddb1
children b16063ae0703
line source
1 INSTALL = install
2 INSTALL_PROG = $(INSTALL) -m0755
3 INSTALL_DIR = $(INSTALL) -d -m0755
4 INSTALL_DATA = $(INSTALL) -m0644
6 XEN_ROOT=../..
7 include $(XEN_ROOT)/tools/Rules.mk
9 CFLAGS += -Werror -D_LARGEFILE64_SOURCE
11 CFLAGS += -I $(XEN_XC)
12 CFLAGS += -I $(XEN_LIBXC)
14 HDRS = $(wildcard *.h)
15 OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
17 BIN = xentrace setsize
18 LIBBIN =
19 SCRIPTS = xentrace_format
20 MAN1 = $(wildcard *.1)
21 MAN8 = $(wildcard *.8)
23 ifeq ($(XEN_TARGET_ARCH),x86_32)
24 LIBBIN += xenctx
25 endif
27 ifeq ($(XEN_TARGET_ARCH),x86_64)
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 [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
40 [ -z "$(LIBBIN)" ] || [ -d $(DESTDIR)/usr/$(LIBDIR)/xen/bin ] || \
41 $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
42 [ -d $(DESTDIR)/usr/share/man/man1 ] || \
43 $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man1
44 [ -d $(DESTDIR)/usr/share/man/man8 ] || \
45 $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man8
46 $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
47 [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
48 $(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/share/man/man1
49 $(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/share/man/man8
51 .PHONY: clean
52 clean:
53 $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
55 %: %.c $(HDRS) Makefile
56 $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl