ia64/xen-unstable

view tools/xentrace/Makefile @ 8445:87e5ac90a8df

Only build xenctx on x86_32 and x86_64.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
author Ian.Campbell@xensource.com
date Fri Dec 23 09:12:41 2005 +0000 (2005-12-23)
parents 8d5d4d58407f
children d4e3f04e3d38
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 += -Wall -Werror -O3
11 CFLAGS += -I $(XEN_XC)
12 CFLAGS += -I $(XEN_LIBXC)
14 HDRS = $(wildcard *.h)
15 OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
17 BIN = xentrace tbctl 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 all: build
32 build: $(BIN) $(LIBBIN)
34 install: build
35 [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
36 [ -z "$(LIBBIN)"] || [ -d $(DESTDIR)/usr/$(LIBDIR)/xen/bin ] || \
37 $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
38 [ -d $(DESTDIR)/usr/share/man/man1 ] || \
39 $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man1
40 [ -d $(DESTDIR)/usr/share/man/man8 ] || \
41 $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man8
42 $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
43 [ -z "$(LIBBIN)"] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
44 $(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/share/man/man1
45 $(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/share/man/man8
47 clean:
48 $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
50 %: %.c $(HDRS) Makefile
51 $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl