debuggers.hg

view tools/blktap/lib/Makefile @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children 5c0bf00e371d
line source
1 XEN_ROOT = ../../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 MAJOR = 3.0
5 MINOR = 0
6 SONAME = libblktap.so.$(MAJOR)
8 CFLAGS += -I.
9 CFLAGS += $(CFLAGS_libxenctrl)
10 CFLAGS += $(CFLAGS_libxenstore)
11 LDFLAGS += $(LDFLAGS_libxenstore)
13 SRCS :=
14 SRCS += xenbus.c blkif.c xs_api.c
16 CFLAGS += -Werror
17 CFLAGS += -Wno-unused
18 CFLAGS += -fPIC
19 # get asprintf():
20 CFLAGS += -D _GNU_SOURCE
22 # Get gcc to generate the dependencies for us.
23 CFLAGS += -Wp,-MD,.$(@F).d
24 DEPS = .*.d
26 OBJS = $(SRCS:.c=.o)
27 OBJS_PIC = $(SRCS:.c=.opic)
28 IBINS :=
30 LIB = libblktap.a libblktap.so.$(MAJOR).$(MINOR)
32 .PHONY: all
33 all: $(LIB)
35 .PHONY: install
36 install: all
37 $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
38 $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
39 $(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIBDIR)
40 ln -sf libblktap.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libblktap.so.$(MAJOR)
41 ln -sf libblktap.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libblktap.so
42 $(INSTALL_DATA) blktaplib.h $(DESTDIR)$(INCLUDEDIR)
44 .PHONY: clean
45 clean:
46 rm -rf *.a *.so* *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS
48 libblktap.so.$(MAJOR).$(MINOR): $(OBJS_PIC)
49 $(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,$(SONAME) $(SHLIB_CFLAGS) \
50 $(LDFLAGS) -o $@ $^
51 ln -sf libblktap.so.$(MAJOR).$(MINOR) libblktap.so.$(MAJOR)
52 ln -sf libblktap.so.$(MAJOR) libblktap.so
54 libblktap.a: $(OBJS)
55 $(AR) rc $@ $^
57 .PHONY: TAGS
58 TAGS:
59 etags -t $(SRCS) *.h
61 -include $(DEPS)