From 5d3d0bc59c1115117e6e624d12227d53a474b2ec Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 13 Mar 2017 14:01:24 +0100 Subject: build: use rpcgen to generate all XDR code Remove all generated files and have them generated when needed. This build a libgbrpcxdr.la archive with the .o files that gets linked into the libgbrpc.la archive. 'rpcgen' generates .c code that triggers warnings for various compilers. This is not something that can easily be fixed, so add rpc-pragmas.h (like GlusterFS does) to prevent these warnings. There are some functions used by gluster-blockd.c that are not part of the header and were manually added to block.h. Because block.h get regenerated now, these functions have been added to a new file block_svc.h. Note that generated and compiled files land in $(top_builddir). This directory does not need to be the same as $(top_srcdir). Change-Id: I0e764d159d6d785699537eed4e24b16883218038 Fixes: #2 Signed-off-by: Niels de Vos --- rpc/Makefile.am | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'rpc/Makefile.am') diff --git a/rpc/Makefile.am b/rpc/Makefile.am index 66717bb..4dd7439 100644 --- a/rpc/Makefile.am +++ b/rpc/Makefile.am @@ -1,16 +1,17 @@ -noinst_LTLIBRARIES = libgbxdr.la +SUBDIRS = rpcl -libgbxdr_la_SOURCES = block_clnt.c block_xdr.c block_svc.c \ - block_svc_routines.c glfs-operations.c +noinst_LTLIBRARIES = libgbrpc.la -noinst_HEADERS = block.h glfs-operations.h +libgbrpc_la_SOURCES = block_svc_routines.c glfs-operations.c -libgbxdr_la_CFLAGS = $(GFAPI_CFLAGS) -DDATADIR=\"$(localstatedir)\" \ - -I$(top_srcdir)/utils/ +noinst_HEADERS = glfs-operations.h -libgbxdr_la_LIBADD = $(GFAPI_LIBS) $(UUID) +libgbrpc_la_CFLAGS = $(GFAPI_CFLAGS) -DDATADIR=\"$(localstatedir)\" \ + -I$(top_srcdir)/utils/ -I$(top_builddir)/rpc/rpcl -libgbxdr_ladir = $(includedir)/gluster-block/rpc +libgbrpc_la_LIBADD = $(GFAPI_LIBS) $(UUID) rpcl/libgbrpcxdr.la + +libgbrpc_ladir = $(includedir)/gluster-block/rpc DISTCLEANFILES = Makefile.in -- cgit