From 9059a76c67f0e3157c02b3de4b8f9339981e7c23 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Mon, 1 Oct 2012 16:09:26 -0400 Subject: build: consolidate common compilation flags into one variable Some -D flags are present in all files, so collect them. This adds -D${GF_HOST_OS} to some compiler command lines, but this should not be a problem. Change-Id: I1aeb346143d4984c9cc4f2750c465ce09af1e6ca BUG: 862082 Original-author: Jan Engelhardt Signed-off-by: Jan Engelhardt Signed-off-by: Jeff Darcy Reviewed-on: http://review.gluster.org/4013 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/features/filter/src/Makefile.am | 2 +- xlators/features/index/src/Makefile.am | 2 +- xlators/features/locks/src/Makefile.am | 4 ++-- xlators/features/mac-compat/src/Makefile.am | 2 +- xlators/features/marker/src/Makefile.am | 2 +- xlators/features/marker/utils/src/Makefile.am | 2 +- xlators/features/path-convertor/src/Makefile.am | 2 +- xlators/features/quiesce/src/Makefile.am | 2 +- xlators/features/quota/src/Makefile.am | 2 +- xlators/features/read-only/src/Makefile.am | 2 +- xlators/features/trash/src/Makefile.am | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/filter/src/Makefile.am b/xlators/features/filter/src/Makefile.am index d473b9ea1..5516cc4ef 100644 --- a/xlators/features/filter/src/Makefile.am +++ b/xlators/features/filter/src/Makefile.am @@ -8,7 +8,7 @@ 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) \ +AM_CFLAGS = -fPIC $(GF_CPPFLAGS) -Wall \ -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) CLEANFILES = diff --git a/xlators/features/index/src/Makefile.am b/xlators/features/index/src/Makefile.am index 5d037c7ec..f320369de 100644 --- a/xlators/features/index/src/Makefile.am +++ b/xlators/features/index/src/Makefile.am @@ -8,7 +8,7 @@ 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 $(GF_CPPFLAGS) -Wall \ -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src \ -I$(top_srcdir)/rpc/rpc-lib/src -shared -nostartfiles $(GF_CFLAGS) diff --git a/xlators/features/locks/src/Makefile.am b/xlators/features/locks/src/Makefile.am index e39676826..f9e293ab8 100644 --- a/xlators/features/locks/src/Makefile.am +++ b/xlators/features/locks/src/Makefile.am @@ -9,8 +9,8 @@ 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) \ +AM_CFLAGS = -fPIC $(GF_CPPFLAGS) -Wall \ + -fno-strict-aliasing \ -I$(top_srcdir)/libglusterfs/src $(GF_CFLAGS) -shared -nostartfiles CLEANFILES = diff --git a/xlators/features/mac-compat/src/Makefile.am b/xlators/features/mac-compat/src/Makefile.am index 915c13e30..f7f58e56a 100644 --- a/xlators/features/mac-compat/src/Makefile.am +++ b/xlators/features/mac-compat/src/Makefile.am @@ -6,7 +6,7 @@ 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) \ +AM_CFLAGS = -fPIC $(GF_CPPFLAGS) -Wall \ -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) CLEANFILES = diff --git a/xlators/features/marker/src/Makefile.am b/xlators/features/marker/src/Makefile.am index 501586a76..1588d31e0 100644 --- a/xlators/features/marker/src/Makefile.am +++ b/xlators/features/marker/src/Makefile.am @@ -8,7 +8,7 @@ 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) \ +AM_CFLAGS = -fPIC $(GF_CPPFLAGS) -Wall -fno-strict-aliasing \ -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/xlators/lib/src $(GF_CFLAGS) -shared -nostartfiles CLEANFILES = diff --git a/xlators/features/marker/utils/src/Makefile.am b/xlators/features/marker/utils/src/Makefile.am index e44ffb5bf..f51387f91 100644 --- a/xlators/features/marker/utils/src/Makefile.am +++ b/xlators/features/marker/utils/src/Makefile.am @@ -10,7 +10,7 @@ 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)\ +AM_CFLAGS = -fPIC -Wall $(GF_CPPFLAGS) \ -I$(top_srcdir)/libglusterfs/src\ -DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\"\ -DUSE_LIBGLUSTERFS\ diff --git a/xlators/features/path-convertor/src/Makefile.am b/xlators/features/path-convertor/src/Makefile.am index 58cfed0f9..d7e5765b8 100644 --- a/xlators/features/path-convertor/src/Makefile.am +++ b/xlators/features/path-convertor/src/Makefile.am @@ -7,7 +7,7 @@ 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)\ +AM_CFLAGS = -fPIC $(GF_CPPFLAGS) -Wall \ -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) CLEANFILES = diff --git a/xlators/features/quiesce/src/Makefile.am b/xlators/features/quiesce/src/Makefile.am index e8ab4cb24..0c7acd309 100644 --- a/xlators/features/quiesce/src/Makefile.am +++ b/xlators/features/quiesce/src/Makefile.am @@ -8,7 +8,7 @@ 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) \ +AM_CFLAGS = -fPIC $(GF_CPPFLAGS) -Wall \ -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) CLEANFILES = diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am index 4baa5f06e..eb2a5057c 100644 --- a/xlators/features/quota/src/Makefile.am +++ b/xlators/features/quota/src/Makefile.am @@ -8,7 +8,7 @@ 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) \ +AM_CFLAGS = -fPIC $(GF_CPPFLAGS) -Wall \ -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) \ -I$(top_srcdir)/xlators/cluster/dht/src diff --git a/xlators/features/read-only/src/Makefile.am b/xlators/features/read-only/src/Makefile.am index 31ae4f340..6dcdc8ae7 100644 --- a/xlators/features/read-only/src/Makefile.am +++ b/xlators/features/read-only/src/Makefile.am @@ -14,7 +14,7 @@ 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) \ +AM_CFLAGS = -fPIC $(GF_CPPFLAGS) -Wall \ -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) CLEANFILES = diff --git a/xlators/features/trash/src/Makefile.am b/xlators/features/trash/src/Makefile.am index 4671d06d3..5a0652359 100644 --- a/xlators/features/trash/src/Makefile.am +++ b/xlators/features/trash/src/Makefile.am @@ -8,7 +8,7 @@ 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)\ +AM_CFLAGS = -fPIC $(GF_CPPFLAGS) -Wall \ -I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) CLEANFILES = -- cgit