aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorproski <proski>2006-07-09 21:35:42 +0000
committerproski <proski>2006-07-09 21:35:42 +0000
commitd39067bd2e2e51431cfaa8a9e5bea754ecd1bd44 (patch)
tree2f86aaadd8c28d7d681d223efe4bb9c62c05b646 /Makefile
parenta23362dc75b457efa8f52e24488facf136cc43af (diff)
Add "check" target that runs sparse with most warnings enabled
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 325b951..4611837 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-#$Id: Makefile,v 1.42 2006/06/21 08:50:07 maximsch2 Exp $
+#$Id: Makefile,v 1.43 2006/07/09 21:35:42 proski Exp $
#
# Copyright (c) 2002 - 2003 Oliver Kurth
# (c) 2003 - 2004 Jörg Albert <joerg.albert@gmx.de>
@@ -71,6 +71,10 @@ DEPMOD = /sbin/depmod
# if it doesn't assume 2.5 style
OLDMAKE = $(wildcard $(KERNEL_SRC)/Rules.make)
+SPARSE_FLAGS = -Wbitwise -Wcast-to-as -Wcontext -Wdefault-bitfield-sign \
+ -Wno-transparent-union -Wptr-subtraction-blows -Wundef \
+ -D__CHECK_ENDIAN__
+
ifeq (,$(OLDMAKE))
# 2.5 style modules, get the kernel makefiles to do the work
@@ -86,6 +90,11 @@ modules:
$(MAKE) -C $(KERNEL_SRC) M=$(SRCDIR) MODVERDIR=$(MODVERDIR) \
EXTRA_CFLAGS="$(FW_DL)" modules
+check:
+ mkdir -p .tmp_versions
+ $(MAKE) -C $(KERNEL_SRC) M=$(SRCDIR) MODVERDIR=$(MODVERDIR) \
+ EXTRA_CFLAGS="$(FW_DL)" modules C=2 CF="$(SPARSE_FLAGS)"
+
mv_old:
for i in $(MODULES:%.o=%.ko); do \
find $(DEL_MODULE_DIR) -name $$i -exec rm -f {} {}.orig \; ;done