From b324e317311974fbbb9ba13548364213a7a7a41a Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 12 Jul 2012 15:40:43 -0700 Subject: glfsxmp: libgfapi based example This is an example application which uses libgfapi. It is a complete autotools based build system which demonstrates the required changes in configure.ac, Makefile.am etc to successfuly detect for and build an application against libgfapi. There are two approaches to building a libgfapi based application: 1. In the presence of pkg-config in your build system. This is the recommended approach which is also used in this example. For this approach to work, you need to build glusterfs by passing --pkgconfigdir=/usr/lib64/pkgconfig (or the appropriate directory) in your distro. This already happens if you build RPMs with the glusterfs.spec provided in glusterfs.git. You will also need to install glusterfs-api RPM. 2. In the absence of pkg-config in your build system. Make sure your LDFLAGS includes -L/path/to/lib where libgfapi.so is installed and -I/path/to/include/glusterfs where the 'api' directory Change-Id: Ic4eab2df002d7e8d20593a03e643859423048848 BUG: 839950 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.com/3666 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- api/examples/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 api/examples/Makefile.am (limited to 'api/examples/Makefile.am') diff --git a/api/examples/Makefile.am b/api/examples/Makefile.am new file mode 100644 index 00000000000..6048bb1c8b7 --- /dev/null +++ b/api/examples/Makefile.am @@ -0,0 +1,4 @@ +noinst_PROGRAMS = glfsxmp +glfsxmp_SOURCES = glfsxmp.c +glfsxmp_CFLAGS = $(GLFS_CFLAGS) -Wall +glfsxmp_LDADD = $(GLFS_LIBS) \ No newline at end of file -- cgit