diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-06-10 08:27:25 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-06-10 08:27:25 +0100 |
commit | bf955b60724dad9d02a136c21e13dab476f57052 (patch) | |
tree | 6602f9e39a8adc87ded9266922af1a275b94f6a8 /tools/blktap2 | |
parent | 486d4e64a0a039a85b5f0b5e07df23aef26f96d7 (diff) | |
download | xen-bf955b60724dad9d02a136c21e13dab476f57052.tar.gz xen-bf955b60724dad9d02a136c21e13dab476f57052.tar.bz2 xen-bf955b60724dad9d02a136c21e13dab476f57052.zip |
blktap2: Build libblktapctl.so
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Diffstat (limited to 'tools/blktap2')
-rw-r--r-- | tools/blktap2/control/Makefile | 23 | ||||
-rw-r--r-- | tools/blktap2/control/tap-ctl.h | 3 |
2 files changed, 17 insertions, 9 deletions
diff --git a/tools/blktap2/control/Makefile b/tools/blktap2/control/Makefile index 95cfc1bce4..16db94ec84 100644 --- a/tools/blktap2/control/Makefile +++ b/tools/blktap2/control/Makefile @@ -30,25 +30,34 @@ CTL_OBJS += tap-ctl-unpause.o CTL_OBJS += tap-ctl-major.o CTL_OBJS += tap-ctl-check.o -OBJS = $(CTL_OBJS) -LIBS = libblktapctl.a +CTL_PICS = $(patsubst %.o,%.opic,$(CTL_OBJS)) + +OBJS = $(CTL_OBJS) tap-ctl.o +PICS = $(CTL_PICS) + +LIBS = libblktapctl.a libblktapctl.so +IBIN = tap-ctl all: build -build: $(IBIN) +build: $(IBIN) $(LIBS) -tap-ctl: tap-ctl.o libblktapctl.a +tap-ctl: tap-ctl.o libblktapctl.so $(CC) $(CFLAGS) -o $@ $^ libblktapctl.a: $(CTL_OBJS) - ar r $@ $^ + $(AR) r $@ $^ + +libblktapctl.so: $(CTL_PICS) + $(CC) $(CFLAGS) -fPIC -shared -rdynamic $^ -o $@ -install: all +install: $(IBIN) $(LIBS) $(INSTALL_DIR) -p $(DESTDIR)$(SBINDIR) $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(SBINDIR) + $(INSTALL_PROG) $(LIBS) $(DESTDIR)$(LIBDIR) clean: - rm -f $(OBJS) $(DEPS) $(IBIN) $(LIBS) + rm -f $(OBJS) $(PICS) $(DEPS) $(IBIN) $(LIBS) rm -f *~ .PHONY: all build clean install diff --git a/tools/blktap2/control/tap-ctl.h b/tools/blktap2/control/tap-ctl.h index 96142e47ad..d951e774cb 100644 --- a/tools/blktap2/control/tap-ctl.h +++ b/tools/blktap2/control/tap-ctl.h @@ -30,8 +30,7 @@ #include <syslog.h> #include <errno.h> - -#include "tapdisk-message.h" +#include <tapdisk-message.h> extern int tap_ctl_debug; |