From 92ccb288e388fb7fbdb9944999ad20ff7e2f13c3 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Wed, 5 Jul 2017 05:31:14 -0700 Subject: gfapi: build a *working* glfsxmp to show how it's done Summary: Previously, glfsxmp would fail way down in XDR code. The reasons are still a bit unclear, but exactly duplicating the build flags etc. we use for other programs seems to fix the issue. With this change, we have one example of one set of flags that can be used to build other GFAPI programs. This is a port of D5370316 to 3.8 Reviewed By: sshreyas Change-Id: I74535a791545189f829f10f04caf34a8a07295f7 Reviewed-on: https://review.gluster.org/18240 Reviewed-by: Shreyas Siravara CentOS-regression: Gluster Build System Smoke: Gluster Build System --- api/examples/Makefile.am | 17 ++++++++++++++--- api/examples/glfsxmp.c | 4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'api') diff --git a/api/examples/Makefile.am b/api/examples/Makefile.am index 7112c81d6a7..6c8a94aeb14 100644 --- a/api/examples/Makefile.am +++ b/api/examples/Makefile.am @@ -1,6 +1,17 @@ # The bits needed for glfsxmp -EXTRA_PROGRAMS = glfsxmp +noinst_PROGRAMS = glfsxmp glfsxmp_SOURCES = glfsxmp.c -glfsxmp_CFLAGS = $(GLFS_CFLAGS) -Wall -glfsxmp_LDADD = $(GLFS_LIBS) -lrt +glfsxmp_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(GF_LDADD) \ + $(top_builddir)/api/src/libgfapi.la \ + $(RLLIBS) $(top_builddir)/rpc/xdr/src/libgfxdr.la \ + $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \ + $(XML_LIBS) + +glfsxmp_LDFLAGS = $(GF_LDFLAGS) +AM_CPPFLAGS = $(GF_CPPFLAGS) \ + -I$(top_srcdir)/api/src \ + -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src\ + -I$(top_srcdir)/rpc/xdr/src + +AM_CFLAGS = -Wall $(GF_CFLAGS) diff --git a/api/examples/glfsxmp.c b/api/examples/glfsxmp.c index 7ff3f0eb7ee..396abc65639 100644 --- a/api/examples/glfsxmp.c +++ b/api/examples/glfsxmp.c @@ -1,8 +1,8 @@ #include #include #include -#include "api/glfs.h" -#include "api/glfs-handles.h" +#include "glfs.h" +#include "glfs-handles.h" #include #include -- cgit