debuggers.hg

view tools/blktap2/control/Makefile @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 94c6c51d2e05
children
line source
1 XEN_ROOT := ../../../
2 include $(XEN_ROOT)/tools/Rules.mk
4 MAJOR = 1.0
5 MINOR = 0
6 LIBNAME = libblktapctl
7 LIBSONAME = $(LIBNAME).so.$(MAJOR)
9 IBIN = tap-ctl
11 CFLAGS += -Werror
12 CFLAGS += -Wno-unused
13 CFLAGS += -I../include -I../drivers
14 CFLAGS += -I$(XEN_INCLUDE) -I$(XEN_LIBXC)
15 CFLAGS += -D_GNU_SOURCE
16 CFLAGS += -DTAPCTL
18 # Get gcc to generate the dependencies for us.
19 CFLAGS += -Wp,-MD,.$(@F).d
20 DEPS = .*.d
22 CTL_OBJS := tap-ctl-ipc.o
23 CTL_OBJS += tap-ctl-list.o
24 CTL_OBJS += tap-ctl-allocate.o
25 CTL_OBJS += tap-ctl-free.o
26 CTL_OBJS += tap-ctl-create.o
27 CTL_OBJS += tap-ctl-destroy.o
28 CTL_OBJS += tap-ctl-spawn.o
29 CTL_OBJS += tap-ctl-attach.o
30 CTL_OBJS += tap-ctl-detach.o
31 CTL_OBJS += tap-ctl-open.o
32 CTL_OBJS += tap-ctl-close.o
33 CTL_OBJS += tap-ctl-pause.o
34 CTL_OBJS += tap-ctl-unpause.o
35 CTL_OBJS += tap-ctl-major.o
36 CTL_OBJS += tap-ctl-check.o
38 CTL_PICS = $(patsubst %.o,%.opic,$(CTL_OBJS))
40 OBJS = $(CTL_OBJS) tap-ctl.o
41 PICS = $(CTL_PICS)
43 LIB_STATIC = $(LIBNAME).a
44 LIB_SHARED = $(LIBSONAME).$(MINOR)
45 IBIN = tap-ctl
47 all: build
49 build: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
51 $(LIBNAME).so: $(LIBSONAME)
52 ln -sf $< $@
54 $(LIBSONAME): $(LIB_SHARED)
55 ln -sf $< $@
57 tap-ctl: tap-ctl.o $(LIBNAME).so
58 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
60 $(LIB_STATIC): $(CTL_OBJS)
61 $(AR) r $@ $^
63 $(LIB_SHARED): $(CTL_PICS)
64 $(CC) $(CFLAGS) $(LDFLAGS) -fPIC -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) $(SHLIB_LDFLAGS) -rdynamic $^ -o $@
66 install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
67 $(INSTALL_DIR) -p $(DESTDIR)$(SBINDIR)
68 $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(SBINDIR)
69 $(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(LIBDIR)
70 $(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(LIBDIR)
71 ln -sf $(LIBSONAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so
72 ln -sf $(LIB_SHARED) $(DESTDIR)$(LIBDIR)/$(LIBSONAME)
74 clean:
75 rm -f $(OBJS) $(PICS) $(DEPS) $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
76 rm -f $(LIBNAME).so $(LIBSONAME)
77 rm -f *~
79 .PHONY: all build clean install
81 -include $(DEPS)