ia64/xen-unstable

view tools/misc/Makefile @ 19506:3fecb8f43617

tools: Add device-path command to convert SBDF into device path.

'SBDF' format is "[SEG#:]BUS#:DEV#.FUNC#"
ex) 0000:0a:1f.3
Device path format is "HID[:UID]-DEV#.FUNC#[-DEV#.FUNC#[...]]"
ex) PNP0A08:0-2.0-0.0

The command can be executed as follows.

# device_path 0a:1f.3
PNP0A08:0-2.0-0.0

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Apr 06 13:52:56 2009 +0100 (2009-04-06)
parents bd78714b8594
children ff9fdd6fce1e
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 xenpm
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-y := xencons
22 INSTALL_BIN-$(CONFIG_X86) += xen-detect
23 INSTALL_BIN := $(INSTALL_BIN-y)
25 INSTALL_SBIN-y := netfix xm xen-bugtool xen-python-path xend xenperf xsview xenpm device-path
26 INSTALL_SBIN := $(INSTALL_SBIN-y)
28 DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
29 PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH)
30 INSTALL_PYTHON_PROG = $(XEN_ROOT)/tools/python/install-wrap \
31 "$(PYTHON_PATH)" $(INSTALL_PROG)
33 .PHONY: all
34 all: build
36 .PHONY: build
37 build: $(TARGETS)
38 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d; done
40 .PHONY: install
41 install: build
42 $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
43 $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
44 $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
45 $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
46 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done
48 .PHONY: clean
49 clean:
50 $(RM) *.o $(TARGETS) *~ $(DEPS)
51 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
53 %.o: %.c $(HDRS) Makefile
54 $(CC) -c $(CFLAGS) -o $@ $<
56 xenperf xenpm: %: %.o Makefile
57 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl)
59 -include $(DEPS)