ia64/xen-unstable

view tools/misc/Makefile @ 17831:f292689f48ba

Push python-related make variable definitions into tools/misc.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jun 11 09:44:42 2008 +0100 (2008-06-11)
parents b8fa4a11f715
children 7592da5118ec
line source
1 XEN_ROOT=../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 CFLAGS += -Werror
6 INCLUDES += -I $(XEN_XC)
7 INCLUDES += -I $(XEN_LIBXC)
8 INCLUDES += -I $(XEN_INCLUDE)
9 CFLAGS += $(INCLUDES)
11 HDRS = $(wildcard *.h)
13 TARGETS-y := xenperf
14 TARGETS-$(CONFIG_X86) += xen-detect
15 TARGETS := $(TARGETS-y)
17 SUBDIRS-$(CONFIG_LOMOUNT) += lomount
18 SUBDIRS-$(CONFIG_MINITERM) += miniterm
19 SUBDIRS := $(SUBDIRS-y)
21 INSTALL_BIN = $(TARGETS) xencons
22 INSTALL_SBIN = netfix xm xen-bugtool xen-python-path xend xenperf xsview
24 DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
25 PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH)
26 INSTALL_PYTHON_PROG = $(XEN_ROOT)/tools/python/install-wrap \
27 "$(PYTHON_PATH)" $(INSTALL_PROG)
29 .PHONY: all
30 all: build
32 .PHONY: build
33 build: $(TARGETS)
34 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d; done
36 .PHONY: install
37 install: build
38 $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
39 $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
40 $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
41 $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
42 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done
44 .PHONY: clean
45 clean:
46 $(RM) *.o $(TARGETS) *~
47 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
49 %.o: %.c $(HDRS) Makefile
50 $(CC) -c $(CFLAGS) -o $@ $<
52 xenperf: %: %.o Makefile
53 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl)