diff options
-rw-r--r-- | Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -41,6 +41,16 @@ ifndef KSRC endif KINCLUDES:=$(KSRC)/include +# We use the kernel's .config file as an indication that the KSRC +# directory is indeed a valid and configured kernel source (or partial +# source) directory. +KCONFIG:=$(KSRC)/.config +ifneq (,$(wildcard $(KCONFIG))) + HAS_KSRC=yes +else + HAS_KSRC=no +endif + ifeq (2.6,$(shell echo $(KVERS) | cut -d. -f1-2)) BUILDVER:=linux26 else @@ -556,7 +566,9 @@ clean: rm -f patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest rm -f *.o ztcfg tzdriver sethdlc sethdlc-new rm -f $(TZOBJS) $(LIBTONEZONE_SO) *.lo +ifeq (yes,$(HAS_KSRC)) $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) clean +endif $(MAKE) -C wct4xxp clean $(MAKE) -C wctc4xxp clean rm -rf .tmp_versions |