source: trunk/packages/xen-common/xen-common/tools/misc/Makefile @ 95

Last change on this file since 95 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 1.0 KB
RevLine 
[34]1XEN_ROOT=../..
2include $(XEN_ROOT)/tools/Rules.mk
3
4CFLAGS   += -Werror
5
6INCLUDES += -I $(XEN_XC)
7INCLUDES += -I $(XEN_LIBXC)
8CFLAGS   += $(INCLUDES)
9
10HDRS     = $(wildcard *.h)
11
12TARGETS-y := xenperf
13TARGETS-$(CONFIG_X86) += xen-detect
14TARGETS := $(TARGETS-y)
15
16INSTALL_BIN  = $(TARGETS) xencons
17INSTALL_SBIN = netfix xm xen-bugtool xen-python-path xend xenperf
18
19.PHONY: all
20all: build
21
22.PHONY: build
23build: $(TARGETS)
24        $(MAKE) -C miniterm
25        $(MAKE) -C lomount
26
27.PHONY: install
28install: build
29        [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
30        [ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
31        $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
32        $(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
33        $(MAKE) -C lomount install
34#       No sense in installing miniterm on the Xen box.
35#       $(MAKE) -C miniterm install
36
37.PHONY: clean
38clean:
39        $(RM) *.o $(TARGETS) *~
40        $(MAKE) -C miniterm clean
41        $(MAKE) -C lomount clean
42
43%.o: %.c $(HDRS) Makefile
44        $(CC) -c $(CFLAGS) -o $@ $<
45
46xenperf: %: %.o Makefile
47        $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl
Note: See TracBrowser for help on using the repository browser.