[PATCH 1/6] build: do not modify user variables

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

 



(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@xxxxxxx>
---
 Makefile.am |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 3488eba..25a24de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux