optimize c flags for development/production mode

This commit is contained in:
c9s 2015-11-21 10:39:49 +08:00
parent 44ee48724f
commit c609003c95
2 changed files with 8 additions and 2 deletions

View file

@ -1,4 +1,8 @@
SUBDIRS=3rdparty src . tests examples SUBDIRS=3rdparty src . examples
if HAVE_CHECK
SUBDIRS += tests
endif
lib_LTLIBRARIES = libr3.la lib_LTLIBRARIES = libr3.la
libr3_la_SOURCES = libr3_la_SOURCES =
@ -13,6 +17,8 @@ ACLOCAL_AMFLAGS=-I m4
if ENABLE_DEBUG if ENABLE_DEBUG
AM_CFLAGS += -ggdb -fprofile-arcs -ftest-coverage AM_CFLAGS += -ggdb -fprofile-arcs -ftest-coverage
else
AM_CFLAGS += -O2
endif endif
if USE_JEMALLOC if USE_JEMALLOC

View file

@ -1,4 +1,4 @@
AM_CFLAGS=$(DEPS_CFLAGS) $(GVC_DEPS_CFLAGS) $(JSONC_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/3rdparty -Wall -std=c99 -O2 AM_CFLAGS=$(DEPS_CFLAGS) $(GVC_DEPS_CFLAGS) $(JSONC_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/3rdparty -Wall -std=c99
AM_LDFLAGS=$(DEPS_LIBS) $(GVC_DEPS_LIBS) $(JSONC_LIBS) AM_LDFLAGS=$(DEPS_LIBS) $(GVC_DEPS_LIBS) $(JSONC_LIBS)
MAYBE_COVERAGE=--coverage MAYBE_COVERAGE=--coverage