ia64/xen-unstable

annotate 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
rev   line source
mjw@1623 1 XEN_ROOT=../..
kaf24@3549 2 include $(XEN_ROOT)/tools/Rules.mk
kaf24@1182 3
kaf24@9213 4 CFLAGS += -Werror
mjw@1623 5
mjw@1623 6 INCLUDES += -I $(XEN_XC)
mjw@1623 7 INCLUDES += -I $(XEN_LIBXC)
keir@16894 8 INCLUDES += -I $(XEN_INCLUDE)
kaf24@3231 9 CFLAGS += $(INCLUDES)
iap10@771 10
iap10@771 11 HDRS = $(wildcard *.h)
iap10@771 12
keir@18606 13 TARGETS-y := xenperf xenpm
keir@18606 14 TARGETS-$(CONFIG_X86) += xen-detect
kfraser@13894 15 TARGETS := $(TARGETS-y)
iap10@771 16
keir@16742 17 SUBDIRS-$(CONFIG_LOMOUNT) += lomount
keir@16742 18 SUBDIRS-$(CONFIG_MINITERM) += miniterm
keir@16742 19 SUBDIRS := $(SUBDIRS-y)
keir@16742 20
keir@18546 21 INSTALL_BIN-y := xencons
keir@18546 22 INSTALL_BIN-$(CONFIG_X86) += xen-detect
keir@18546 23 INSTALL_BIN := $(INSTALL_BIN-y)
keir@18546 24
keir@19506 25 INSTALL_SBIN-y := netfix xm xen-bugtool xen-python-path xend xenperf xsview xenpm device-path
keir@18546 26 INSTALL_SBIN := $(INSTALL_SBIN-y)
iap10@771 27
keir@17831 28 DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
keir@17831 29 PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH)
keir@17831 30 INSTALL_PYTHON_PROG = $(XEN_ROOT)/tools/python/install-wrap \
keir@17831 31 "$(PYTHON_PATH)" $(INSTALL_PROG)
keir@17831 32
kaf24@9660 33 .PHONY: all
doogie@4109 34 all: build
kaf24@9660 35
kaf24@9660 36 .PHONY: build
doogie@4109 37 build: $(TARGETS)
keir@16742 38 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d; done
iap10@771 39
kaf24@9660 40 .PHONY: install
doogie@4109 41 install: build
keir@16843 42 $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
keir@16845 43 $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
keir@17830 44 $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
keir@17830 45 $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
keir@16742 46 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done
kaf24@972 47
kaf24@9660 48 .PHONY: clean
iap10@771 49 clean:
keir@19026 50 $(RM) *.o $(TARGETS) *~ $(DEPS)
keir@16742 51 set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
iap10@771 52
iap10@3657 53 %.o: %.c $(HDRS) Makefile
iap10@3657 54 $(CC) -c $(CFLAGS) -o $@ $<
iap10@3657 55
keir@18546 56 xenperf xenpm: %: %.o Makefile
keir@16910 57 $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl)
keir@19026 58
keir@19026 59 -include $(DEPS)