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

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



This patch introduces the Makefile that builds the tapback daemon. This
Makefile is not yet hooked into the build system.

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

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

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