|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 9 of 9 RFC] blktap3: Introduce makefile that builds xenio-required tap-ctl functionality
This patch imports control/Makefile from the existing blktap2 implementation,
building only the binaries required by the xenio daemon. The rest of the
binaries will be re-introduced by a later patch.
Defines TAPDISK_EXEC, TAPDISK_EXECDIR, and TAPDISK_BUILDDIR are used by
tap-ctl-spawn, as it needs to know where the tapdisk binary is located in order
to spawn a tapdisk process
diff --git a/tools/blktap2/control/Makefile b/tools/blktap3/control/Makefile
copy from tools/blktap2/control/Makefile
copy to tools/blktap3/control/Makefile
--- a/tools/blktap2/control/Makefile
+++ b/tools/blktap3/control/Makefile
@@ -6,40 +6,36 @@ MINOR = 0
LIBNAME = libblktapctl
LIBSONAME = $(LIBNAME).so.$(MAJOR)
-IBIN = tap-ctl
+override CFLAGS += \
+ -I../include \
+ -DTAPDISK_EXEC='"tapdisk"' \
+ -DTAPDISK_EXECDIR='"/usr/local/libexec"' \
+ -DTAPDISK_BUILDDIR='"../drivers"' \
+ $(CFLAGS_xeninclude) \
+ $(CFLAGS_libxenctrl) \
+ -D_GNU_SOURCE \
+ -DTAPCTL \
+ -Wall \
+ -Wextra \
+ -Werror
+# FIXME cause trouble
+override CFLAGS += \
+ -Wno-type-limits \
+ -Wno-missing-field-initializers \
+ -Wno-sign-compare
-CFLAGS += -Werror
-CFLAGS += -Wno-unused
-CFLAGS += -I../include -I../drivers
-CFLAGS += $(CFLAGS_xeninclude)
-CFLAGS += $(CFLAGS_libxenctrl)
-CFLAGS += -D_GNU_SOURCE
-CFLAGS += -DTAPCTL
-
-CTL_OBJS := tap-ctl-ipc.o
CTL_OBJS += tap-ctl-list.o
-CTL_OBJS += tap-ctl-allocate.o
-CTL_OBJS += tap-ctl-free.o
-CTL_OBJS += tap-ctl-create.o
-CTL_OBJS += tap-ctl-destroy.o
+CTL_OBJS += tap-ctl-info.o
+CTL_OBJS += tap-ctl-xen.o
+CTL_OBJS += tap-ctl-ipc.o
CTL_OBJS += tap-ctl-spawn.o
-CTL_OBJS += tap-ctl-attach.o
-CTL_OBJS += tap-ctl-detach.o
-CTL_OBJS += tap-ctl-open.o
-CTL_OBJS += tap-ctl-close.o
-CTL_OBJS += tap-ctl-pause.o
-CTL_OBJS += tap-ctl-unpause.o
-CTL_OBJS += tap-ctl-major.o
-CTL_OBJS += tap-ctl-check.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)
-IBIN = tap-ctl
all: build
@@ -51,25 +47,21 @@ build: $(IBIN) $(LIB_STATIC) $(LIB_SHARE
$(LIBSONAME): $(LIB_SHARED)
ln -sf $< $@
-tap-ctl: tap-ctl.o $(LIBNAME).so
- $(CC) $(LDFLAGS) -o $@ $^
-
$(LIB_STATIC): $(CTL_OBJS)
$(AR) r $@ $^
$(LIB_SHARED): $(CTL_PICS)
$(CC) $(LDFLAGS) -fPIC -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME)
$(SHLIB_LDFLAGS) -rdynamic $^ -o $@
-install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
+install: $(LIB_STATIC) $(LIB_SHARED)
$(INSTALL_DIR) -p $(DESTDIR)$(SBINDIR)
- $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(SBINDIR)
$(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(LIBDIR)
$(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) $(DEPS) $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
+ rm -f $(PICS) $(DEPS) $(LIB_STATIC) $(LIB_SHARED)
rm -f $(LIBNAME).so $(LIBSONAME)
rm -f *~
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |