From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.gentoo.org ([140.211.166.183]) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1K6YBu-0004JN-Kr for linux-mtd@lists.infradead.org; Wed, 11 Jun 2008 21:49:14 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 69C6D67400 for ; Wed, 11 Jun 2008 21:49:09 +0000 (UTC) From: Mike Frysinger To: linux-mtd@lists.infradead.org Subject: [PATCH] respect CFLAGS/CPPFLAGS from build environment Date: Wed, 11 Jun 2008 17:49:08 -0400 Message-Id: <1213220948-30156-1-git-send-email-vapier@gentoo.org> List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Signed-off-by: Mike Frysinger --- Makefile | 10 ++++++---- ubi-utils/Makefile | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 9f5ef6c..6c13a5a 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,15 @@ # -*- sh -*- -OPTFLAGS := -O2 -Wall SBINDIR=/usr/sbin MANDIR=/usr/share/man INCLUDEDIR=/usr/include + #CROSS=arm-linux- CC := $(CROSS)gcc -CFLAGS := -I./include $(OPTFLAGS) +CFLAGS ?= -O2 +CFLAGS += -Wall +CPPFLAGS += -I./include ifeq ($(origin CROSS),undefined) BUILDDIR := . @@ -17,7 +19,7 @@ else endif ifeq ($(WITHOUT_XATTR), 1) - CFLAGS += -DWITHOUT_XATTR + CPPFLAGS += -DWITHOUT_XATTR endif RAWTARGETS = ftl_format flash_erase flash_eraseall nanddump doc_loadbios \ @@ -38,7 +40,7 @@ SYMLINKS = $(BUILDDIR)/%.o: %.c mkdir -p $(BUILDDIR) - $(CC) $(CFLAGS) -g -c -o $@ $< -g -Wp,-MD,$(BUILDDIR)/.$(