aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-06-12 07:49:08 +1000
committerJosh Boyer <jwboyer@gmail.com>2008-06-18 08:58:52 -0400
commita8523b2d61e2eb750447c57bff1f5fcae33ef8fc (patch)
tree7d7bef5378d7bc5673c12f47db0ab0ba5e3b957a /Makefile
parentb1da3d54f1dd2e1dc0316480cb0b6376d37e1cb5 (diff)
respect CFLAGS/CPPFLAGS from build environment
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 9f5ef6c..c5d1933 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 -g
+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)/.$(<F).dep
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< -g -Wp,-MD,$(BUILDDIR)/.$(<F).dep
.SUFFIXES: