Description: Adapt tools/blktap2 libs Makefiles for Debian based build system Enables build from simple debian/rules based build system. Backported from debian Xen-4.0 sources to replace older required similar patch fix-blktap2.diff from http://virtualusr.wordpress.com/2010/07/14/xen-4-0-rc-source-kernels-packaged-for-ubuntu/ Drivers: User Virtual URL: http://virtualusr.wordpress.com Origin: http://patch-tracker.debian.org/patch/series/view/xen/4.0.1-1/tools-blktap2-libs.patch Index: xen-4.0-4.0.1/tools/blktap2/Makefile =================================================================== --- xen-4.0-4.0.1.orig/tools/blktap2/Makefile 2010-08-25 10:22:42.000000000 +0200 +++ xen-4.0-4.0.1/tools/blktap2/Makefile 2011-01-04 19:08:18.186455878 +0100 @@ -1,9 +1,6 @@ XEN_ROOT = ../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += $(CFLAGS_libxenctrl) -LDFLAGS += $(LDFLAGS_libxenctrl) - SUBDIRS-y := SUBDIRS-y += include SUBDIRS-y += lvm Index: xen-4.0-4.0.1/tools/blktap2/vhd/Makefile =================================================================== --- xen-4.0-4.0.1.orig/tools/blktap2/vhd/Makefile 2010-08-25 10:22:42.000000000 +0200 +++ xen-4.0-4.0.1/tools/blktap2/vhd/Makefile 2011-01-04 19:08:18.186455878 +0100 @@ -12,6 +12,7 @@ CFLAGS += -Wno-unused CFLAGS += -I../include CFLAGS += -D_GNU_SOURCE +CFLAGS += $(CFLAGS_libxenctrl) ifeq ($(CONFIG_X86_64),y) CFLAGS += -fPIC Index: xen-4.0-4.0.1/tools/blktap2/vhd/lib/Makefile =================================================================== --- xen-4.0-4.0.1.orig/tools/blktap2/vhd/lib/Makefile 2010-08-25 10:22:42.000000000 +0200 +++ xen-4.0-4.0.1/tools/blktap2/vhd/lib/Makefile 2011-01-04 19:08:18.186455878 +0100 @@ -18,10 +18,12 @@ CFLAGS += -D_GNU_SOURCE CFLAGS += -fPIC CFLAGS += -g +CFLAGS += $(CFLAGS_libxenctrl) ifeq ($(CONFIG_Linux),y) LIBS := -luuid endif +LDFLAGS += $(LDFLAGS_libxenctrl) # Get gcc to generate the dependencies for us. CFLAGS += -Wp,-MD,.$(@F).d