From a3678aad5c122bc6dd38c92ac1b32d76a12e434e Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Tue, 13 Jun 2006 22:48:50 +0000 Subject: [PATCH] Now AM_CFLAGS can be set by modifying GLOBAL_CFLAGS in the root Makefile.am --- Makefile.am | 9 ++++++++- src/2pc/Makefile.am | 2 +- src/apps/cht/Makefile.am | 2 +- src/apps/cyrus/Makefile.am | 2 +- src/libdfa/Makefile.am | 2 +- src/lladd/Makefile.am | 3 ++- src/timing/Makefile.am | 2 +- test/2pc/Makefile.am | 3 ++- test/cht/Makefile.am | 2 +- test/dfa/Makefile.am | 3 +-- test/monotree/Makefile.am | 2 +- utilities/Makefile.am | 2 +- 12 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8c5ff43..93fb2b7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,13 @@ EXTRA_DIST = reconf SUBDIRS = src test utilities benchmarks -AM_CFLAGS = -g -Wall -pedantic -Wconversion +export GLOBAL_CFLAGS = -g -Wall -pedantic -std=gnu99 -Winline +## GOAL: Make these not warn! +#-Wextra -Wno-unused-parameter + +# -feliminate-unused-debug-symbols -feliminate-unused-debug-types -funit-at-a-time -finline-functions -fno-keep-static-consts + +#-funit-at-a-time => -finline-functions-called-once +#-Wconversion docs: doxygen doc/Doxyfile-api diff --git a/src/2pc/Makefile.am b/src/2pc/Makefile.am index 3c27b81..e5928ed 100644 --- a/src/2pc/Makefile.am +++ b/src/2pc/Makefile.am @@ -1,4 +1,4 @@ #LDADD=$(top_builddir)/build/libdfa.a lib_LIBRARIES=lib2pc.a lib2pc_a_SOURCES=2pc.c -AM_CFLAGS= -g -Wall -pedantic -std=gnu99 +AM_CFLAGS=${GLOBAL_CFLAGS} diff --git a/src/apps/cht/Makefile.am b/src/apps/cht/Makefile.am index d25f906..f4a1db4 100644 --- a/src/apps/cht/Makefile.am +++ b/src/apps/cht/Makefile.am @@ -2,4 +2,4 @@ LDADD=$(top_builddir)/src/libdfa/libdfa.a $(top_builddir)/src/2pc/lib2pc.a SOURCES=cht.c lib_LIBRARIES=libcht.a libcht_a_SOURCES=cht.c cht_client.c cht_server.c cht_message.c -AM_CFLAGS= -g -Wall -pedantic -std=gnu99 +AM_CFLAGS=${GLOBAL_CFLAGS} diff --git a/src/apps/cyrus/Makefile.am b/src/apps/cyrus/Makefile.am index ff8172e..53ba866 100644 --- a/src/apps/cyrus/Makefile.am +++ b/src/apps/cyrus/Makefile.am @@ -2,4 +2,4 @@ LDADD=$(top_builddir)/build/libdfa.a $(top_builddir)/build/lib2pc.a SOURCES=cyrusdb_lladd.c lib_LIBRARIES=libcyrusdb_lladd.a libcyrusdb_lladd_a_SOURCES=cyrusdb_lladd.c -AM_CFLAGS= -g -Wall -pedantic +AM_CFLAGS=${GLOBAL_CFLAGS} diff --git a/src/libdfa/Makefile.am b/src/libdfa/Makefile.am index 1e1756a..9da6a16 100644 --- a/src/libdfa/Makefile.am +++ b/src/libdfa/Makefile.am @@ -2,4 +2,4 @@ lib_LIBRARIES=libdfa.a librw.a libdfa_a_SOURCES=libdfa.c monotree.c smash.c callbacks.c messages.c networksetup.c librw_a_SOURCES=rw.c -AM_CFLAGS= -g -Wall -pedantic -std=gnu99 +AM_CFLAGS=${GLOBAL_CFLAGS} diff --git a/src/lladd/Makefile.am b/src/lladd/Makefile.am index c89468c..35b239b 100644 --- a/src/lladd/Makefile.am +++ b/src/lladd/Makefile.am @@ -20,4 +20,5 @@ liblladd_a_SOURCES=crc32.c lhtable.c common.c stats.c io.c bufferManager.c linke # logger/logMemory.c \ ringbuffer.c \ asdfas #operations/lladdhash.c -AM_CFLAGS= -g -Wall -pedantic -std=gnu99 +#AM_CFLAGS= -g -Wall -pedantic -std=gnu99 +AM_CFLAGS=${GLOBAL_CFLAGS} diff --git a/src/timing/Makefile.am b/src/timing/Makefile.am index c3ebd6f..7d304bc 100644 --- a/src/timing/Makefile.am +++ b/src/timing/Makefile.am @@ -1,3 +1,3 @@ bin_PROGRAMS=getTimeOfDay -AM_CFLAGS= -g -Wall -pedantic +AM_CFLAGS=${GLOBAL_CFLAGS} diff --git a/test/2pc/Makefile.am b/test/2pc/Makefile.am index 752f466..c4be13a 100644 --- a/test/2pc/Makefile.am +++ b/test/2pc/Makefile.am @@ -1,4 +1,5 @@ LDADD=$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \ $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a -lconfuse bin_PROGRAMS=always_commit -AM_CFLAGS= -g -Wall -pedantic -std=gnu99 +AM_CFLAGS=${GLOBAL_CFLAGS} + diff --git a/test/cht/Makefile.am b/test/cht/Makefile.am index 78ca860..9b96508 100644 --- a/test/cht/Makefile.am +++ b/test/cht/Makefile.am @@ -2,4 +2,4 @@ TESTS=./run LDADD=-lconfuse $(top_builddir)/src/apps/cht/libcht.a $(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \ $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a bin_PROGRAMS=simple cht_server client coordinator subordinate -AM_CFLAGS= -g -Wall -pedantic -std=c99 +AM_CFLAGS=${GLOBAL_CFLAGS} diff --git a/test/dfa/Makefile.am b/test/dfa/Makefile.am index a87460d..3f5d9ef 100644 --- a/test/dfa/Makefile.am +++ b/test/dfa/Makefile.am @@ -1,6 +1,6 @@ LDADD= $(top_builddir)/src/libdfa/libdfa.a $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a -lconfuse bin_PROGRAMS=ping_pong_dfa fork_bomb star -AM_FLAGS= -g -Wall -pedantic -std=c99 +AM_FLAGS=${GLOBAL_CFLAGS} if HAVE_LIBCHECK TESTS = check_networksetup ping_pong_dfa else @@ -9,4 +9,3 @@ endif noinst_PROGRAMS = $(TESTS) #LDADD = @CHECK_LIBS@ $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a #-lefence CLEANFILES = check_networksetup.log -#AM_CFLAGS= -g -Wall -pedantic -std=gnu99 diff --git a/test/monotree/Makefile.am b/test/monotree/Makefile.am index 3cb0d81..82d20d4 100644 --- a/test/monotree/Makefile.am +++ b/test/monotree/Makefile.am @@ -1,4 +1,4 @@ LDADD=$(top_builddir)/src/libdfa/libdfa.a $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a $(top_builddir)/src/libdfa/librw.a bin_PROGRAMS=bit_arithmetic binary_search soundness soundness_SOURCES = soundness.c -AM_CFLAGS= -g -Wall -pedantic -std=c99 +AM_CFLAGS=${GLOBAL_CFLAGS} diff --git a/utilities/Makefile.am b/utilities/Makefile.am index f508a63..a8fbe93 100644 --- a/utilities/Makefile.am +++ b/utilities/Makefile.am @@ -2,4 +2,4 @@ LDADD=$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \ $(top_builddir)/src/lladd/liblladd.a $(top_builddir)/src/pbl/libpbl.a \ $(top_builddir)/src/libdfa/librw.a bin_PROGRAMS=logfile_dump run_recovery truncate_log -AM_CFLAGS= -g -Wall -pedantic -std=gnu99 +AM_CFLAGS=${GLOBAL_CFLAGS}