1
0
mirror of https://github.com/gluster/glusterfs.git synced 2026-02-06 00:49:30 +01:00
Files
glusterfs/api/examples
Yaniv Kaul 3b00855b0f Multiple files: reduce the number of include statements (#3141)
We have hundreds of redundant, or unused #include statements in the code. I have a WIP patch to remove many of them
We have several that are circular (include A calls B which calls A ...)
We have some unused statements in popular include file (glusterd.h is a good example).
The end goal would be to reduce the no. of include statements, include what's needed,
and thus improve code readability, maintainability and hopefully reduce compilation times.

Note: it is still not pretty, but it's a good step towards really including what is needed, per file/modulex/xlator/...

Updates: #3130
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
2022-02-12 10:06:42 +05:30
..
2012-07-12 15:40:43 -07:00
2012-07-12 15:40:43 -07:00
2018-08-29 11:09:27 -04:00

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
containing the headers are available.

glfsxmp.c
=========

glfsxmp.c is an example application which uses libgfapi

Compilation Steps For glfsxmp.c
===============================

1. $./autogen.sh
2. $./configure

Note: Before running ./configure , as mentioned above, you need to
      take care of #1 or #2 i.e. pkg-config path or LDFLAGS and
      -I/<path> with correct values.

3. $make glfsxmp