summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-08-29 11:59:47 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2007-08-29 11:59:47 +0100
commit8ef59d2c9ca8675bf9676c49847826427d9b6d26 (patch)
tree4495bd615ab3a6eb291b45bf64ee6c962da46f91
parent2a032bca585e27ceb0f293905718b416bc297ce2 (diff)
Make optflags easier for distros to override
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-rw-r--r--Makefile3
-rw-r--r--ubi-utils/Makefile3
2 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b7ffd58..679dc7e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,13 @@
# -*- sh -*-
+OPTFLAGS := -O2 -Wall
SBINDIR=/usr/sbin
MANDIR=/usr/man
INCLUDEDIR=/usr/include
#CROSS=arm-linux-
CC := $(CROSS)gcc
-CFLAGS := -I./include -O2 -Wall
+CFLAGS := -I./include $(OPTFLAGS)
ifeq ($(origin CROSS),undefined)
BUILDDIR := .
diff --git a/ubi-utils/Makefile b/ubi-utils/Makefile
index 797807d..bef8227 100644
--- a/ubi-utils/Makefile
+++ b/ubi-utils/Makefile
@@ -7,12 +7,13 @@ HOST_VERSION_NAME := $(shell uname -r)
BUILD_CPU := $(shell uname -m)
BUILD_OS := $(shell uname -o)
+OPTFLAGS := -O2 -g -Wall
KERNELHDR := ../include
DESTDIR := /usr/local
SBINDIR := bin
CC := $(CROSS)gcc
-CFLAGS := -I./inc -I./src -I$(KERNELHDR) -O2 -g -Wall -Werror \
+CFLAGS := -I./inc -I./src -I$(KERNELHDR) $(OPTFLAGS) -Werror \
-Wwrite-strings -W -std=gnu99 \
-DHOST_OS_NAME=\"$(HOST_OS_NAME)\" \
-DHOST_VERSION_NAME=\"$(HOST_VERSION_NAME)\" \