debuggers.hg

view tools/blktap2/vhd/Makefile @ 20939:845d04d505d0

tools: Do not append trailing slash to XEN_ROOT in Makefiles

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 04 09:03:42 2010 +0000 (2010-02-04)
parents b7f73a7f3078
children d3de6f484610
line source
1 XEN_ROOT=../../..
2 BLKTAP_ROOT := ..
3 include $(XEN_ROOT)/tools/Rules.mk
5 SUBDIRS-y :=
6 SUBDIRS-y += lib
8 IBIN = vhd-util vhd-update
9 INST_DIR = $(SBINDIR)
11 CFLAGS += -Werror
12 CFLAGS += -Wno-unused
13 CFLAGS += -I../include
14 CFLAGS += -D_GNU_SOURCE
16 ifeq ($(CONFIG_X86_64),y)
17 CFLAGS += -fPIC
18 endif
20 ifeq ($(VHD_STATIC),y)
21 CFLAGS += -static
22 endif
24 LIBS := -Llib -lvhd
25 ifeq ($(CONFIG_Linux),y)
26 LIBS += -luuid
27 endif
29 # Get gcc to generate the dependencies for us.
30 CFLAGS += -Wp,-MD,.$(@F).d
31 DEPS = .*.d
33 all: subdirs-all build
35 build: $(IBIN)
37 LIBS_DEPENDS := lib/libvhd.so lib/vhd.a
38 $(LIBS_DEPENDS):subdirs-all
40 vhd-util: vhd-util.o $(LIBS_DEPENDS)
41 $(CC) $(CFLAGS) -o vhd-util vhd-util.o $(LDFLAGS) $(LIBS)
43 vhd-update: vhd-update.o $(LIBS_DEPENDS)
44 $(CC) $(CFLAGS) -o vhd-update vhd-update.o $(LDFLAGS) $(LIBS)
46 install: all
47 $(MAKE) subdirs-install
48 $(INSTALL_DIR) -p $(DESTDIR)$(INST_DIR)
49 $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(INST_DIR)
51 clean: subdirs-clean
52 rm -rf *.o *~ $(DEPS) $(IBIN)
54 .PHONY: all build clean install vhd-util vhd-update
56 -include $(DEPS)