summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-04-30 16:25:38 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-04-30 16:25:38 +0000
commit8c4db4e3acd9a7626e709af0494055487b589719 (patch)
tree35c598648a3c858da83df1ee20516ff2dbf860c2 /Makefile
parent36bac03623e7b388bde76ab83358bc57a8ec38b3 (diff)
Merged revisions 1017 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r1017 | kpfleming | 2006-04-30 11:24:47 -0500 (Sun, 30 Apr 2006) | 2 lines build xpp by default, now that the Makefile can determine when an appropriate kernel version is being used for the build ........ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1018 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1087538..e589453 100644
--- a/Makefile
+++ b/Makefile
@@ -165,10 +165,15 @@ MOD_DIR:=$(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc
MOD_DESTDIR:=zaptel
-obj-m:=$(MODULESO) ${XPPMOD}
+obj-m:=$(MODULESO)
-ifneq ($(filter xpp,${MAKECMDGOALS}),)
-XPPMOD=xpp/
+# Also build xpp in the subdirectory xpp/ . But only for >=2.6.10 and only
+# for i386. On other archs the module will probably build but panic.
+# This line is only meaningful when this Makefile is used as kconfig for
+# 2.6 build
+
+ifneq (,$(shell [ 0$(SUBLEVEL) -ge 10 ] && [ "$(ARCH)" = 'i386' ] && echo 1))
+obj-m+=xpp/
endif
ifneq (,$(wildcard /usr/include/newt.h))
@@ -195,7 +200,7 @@ linux24: prereq $(MODULESO) $(BINS)
linux26: prereq $(BINS)
@echo $(KSRC)
@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
- $(KMAKE) XPPMOD=$(XPPMOD) modules
+ $(KMAKE) modules
xpp: linux26