ia64/xen-unstable

view tools/misc/Makefile @ 6422:e24fd7012ffb

merge?
author cl349@firebug.cl.cam.ac.uk
date Thu Aug 25 10:09:39 2005 +0000 (2005-08-25)
parents 2f20c2fce2c5 6e899a3840b2
children 4abd299ef2f6
line source
1 INSTALL = install
2 INSTALL_PROG = $(INSTALL) -m0755
3 INSTALL_DIR = $(INSTALL) -d -m0755
5 XEN_ROOT=../..
6 include $(XEN_ROOT)/tools/Rules.mk
8 CFLAGS += -Wall -Werror -O3
10 INCLUDES += -I $(XEN_XC)
11 INCLUDES += -I $(XEN_LIBXC)
12 CFLAGS += $(INCLUDES)
14 HDRS = $(wildcard *.h)
16 TARGETS = xenperf xc_shadow
18 INSTALL_BIN = $(TARGETS) xencons
19 INSTALL_SBIN = netfix xm xend xenperf
21 all: build
22 build: $(TARGETS)
23 $(MAKE) -C miniterm
24 $(MAKE) -C cpuperf
25 ifneq ($(XEN_TARGET_ARCH),ia64)
26 $(MAKE) -C mbootpack
27 endif
28 $(MAKE) -C lomount
30 install: build
31 [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
32 [ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
33 $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
34 $(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
35 $(MAKE) -C cpuperf install
36 $(MAKE) -C lomount install
37 # No sense in installing miniterm on the Xen box.
38 # $(MAKE) -C miniterm install
39 # Likewise mbootpack
40 # $(MAKE) -C mbootpack install
42 clean:
43 $(RM) *.o $(TARGETS) *~
44 $(MAKE) -C miniterm clean
45 $(MAKE) -C cpuperf clean
46 $(MAKE) -C mbootpack clean
47 $(MAKE) -C lomount clean
49 %.o: %.c $(HDRS) Makefile
50 $(CC) -c $(CFLAGS) -o $@ $<
52 $(TARGETS): %: %.o Makefile
53 $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl