From patchwork Wed Sep 12 02:22:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Engelhardt X-Patchwork-Id: 1440621 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7C30B3FC33 for ; Wed, 12 Sep 2012 02:22:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758721Ab2ILCWU (ORCPT ); Tue, 11 Sep 2012 22:22:20 -0400 Received: from ares07.inai.de ([5.9.24.206]:48868 "EHLO seven.medozas.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759273Ab2ILCWQ (ORCPT ); Tue, 11 Sep 2012 22:22:16 -0400 Received: by seven.medozas.de (Postfix, from userid 25121) id 9885796A129D; Wed, 12 Sep 2012 04:22:10 +0200 (CEST) From: Jan Engelhardt To: sage@newdream.net Cc: ceph-devel@vger.kernel.org Subject: [PATCH 1/6] build: do not modify user variables Date: Wed, 12 Sep 2012 04:22:02 +0200 Message-Id: <1347416527-19752-2-git-send-email-jengelh@inai.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1347416527-19752-1-git-send-email-jengelh@inai.de> References: <1347416527-19752-1-git-send-email-jengelh@inai.de> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org (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 --- 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