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

[Xen-devel] [PATCH 7 of 7 v5] blktap3/tapback: Introduce tapback daemon Makefile



This patch introduces the Makefile that builds the tapback daemon.

Signed-off-by: Thanos Makatos <thanos.makatos@xxxxxxxxxx>

---
Changed since v2:
  * Use $(BINDIR) as the daemon's installation directory.
  * Fixed whitespace.

Changed since v3:
  * Explicitly use libblktapctl.3 to avoid conflicts with the blktap2 one.
  * Merge patch that adds the tapback binary to the mercurial ignore list into
    this patch.

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -375,3 +375,6 @@
 ^unmodified_drivers/linux-2.6/.*\.ko$
 ^unmodified_drivers/linux-2.6/.*\.mod\.c$
 ^LibVNCServer.*
+
+# blktap3
+^tools/blktap3/tapback/tapback$
diff --git a/tools/blktap3/tapback/Makefile b/tools/blktap3/tapback/Makefile
--- a/tools/blktap3/tapback/Makefile
+++ b/tools/blktap3/tapback/Makefile
@@ -3,6 +3,10 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 BLKTAP_ROOT := ..
 
+INST_DIR ?= $(BINDIR)
+
+IBIN = tapback
+
 # -D_GNU_SOURCE is required by vasprintf.
 override CFLAGS += \
     -I$(BLKTAP_ROOT)/include \
@@ -25,7 +29,20 @@ override LDFLAGS += \
     $(LDLIBS_libxenstore) \
     $(LDFLAGS_libxenctrl)
 
+TAPBACK-OBJS := log.o xenstore.o frontend.o backend.o
+
+TAPBACK-LIBS := $(BLKTAP_ROOT)/control/libblktapctl.so.3.0
+
+all: $(IBIN)
+
+$(IBIN): $(TAPBACK-OBJS) tapback.o
+       $(CC) -o $@ $^ $(TAPBACK-LIBS) $(LDFLAGS)
+
+install: all
+       $(INSTALL_DIR) -p $(DESTDIR)$(INST_DIR)
+       $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(INST_DIR)
+
 clean:
-       rm -f *.o *.o.d .*.o.d
+       rm -f *.o *.o.d .*.o.d $(IBIN)
 
 .PHONY: clean install

_______________________________________________
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®.