ia64/xen-unstable

view tools/xcutils/Makefile @ 6435:b4b3f6be5226

merge?
author cl349@firebug.cl.cam.ac.uk
date Thu Aug 25 17:27:49 2005 +0000 (2005-08-25)
parents 0610add7c3fe fdfd511768a3
children 8799d14bef77 9312a3e8a6f8
line source
1 #
2 # tools/xcutils/Makefile
3 #
4 # This file is subject to the terms and conditions of the GNU General
5 # Public License. See the file "COPYING" in the main directory of
6 # this archive for more details.
7 #
8 # Copyright (C) 2005 by Christian Limpach
9 #
11 INSTALL = install
12 INSTALL_PROG = $(INSTALL) -m0755
13 INSTALL_DIR = $(INSTALL) -d -m0755
15 XEN_ROOT = ../..
16 include $(XEN_ROOT)/tools/Rules.mk
18 PROGRAMS_INSTALL_DIR = /usr/libexec/xen
20 INCLUDES += -I $(XEN_LIBXC)
22 CC := gcc
24 CFLAGS += -Wall -Werror -O3 -fno-strict-aliasing
25 CFLAGS += $(INCLUDES)
27 # Make gcc generate dependencies.
28 CFLAGS += -Wp,-MD,.$(@F).d
29 PROG_DEP = .*.d
31 PROGRAMS = xc_restore xc_save
33 LDLIBS = -L$(XEN_LIBXC) -lxenguest -lxenctrl
35 .PHONY: all
36 all: build
37 build: $(PROGRAMS)
39 $(PROGRAMS): %: %.o
40 $(LINK.o) $^ $(LDLIBS) -o $@
42 .PHONY: install
43 install: build
44 [ -d $(DESTDIR)$(PROGRAMS_INSTALL_DIR) ] || \
45 $(INSTALL_DIR) $(DESTDIR)$(PROGRAMS_INSTALL_DIR)
46 $(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PROGRAMS_INSTALL_DIR)
49 clean:
50 $(RM) *.o $(PROGRAMS)
51 $(RM) $(PROG_DEP)
53 -include $(PROG_DEP)