[PATCH 2/7] remove hard-coded CFLAGS, LDFLAGS

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

 



From: "Lan Yixun (dlan)" <dennis.yxun@xxxxxxxxx>

according to autoconf manual[1], build script should allow user override the CFLAGS, LDFLAGS
varible (passed via ./configure). And actually, we should not directly use CFLAGS,
LDFLAGS, but have to create another one (eg. AUTOFS_CFLAGS). FYI, see section "Variable: CFLAGS",
the last paragraph.

Here, I slightly modify the code so that we can still fallback to the default one.

[1] http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html#Preset-Output-Variables

Signed-off-by: Lan Yixun (dlan) <dennis.yxun@xxxxxxxxx>
---
 Makefile.rules | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile.rules b/Makefile.rules
index a05a6df..d00ba3c 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -24,17 +24,17 @@ endif
 
 ifdef DEBUG
 CFLAGS    ?= -g -Wall -DDEBUG
-LDFLAGS   = -g
-STRIP     = :
+LDFLAGS   ?= -g
+STRIP     ?= :
 else
 ifdef DONTSTRIP
 CFLAGS    ?= -O2 -g
-LDFLAGS   = -g
-STRIP     = :
+LDFLAGS   ?= -g
+STRIP     ?= :
 else
 CFLAGS    ?= -O2 -Wall
-LDFLAGS   = -s
-STRIP     = strip --strip-debug
+LDFLAGS   ?= -s
+STRIP     ?= strip --strip-debug
 endif
 endif
 
-- 
1.8.3.2

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




[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux