debuggers.hg

view tools/blktap2/vhd/lib/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 LIBVHD-MAJOR = 1.0
6 LIBVHD-MINOR = 0
7 LIBVHD-SONAME = libvhd.so.$(LIBVHD-MAJOR)
9 LVM-UTIL-OBJ := $(BLKTAP_ROOT)/lvm/lvm-util.o
11 LIBVHD-BUILD := libvhd.a
13 INST-DIR = $(LIBDIR)
15 CFLAGS += -Werror
16 CFLAGS += -Wno-unused
17 CFLAGS += -I../../include
18 CFLAGS += -D_GNU_SOURCE
19 CFLAGS += -fPIC
20 CFLAGS += -g
22 ifeq ($(CONFIG_Linux),y)
23 LIBS := -luuid
24 endif
26 # Get gcc to generate the dependencies for us.
27 CFLAGS += -Wp,-MD,.$(@F).d
28 DEPS = .*.d
30 LIB-SRCS := libvhd.c
31 LIB-SRCS += libvhd-journal.c
32 LIB-SRCS += vhd-util-coalesce.c
33 LIB-SRCS += vhd-util-create.c
34 LIB-SRCS += vhd-util-fill.c
35 LIB-SRCS += vhd-util-modify.c
36 LIB-SRCS += vhd-util-query.c
37 LIB-SRCS += vhd-util-read.c
38 LIB-SRCS += vhd-util-repair.c
39 LIB-SRCS += vhd-util-resize.c
40 LIB-SRCS += vhd-util-revert.c
41 LIB-SRCS += vhd-util-set-field.c
42 LIB-SRCS += vhd-util-snapshot.c
43 LIB-SRCS += vhd-util-scan.c
44 LIB-SRCS += vhd-util-check.c
45 LIB-SRCS += relative-path.c
46 LIB-SRCS += atomicio.c
48 LIB-OBJS = $(patsubst %.c,%.o,$(LIB-SRCS))
49 LIB-OBJS += $(LVM-UTIL-OBJ)
51 LIBVHD = libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR)
53 all: build
55 build: $(LIBVHD-BUILD)
57 libvhd.a: $(LIB-OBJS)
58 $(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG),$(LIBVHD-SONAME) $(SHLIB_CFLAGS) \
59 $(LDFLAGS) -o libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(LIBS) $^
60 ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) libvhd.so.$(LIBVHD-MAJOR)
61 ln -sf libvhd.so.$(LIBVHD-MAJOR) libvhd.so
62 $(AR) rc $@ $^
64 install: all
65 $(INSTALL_DIR) -p $(DESTDIR)$(INST-DIR)
66 $(INSTALL_DATA) $(LIBVHD) $(DESTDIR)$(INST-DIR)
67 ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR)
68 ln -sf libvhd.so.$(LIBVHD-MAJOR) $(DESTDIR)$(INST-DIR)/libvhd.so
70 clean:
71 rm -rf *.a *.so* *.o *~ $(DEPS) $(LIBVHD)
73 .PHONY: all build clean install libvhd
75 -include $(DEPS)