[PATCH 1/6] build: use CPPFLAGS consistently throughout the tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do not needlessy leak preprocessor flags into CFLAGS.

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxx>
---
 api/src/Makefile.am                               |   10 +++++-----
 libglusterfs/src/Makefile.am                      |    4 ++--
 rpc/rpc-lib/src/Makefile.am                       |    7 ++++---
 rpc/rpc-transport/rdma/src/Makefile.am            |    6 ++++--
 rpc/rpc-transport/socket/src/Makefile.am          |    8 +++++---
 rpc/xdr/src/Makefile.am                           |    4 ++--
 xlators/cluster/afr/src/Makefile.am               |    6 ++++--
 xlators/cluster/dht/src/Makefile.am               |    7 ++++---
 xlators/cluster/ha/src/Makefile.am                |    6 ++++--
 xlators/cluster/map/src/Makefile.am               |    6 ++++--
 xlators/cluster/stripe/src/Makefile.am            |    7 ++++---
 xlators/debug/error-gen/src/Makefile.am           |    6 ++++--
 xlators/debug/io-stats/src/Makefile.am            |    6 ++++--
 xlators/debug/trace/src/Makefile.am               |    6 ++++--
 xlators/encryption/rot-13/src/Makefile.am         |    6 ++++--
 xlators/features/filter/src/Makefile.am           |    6 ++++--
 xlators/features/index/src/Makefile.am            |    6 ++++--
 xlators/features/locks/src/Makefile.am            |    7 ++++---
 xlators/features/mac-compat/src/Makefile.am       |    6 ++++--
 xlators/features/marker/src/Makefile.am           |    6 ++++--
 xlators/features/marker/utils/src/Makefile.am     |    9 +++++----
 xlators/features/path-convertor/src/Makefile.am   |    6 ++++--
 xlators/features/quiesce/src/Makefile.am          |    6 ++++--
 xlators/features/quota/src/Makefile.am            |    6 ++++--
 xlators/features/read-only/src/Makefile.am        |    6 ++++--
 xlators/features/trash/src/Makefile.am            |    6 ++++--
 xlators/mgmt/glusterd/src/Makefile.am             |   20 +++++++++++---------
 xlators/mount/fuse/src/Makefile.am                |    7 ++++---
 xlators/nfs/server/src/Makefile.am                |    9 +++++----
 xlators/performance/io-cache/src/Makefile.am      |    6 ++++--
 xlators/performance/io-threads/src/Makefile.am    |    6 ++++--
 xlators/performance/md-cache/src/Makefile.am      |    6 ++++--
 xlators/performance/quick-read/src/Makefile.am    |    6 ++++--
 xlators/performance/read-ahead/src/Makefile.am    |    6 ++++--
 xlators/performance/symlink-cache/src/Makefile.am |    6 ++++--
 xlators/performance/write-behind/src/Makefile.am  |    6 ++++--
 xlators/protocol/auth/addr/src/Makefile.am        |    8 +++++---
 xlators/protocol/auth/login/src/Makefile.am       |    6 ++++--
 xlators/protocol/client/src/Makefile.am           |    8 +++++---
 xlators/protocol/server/src/Makefile.am           |   12 ++++++------
 xlators/storage/posix/src/Makefile.am             |   10 ++++++----
 xlators/system/posix-acl/src/Makefile.am          |   11 +++++++----
 42 files changed, 184 insertions(+), 114 deletions(-)

diff --git a/api/src/Makefile.am b/api/src/Makefile.am
index f5fb9e7..a63ed5e 100644
--- a/api/src/Makefile.am
+++ b/api/src/Makefile.am
@@ -10,9 +10,7 @@ libgfapi_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 	$(top_builddir)/rpc/xdr/src/libgfxdr.la \
 	$(GF_LDADD)
 
-libgfapi_la_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -D_GNU_SOURCE \
-	-D$(GF_HOST_OS) $(GF_CFLAGS) \
-	-I$(top_srcdir)/libglusterfs/src \
+libgfapi_la_CPPFLAGS = $(AM_CPPFLAGS) -D__USE_FILE_OFFSET64 \
 	-I$(top_srcdir)/rpc/rpc-lib/src \
 	-I$(top_srcdir)/rpc/xdr/src
 libgfapi_la_LDFLAGS = -shared -nostartfiles
@@ -26,5 +24,7 @@ api_la_SOURCES = glfs-master.c
 api_la_LDFLAGS = -module -avoidversion
 api_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) -Wall \
-	-I$(top_srcdir)/libglusterfs/src $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index 0921a29..4346f2a 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -1,7 +1,7 @@
-libglusterfs_la_CFLAGS = -fPIC  -Wall -shared -nostartfiles $(GF_CFLAGS) \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS) \
 	$(GF_DARWIN_LIBGLUSTERFS_CFLAGS)
 
-libglusterfs_la_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 \
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 \
 	-D_GNU_SOURCE -DXLATORDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator\" \
 	-D$(GF_HOST_OS) -I$(CONTRIBDIR)/rbtree
 
diff --git a/rpc/rpc-lib/src/Makefile.am b/rpc/rpc-lib/src/Makefile.am
index 8b08730..874c20f 100644
--- a/rpc/rpc-lib/src/Makefile.am
+++ b/rpc/rpc-lib/src/Makefile.am
@@ -8,9 +8,10 @@ libgfrpc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 noinst_HEADERS = rpcsvc.h rpc-transport.h xdr-common.h xdr-rpc.h xdr-rpcclnt.h \
 	rpc-clnt.h rpcsvc-common.h protocol-common.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) \
-	-I$(top_srcdir)/rpc/xdr/src \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src \
 	-DRPC_TRANSPORTDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport\"
 
 CLEANFILES = *~
diff --git a/rpc/rpc-transport/rdma/src/Makefile.am b/rpc/rpc-transport/rdma/src/Makefile.am
index b4b940b..15c02f7 100644
--- a/rpc/rpc-transport/rdma/src/Makefile.am
+++ b/rpc/rpc-transport/rdma/src/Makefile.am
@@ -13,8 +13,10 @@ noinst_HEADERS = rdma.h name.h
 	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src/ \
 	-I$(top_srcdir)/xlators/protocol/lib/src/ -shared -nostartfiles $(GF_CFLAGS)
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)  \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
 	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src/ \
-	-I$(top_srcdir)/rpc/xdr/src -shared -nostartfiles $(GF_CFLAGS)
+	-I$(top_srcdir)/rpc/xdr/src
 
 CLEANFILES = *~
diff --git a/rpc/rpc-transport/socket/src/Makefile.am b/rpc/rpc-transport/socket/src/Makefile.am
index 3d1631a..15a6304 100644
--- a/rpc/rpc-transport/socket/src/Makefile.am
+++ b/rpc/rpc-transport/socket/src/Makefile.am
@@ -8,8 +8,10 @@ socket_la_LDFLAGS = -module -avoidversion -lssl
 socket_la_SOURCES = socket.c name.c
 socket_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src/ \
-	-I$(top_srcdir)/rpc/xdr/src/ -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src \
+	-I$(top_srcdir)/rpc/xdr/src
 
 CLEANFILES = *~
diff --git a/rpc/xdr/src/Makefile.am b/rpc/xdr/src/Makefile.am
index d598cb4..33a2a95 100644
--- a/rpc/xdr/src/Makefile.am
+++ b/rpc/xdr/src/Makefile.am
@@ -1,8 +1,8 @@
 lib_LTLIBRARIES = libgfxdr.la
 
-libgfxdr_la_CFLAGS = -fPIC  -Wall -shared -nostartfiles $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS)
 
-libgfxdr_la_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 \
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 \
 			-D_GNU_SOURCE -D$(GF_HOST_OS) \
 			-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src
 
diff --git a/xlators/cluster/afr/src/Makefile.am b/xlators/cluster/afr/src/Makefile.am
index 95db5dd..9e739ac 100644
--- a/xlators/cluster/afr/src/Makefile.am
+++ b/xlators/cluster/afr/src/Makefile.am
@@ -21,9 +21,11 @@ noinst_HEADERS = afr.h afr-transaction.h afr-inode-write.h afr-inode-read.h \
 	afr-self-heald.h $(top_builddir)/xlators/lib/src/libxlator.h \
 	$(top_builddir)/glusterfsd/src/glusterfsd.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
 	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/xlators/lib/src \
-	-I$(top_srcdir)/rpc/rpc-lib/src -shared -nostartfiles $(GF_CFLAGS)
+	-I$(top_srcdir)/rpc/rpc-lib/src
 
 CLEANFILES =
 
diff --git a/xlators/cluster/dht/src/Makefile.am b/xlators/cluster/dht/src/Makefile.am
index e35058d..0541ed9 100644
--- a/xlators/cluster/dht/src/Makefile.am
+++ b/xlators/cluster/dht/src/Makefile.am
@@ -24,9 +24,10 @@ switch_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 noinst_HEADERS = dht-common.h dht-mem-types.h \
 	$(top_builddir)/xlators/lib/src/libxlator.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) \
-	-I$(top_srcdir)/xlators/lib/src
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/xlators/lib/src
 
 CLEANFILES =
 
diff --git a/xlators/cluster/ha/src/Makefile.am b/xlators/cluster/ha/src/Makefile.am
index 5f78a29..36e7be3 100644
--- a/xlators/cluster/ha/src/Makefile.am
+++ b/xlators/cluster/ha/src/Makefile.am
@@ -8,8 +8,10 @@ ha_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = ha.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	    -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/cluster/map/src/Makefile.am b/xlators/cluster/map/src/Makefile.am
index 26e1913..9d3815a 100644
--- a/xlators/cluster/map/src/Makefile.am
+++ b/xlators/cluster/map/src/Makefile.am
@@ -8,8 +8,10 @@ map_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = map.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	    -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/cluster/stripe/src/Makefile.am b/xlators/cluster/stripe/src/Makefile.am
index 8c48d34..5787670 100644
--- a/xlators/cluster/stripe/src/Makefile.am
+++ b/xlators/cluster/stripe/src/Makefile.am
@@ -11,9 +11,10 @@ stripe_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = stripe.h stripe-mem-types.h $(top_builddir)/xlators/lib/src/libxlator.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) \
-	-I$(top_srcdir)/xlators/lib/src
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/xlators/lib/src
 
 CLEANFILES = 
 
diff --git a/xlators/debug/error-gen/src/Makefile.am b/xlators/debug/error-gen/src/Makefile.am
index df90803..2f234c0 100644
--- a/xlators/debug/error-gen/src/Makefile.am
+++ b/xlators/debug/error-gen/src/Makefile.am
@@ -9,8 +9,10 @@ error_gen_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = error-gen.h error-gen-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/debug/io-stats/src/Makefile.am b/xlators/debug/io-stats/src/Makefile.am
index b894e79..2befeb7 100644
--- a/xlators/debug/io-stats/src/Makefile.am
+++ b/xlators/debug/io-stats/src/Makefile.am
@@ -9,7 +9,9 @@ io_stats_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = io-stats-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES =
diff --git a/xlators/debug/trace/src/Makefile.am b/xlators/debug/trace/src/Makefile.am
index 0f1679a..8367a79 100644
--- a/xlators/debug/trace/src/Makefile.am
+++ b/xlators/debug/trace/src/Makefile.am
@@ -7,8 +7,10 @@ trace_la_LDFLAGS = -module -avoidversion
 trace_la_SOURCES = trace.c
 trace_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/encryption/rot-13/src/Makefile.am b/xlators/encryption/rot-13/src/Makefile.am
index ba5e623..e0c02d6 100644
--- a/xlators/encryption/rot-13/src/Makefile.am
+++ b/xlators/encryption/rot-13/src/Makefile.am
@@ -8,7 +8,9 @@ rot_13_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = rot-13.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
diff --git a/xlators/features/filter/src/Makefile.am b/xlators/features/filter/src/Makefile.am
index d473b9e..146ac7d 100644
--- a/xlators/features/filter/src/Makefile.am
+++ b/xlators/features/filter/src/Makefile.am
@@ -8,8 +8,10 @@ filter_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = filter-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/features/index/src/Makefile.am b/xlators/features/index/src/Makefile.am
index 5d037c7..870ace8 100644
--- a/xlators/features/index/src/Makefile.am
+++ b/xlators/features/index/src/Makefile.am
@@ -8,8 +8,10 @@ index_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = index.h index-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
 	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src \
-	-I$(top_srcdir)/rpc/rpc-lib/src -shared -nostartfiles $(GF_CFLAGS)
+	-I$(top_srcdir)/rpc/rpc-lib/src
 
 CLEANFILES =
diff --git a/xlators/features/locks/src/Makefile.am b/xlators/features/locks/src/Makefile.am
index e396768..100cd91 100644
--- a/xlators/features/locks/src/Makefile.am
+++ b/xlators/features/locks/src/Makefile.am
@@ -9,9 +9,10 @@ locks_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = locks.h common.h locks-mem-types.h clear.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall \
-	-fno-strict-aliasing -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src $(GF_CFLAGS) -shared -nostartfiles
+AM_CFLAGS = -fPIC -Wall -fno-strict-aliasing $(GF_CFLAGS) -shared -nostartfiles
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/features/mac-compat/src/Makefile.am b/xlators/features/mac-compat/src/Makefile.am
index 915c13e..8fd5edf 100644
--- a/xlators/features/mac-compat/src/Makefile.am
+++ b/xlators/features/mac-compat/src/Makefile.am
@@ -6,8 +6,10 @@ mac_compat_la_LDFLAGS = -module -avoidversion
 mac_compat_la_SOURCES = mac-compat.c
 mac_compat_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/features/marker/src/Makefile.am b/xlators/features/marker/src/Makefile.am
index 501586a..977cb58 100644
--- a/xlators/features/marker/src/Makefile.am
+++ b/xlators/features/marker/src/Makefile.am
@@ -8,8 +8,10 @@ marker_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = marker-mem-types.h marker.h marker-quota.h marker-quota-helper.h marker-common.h $(top_builddir)/xlators/lib/src/libxlator.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -fno-strict-aliasing -D$(GF_HOST_OS) \
-        -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/xlators/lib/src $(GF_CFLAGS) -shared -nostartfiles
+AM_CFLAGS = -fPIC -Wall -fno-strict-aliasing $(GF_CFLAGS) -shared -nostartfiles
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/xlators/lib/src
 
 CLEANFILES =
 
diff --git a/xlators/features/marker/utils/src/Makefile.am b/xlators/features/marker/utils/src/Makefile.am
index 73c99cb..1203f73 100644
--- a/xlators/features/marker/utils/src/Makefile.am
+++ b/xlators/features/marker/utils/src/Makefile.am
@@ -10,11 +10,12 @@ gsyncd_LDFLAGS = $(GF_LDFLAGS) $(GF_GLUSTERFS_LDFLAGS)
 
 noinst_HEADERS = procdiggy.h
 
-AM_CFLAGS = -fPIC -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src\
-	-DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\"\
-	-DSBIN_DIR=\"$(sbindir)\" -DPYTHON=\"$(PYTHON)\"
+AM_CFLAGS = -fPIC -Wall
 
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src \
+	-DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\" \
+	-DSBIN_DIR=\"$(sbindir)\" -DPYTHON=\"$(PYTHON)\"
 
 CLEANFILES =
 
diff --git a/xlators/features/path-convertor/src/Makefile.am b/xlators/features/path-convertor/src/Makefile.am
index 58cfed0..d2b2dcd 100644
--- a/xlators/features/path-convertor/src/Makefile.am
+++ b/xlators/features/path-convertor/src/Makefile.am
@@ -7,8 +7,10 @@ path_converter_la_LDFLAGS = -module -avoidversion
 path_converter_la_SOURCES = path.c
 path_converter_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la 
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/features/quiesce/src/Makefile.am b/xlators/features/quiesce/src/Makefile.am
index e8ab4cb..478d0b4 100644
--- a/xlators/features/quiesce/src/Makefile.am
+++ b/xlators/features/quiesce/src/Makefile.am
@@ -8,7 +8,9 @@ quiesce_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = quiesce.h quiesce-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES =
diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am
index 4baa5f0..2c8872d 100644
--- a/xlators/features/quota/src/Makefile.am
+++ b/xlators/features/quota/src/Makefile.am
@@ -8,8 +8,10 @@ quota_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = quota-mem-types.h quota.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src \
 	-I$(top_srcdir)/xlators/cluster/dht/src
 
 CLEANFILES = 
diff --git a/xlators/features/read-only/src/Makefile.am b/xlators/features/read-only/src/Makefile.am
index 31ae4f3..9d50b59 100644
--- a/xlators/features/read-only/src/Makefile.am
+++ b/xlators/features/read-only/src/Makefile.am
@@ -14,8 +14,10 @@ worm_la_LDFLAGS = -module -avoidversion
 worm_la_SOURCES = read-only-common.c worm.c
 worm_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/features/trash/src/Makefile.am b/xlators/features/trash/src/Makefile.am
index 4671d06..1909b28 100644
--- a/xlators/features/trash/src/Makefile.am
+++ b/xlators/features/trash/src/Makefile.am
@@ -8,8 +8,10 @@ trash_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = trash.h trash-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
 
diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
index 79e10a3..b918822 100644
--- a/xlators/mgmt/glusterd/src/Makefile.am
+++ b/xlators/mgmt/glusterd/src/Makefile.am
@@ -1,7 +1,7 @@
 xlator_LTLIBRARIES = glusterd.la
 xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/mgmt
-glusterd_la_CPPFLAGS = "-DFILTERDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/filter\""
-glusterd_la_LDFLAGS = -module -avoidversion $(LIBXML2_LIBS) -lcrypto
+glusterd_la_CPPFLAGS = $(AM_CPPFLAGS) "-DFILTERDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/filter\""
+glusterd_la_LDFLAGS = $(AM_LDFLAGS) -module -avoidversion $(LIBXML2_LIBS) -lcrypto
 glusterd_la_SOURCES = glusterd.c glusterd-handler.c glusterd-sm.c \
 	glusterd-op-sm.c glusterd-utils.c glusterd-rpc-ops.c \
 	glusterd-store.c glusterd-handshake.c glusterd-pmap.c \
@@ -19,15 +19,17 @@ noinst_HEADERS = glusterd.h glusterd-utils.h glusterd-op-sm.h \
 	glusterd-pmap.h glusterd-volgen.h glusterd-mountbroker.h \
 	glusterd-syncop.h glusterd-hooks.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)\
-	-I$(rpclibdir) -L$(xlatordir)/ -I$(CONTRIBDIR)/rbtree \
-	-I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src \
-	-I$(CONTRIBDIR)/uuid \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(rpclibdir) \
+	-I$(CONTRIBDIR)/rbtree -I$(top_srcdir)/rpc/xdr/src \
+	-I$(top_srcdir)/rpc/rpc-lib/src -I$(CONTRIBDIR)/uuid \
 	-DSBIN_DIR=\"$(sbindir)\" -DDATADIR=\"$(localstatedir)\" \
-	-DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\"\
-        -DSYNCDAEMON_COMPILE=$(SYNCDAEMON_COMPILE) $(LIBXML2_CFLAGS)
+	-DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\" \
+	-DSYNCDAEMON_COMPILE=$(SYNCDAEMON_COMPILE) $(LIBXML2_CFLAGS)
 
+AM_LDFLAGS = -L$(xlatordir)
 
 CLEANFILES =
 
diff --git a/xlators/mount/fuse/src/Makefile.am b/xlators/mount/fuse/src/Makefile.am
index a92d68e..f4edfb3 100644
--- a/xlators/mount/fuse/src/Makefile.am
+++ b/xlators/mount/fuse/src/Makefile.am
@@ -27,9 +27,10 @@ fuse_la_SOURCES = fuse-helpers.c fuse-resolve.c fuse-bridge.c \
 fuse_la_LDFLAGS = -module -avoidversion -shared -nostartfiles
 fuse_la_LIBADD = @GF_FUSE_LDADD@
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) -Wall \
-	-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/fuse-include \
-	-I$(CONTRIBDIR)/fuse-lib $(GF_CFLAGS) $(GF_FUSE_CFLAGS)
+AM_CFLAGS = -fPIC -Wall $(GF_CFLAGS) $(GF_FUSE_CFLAGS)
 
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/fuse-include \
+	-I$(CONTRIBDIR)/fuse-lib
 
 CLEANFILES =
diff --git a/xlators/nfs/server/src/Makefile.am b/xlators/nfs/server/src/Makefile.am
index ef3b672..96bb92f 100644
--- a/xlators/nfs/server/src/Makefile.am
+++ b/xlators/nfs/server/src/Makefile.am
@@ -10,10 +10,11 @@ server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 noinst_HEADERS = nfs.h nfs-common.h nfs-fops.h nfs-inodes.h nfs-generics.h \
 	mount3.h nfs3-fh.h nfs3.h nfs3-helpers.h nfs-mem-types.h nlm4.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
 	-DLIBDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/auth\" \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)\
-	-I$(nfsrpclibdir) -L$(xlatordir)/ -I$(CONTRIBDIR)/rbtree\
-	-I$(top_srcdir)/rpc/xdr/src/
+	-I$(top_srcdir)/libglusterfs/src -I$(nfsrpclibdir) -L$(xlatordir) \
+	-I$(CONTRIBDIR)/rbtree -I$(top_srcdir)/rpc/xdr/src
 
 CLEANFILES =
diff --git a/xlators/performance/io-cache/src/Makefile.am b/xlators/performance/io-cache/src/Makefile.am
index 6dd270e..0c61252 100644
--- a/xlators/performance/io-cache/src/Makefile.am
+++ b/xlators/performance/io-cache/src/Makefile.am
@@ -8,7 +8,9 @@ io_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = io-cache.h ioc-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/rbtree -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/rbtree
 
 CLEANFILES = 
diff --git a/xlators/performance/io-threads/src/Makefile.am b/xlators/performance/io-threads/src/Makefile.am
index 72f9a80..dd0ea98 100644
--- a/xlators/performance/io-threads/src/Makefile.am
+++ b/xlators/performance/io-threads/src/Makefile.am
@@ -8,7 +8,9 @@ io_threads_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = io-threads.h iot-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
diff --git a/xlators/performance/md-cache/src/Makefile.am b/xlators/performance/md-cache/src/Makefile.am
index 150e724..149d501 100644
--- a/xlators/performance/md-cache/src/Makefile.am
+++ b/xlators/performance/md-cache/src/Makefile.am
@@ -8,8 +8,10 @@ md_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = md-cache-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/rbtree -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/rbtree
 
 CLEANFILES =
 
diff --git a/xlators/performance/quick-read/src/Makefile.am b/xlators/performance/quick-read/src/Makefile.am
index db917f8..28a39b8 100644
--- a/xlators/performance/quick-read/src/Makefile.am
+++ b/xlators/performance/quick-read/src/Makefile.am
@@ -8,7 +8,9 @@ quick_read_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = quick-read.h quick-read-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
diff --git a/xlators/performance/read-ahead/src/Makefile.am b/xlators/performance/read-ahead/src/Makefile.am
index b46020a..f2962e5 100644
--- a/xlators/performance/read-ahead/src/Makefile.am
+++ b/xlators/performance/read-ahead/src/Makefile.am
@@ -8,7 +8,9 @@ read_ahead_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = read-ahead.h read-ahead-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
diff --git a/xlators/performance/symlink-cache/src/Makefile.am b/xlators/performance/symlink-cache/src/Makefile.am
index 06e85fc..dca70a3 100644
--- a/xlators/performance/symlink-cache/src/Makefile.am
+++ b/xlators/performance/symlink-cache/src/Makefile.am
@@ -6,7 +6,9 @@ symlink_cache_la_LDFLAGS = -module -avoidversion
 symlink_cache_la_SOURCES = symlink-cache.c
 symlink_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
diff --git a/xlators/performance/write-behind/src/Makefile.am b/xlators/performance/write-behind/src/Makefile.am
index a5ebc90..36b7dca 100644
--- a/xlators/performance/write-behind/src/Makefile.am
+++ b/xlators/performance/write-behind/src/Makefile.am
@@ -8,7 +8,9 @@ write_behind_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = write-behind-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
 
 CLEANFILES = 
diff --git a/xlators/protocol/auth/addr/src/Makefile.am b/xlators/protocol/auth/addr/src/Makefile.am
index f09d1c5..94867b0 100644
--- a/xlators/protocol/auth/addr/src/Makefile.am
+++ b/xlators/protocol/auth/addr/src/Makefile.am
@@ -6,7 +6,9 @@ addr_la_LDFLAGS = -module -avoidversion
 addr_la_SOURCES = addr.c
 addr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src \
 	-I$(top_srcdir)/xlators/protocol/server/src \
-	-I$(top_srcdir)/rpc/rpc-lib/src/
+	-I$(top_srcdir)/rpc/rpc-lib/src
diff --git a/xlators/protocol/auth/login/src/Makefile.am b/xlators/protocol/auth/login/src/Makefile.am
index b4719d1..38caea1 100644
--- a/xlators/protocol/auth/login/src/Makefile.am
+++ b/xlators/protocol/auth/login/src/Makefile.am
@@ -6,6 +6,8 @@ login_la_LDFLAGS = -module -avoidversion
 login_la_SOURCES = login.c
 login_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src \
 	-I$(top_srcdir)/xlators/protocol/server/src
diff --git a/xlators/protocol/client/src/Makefile.am b/xlators/protocol/client/src/Makefile.am
index a62a68a..bf6dae7 100644
--- a/xlators/protocol/client/src/Makefile.am
+++ b/xlators/protocol/client/src/Makefile.am
@@ -13,6 +13,8 @@ client_la_SOURCES = client.c client-helpers.c client-rpc-fops.c  \
 
 noinst_HEADERS = client.h client-mem-types.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS) \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)  \
-	-I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src/
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src \
+	-I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src
diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am
index 0b706cf..9650d84 100644
--- a/xlators/protocol/server/src/Makefile.am
+++ b/xlators/protocol/server/src/Makefile.am
@@ -12,12 +12,12 @@ server_la_SOURCES = server.c server-resolve.c server-helpers.c  \
 
 noinst_HEADERS = server.h server-helpers.h server-mem-types.h authenticate.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall    \
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles  \
-	-DCONFDIR=\"$(sysconfdir)/glusterfs\" -D$(GF_HOST_OS)   \
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -DCONFDIR=\"$(sysconfdir)/glusterfs\" \
 	-DLIBDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/auth\" \
-	$(GF_CFLAGS) -I$(top_srcdir)/xlators/protocol/lib/src   \
-	-I$(top_srcdir)/rpc/rpc-lib/src/       \
-	-I$(top_srcdir)/rpc/xdr/src/
+	-I$(top_srcdir)/xlators/protocol/lib/src \
+	-I$(top_srcdir)/rpc/rpc-lib/src -I$(top_srcdir)/rpc/xdr/src
 
 CLEANFILES = *~
diff --git a/xlators/storage/posix/src/Makefile.am b/xlators/storage/posix/src/Makefile.am
index 4eae979..df0bf8a 100644
--- a/xlators/storage/posix/src/Makefile.am
+++ b/xlators/storage/posix/src/Makefile.am
@@ -9,10 +9,12 @@ posix_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBAIO)
 
 noinst_HEADERS = posix.h posix-mem-types.h posix-handle.h posix-aio.h
 
-AM_CFLAGS = -fPIC -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
-            -D$(GF_HOST_OS) -Wall -I$(top_srcdir)/libglusterfs/src -shared \
-            -nostartfiles -I$(top_srcdir)/rpc/xdr/src \
-            -I$(top_srcdir)/rpc/rpc-lib/src $(GF_CFLAGS)
+AM_CFLAGS = -fPIC -fno-strict-aliasing -Wall -shared -nostartfiles \
+	$(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src \
+	-I$(top_srcdir)/rpc/rpc-lib/src
 
 CLEANFILES =
 
diff --git a/xlators/system/posix-acl/src/Makefile.am b/xlators/system/posix-acl/src/Makefile.am
index c095569..df5e7b8 100644
--- a/xlators/system/posix-acl/src/Makefile.am
+++ b/xlators/system/posix-acl/src/Makefile.am
@@ -1,14 +1,17 @@
 xlator_LTLIBRARIES = posix-acl.la
 xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/system
-posix_acl_la_LDFLAGS = -module -avoidversion
+posix_acl_la_LDFLAGS = $(AM_LDFLAGS) -module -avoidversion
 posix_acl_la_SOURCES = posix-acl.c posix-acl-xattr.c
 posix_acl_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
 
 noinst_HEADERS = posix-acl.h posix-acl-xattr.h
 
-AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-	-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS)\
-	-L$(xlatordir)/
+AM_CFLAGS = -fPIC -Wall -shared -nostartfiles $(GF_CFLAGS)
+
+AM_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+	-I$(top_srcdir)/libglusterfs/src
+
+AM_LDFLAGS = -L$(xlatordir)
 
 CLEANFILES =
 
-- 
1.7.10.4




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux