diff options
author | Jeff Darcy <jdarcy@fb.com> | 2017-07-05 05:31:14 -0700 |
---|---|---|
committer | Shreyas Siravara <sshreyas@fb.com> | 2017-09-08 04:42:17 +0000 |
commit | 92ccb288e388fb7fbdb9944999ad20ff7e2f13c3 (patch) | |
tree | 1e5275ab2fd67ebde6c602c132f84bb3f91705c9 | |
parent | 8b6804f75cda612d13e3a691b3f9698028b2577d (diff) |
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 <sshreyas@fb.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r-- | api/examples/Makefile.am | 17 | ||||
-rw-r--r-- | api/examples/glfsxmp.c | 4 |
2 files changed, 16 insertions, 5 deletions
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 <stdio.h> #include <stdlib.h> #include <errno.h> -#include "api/glfs.h" -#include "api/glfs-handles.h" +#include "glfs.h" +#include "glfs-handles.h" #include <string.h> #include <time.h> |