ia64/xen-unstable

view tools/xentrace/Makefile @ 16741:2773cdbecda5

tools: LDFLAGS in link lines

LDFLAGS is not honoured by a couple of link lines in tools/*, but
should be.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 17 15:17:22 2008 +0000 (2008-01-17)
parents 729a6231de35
children 6ed9b42d1ec4
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)
9 HDRS = $(wildcard *.h)
10 OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
12 BIN = xentrace xentrace_setsize
13 LIBBIN =
14 SCRIPTS = xentrace_format
15 MAN1 = $(wildcard *.1)
16 MAN8 = $(wildcard *.8)
18 ifeq ($(XEN_TARGET_ARCH),x86_32)
19 LIBBIN += xenctx
20 endif
22 ifeq ($(XEN_TARGET_ARCH),x86_64)
23 LIBBIN += xenctx
24 endif
26 ifeq ($(XEN_TARGET_ARCH),ia64)
27 LIBBIN += xenctx
28 endif
30 .PHONY: all
31 all: build
33 .PHONY: build
34 build: $(BIN) $(LIBBIN)
36 .PHONY: install
37 install: build
38 [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
39 [ -z "$(LIBBIN)" ] || [ -d $(DESTDIR)/usr/$(LIBDIR)/xen/bin ] || \
40 $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
41 [ -d $(DESTDIR)/usr/share/man/man1 ] || \
42 $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man1
43 [ -d $(DESTDIR)/usr/share/man/man8 ] || \
44 $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man8
45 $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
46 [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)/usr/$(LIBDIR)/xen/bin
47 $(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/share/man/man1
48 $(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/share/man/man8
50 .PHONY: clean
51 clean:
52 $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
54 %: %.c $(HDRS) Makefile
55 $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) $(LDFLAGS) -lxenctrl
56 xentrace_%: %.c $(HDRS) Makefile
57 $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) $(LDFLAGS) -lxenctrl