[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 14 of 16 RFC] blktap3: Provide Makefile for compiling the blktap3 control library



On Wed, 2012-10-24 at 18:02 +0100, Thanos Makatos wrote:
> This library will be used by libxl to create/destroy tapdisks.
> 
> diff -r 092fce05f530 -r 9f5d1f1f9791 tools/blktap3/control/Makefile
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/tools/blktap3/control/Makefile  Wed Oct 24 17:27:38 2012 +0100
> @@ -0,0 +1,57 @@
> +XEN_ROOT := $(CURDIR)/../../../
> +include $(XEN_ROOT)/tools/Rules.mk
> +
> +LIBDIR ?= /usr/lib

This comes from configure via config/Tools.mk now.

> +
> +MAJOR = 1.0
> +MINOR = 0
> +LIBNAME = libblktapctl
> +LIBSONAME = $(LIBNAME).so.$(MAJOR)
> +
> +override CFLAGS += \
> +     -I ../include \
> +     $(CFLAGS_xeninclude)
> +
> +CTL_OBJS = \
> +                tap-ctl-destroy.o \
> +                tap-ctl-create.o \
> +                tap-ctl-list.o
> +
> +CTL_PICS  = $(patsubst %.o,%.opic,$(CTL_OBJS))
> +
> +OBJS = $(CTL_OBJS) tap-ctl.o
> +PICS = $(CTL_PICS)
> +
> +LIB_STATIC = $(LIBNAME).a
> +LIB_SHARED = $(LIBSONAME).$(MINOR)
> +
> +all: build
> +
> +build: $(LIB_STATIC) $(LIB_SHARED)
> +
> +$(LIBNAME).so: $(LIBSONAME)
> +     ln -sf $< $@
> +
> +$(LIBSONAME): $(LIB_SHARED)
> +     ln -sf $< $@
> +
> +$(LIB_STATIC): $(CTL_OBJS)
> +     $(AR) r $@ $^
> +
> +$(LIB_SHARED): $(CTL_PICS)
> +     $(CC) $(LDFLAGS) -fPIC  -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) \
> +             $(SHLIB_LDFLAGS) -rdynamic $^ -o $@
> +
> +# TODO install in /usr/sbin?
> +install: $(LIB_STATIC) $(LIB_SHARED)
> +     $(INSTALL_DIR) -p $(DESTDIR)$(SBINDIR)

Was this intended to be LIBDIR? At least until the TODO is resolved.

> +     $(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(LIBDIR)
> +     ln -sf $(LIBSONAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so
> +     ln -sf $(LIB_SHARED) $(DESTDIR)$(LIBDIR)/$(LIBSONAME)
> +
> +clean:
> +     rm -f $(OBJS) $(PICS) $(LIB_STATIC) $(LIB_SHARED)
> +     rm -f $(LIBNAME).so $(LIBSONAME)
> +     rm -f *~
> +
> +.PHONY: all build clean install
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.