@@ -9,16 +9,17 @@ OPT ?= -O2 -DNDEBUG # (A) Production use (optimized mode)
# TODO maybe support android & chromium platforms via automake too?
-CFLAGS = -I$(srcdir)/include $(OPT) -pthread -fno-builtin-memcmp -DLEVELDB_PLATFORM_POSIX
+AM_CFLAGS = -I$(srcdir)/include $(OPT) -pthread -fno-builtin-memcmp -DLEVELDB_PLATFORM_POSIX
-CXXFLAGS = -I$(srcdir)/include $(OPT) -pthread -fno-builtin-memcmp -DLEVELDB_PLATFORM_POSIX
+AM_CXXFLAGS = -I$(srcdir)/include $(OPT) -pthread -fno-builtin-memcmp -DLEVELDB_PLATFORM_POSIX
if CSTDATOMIC
-CXXFLAGS += -DLEVELDB_CSTDATOMIC_PRESENT -std=c++0x
+AM_CXXFLAGS += -DLEVELDB_CSTDATOMIC_PRESENT -std=c++0x
endif
-LDFLAGS = -pthread
+AM_LDFLAGS = -pthread
+LDADD =
if WITH_TCMALLOC
-LDFLAGS += -ltcmalloc
+LDADD += -ltcmalloc
endif
# items will be appended to this
(automake-1.12 even reports this) Makefile.am:12: warning: 'CFLAGS' is a user variable, you should not override it; Makefile.am:12: use 'AM_CFLAGS' instead Makefile.am:18: warning: 'LDFLAGS' is a user variable, you should not override it; Makefile.am:18: use 'AM_LDFLAGS' instead Makefile.am:14: warning: 'CXXFLAGS' is a user variable, you should not override it; Makefile.am:14: use 'AM_CXXFLAGS' instead Also, libs _must absolutely not_ appear in LDFLAGS - LDADD is appropriate here. Signed-off-by: Jan Engelhardt <jengelh@inai.de> --- Makefile.am | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)