From 3d40c3796d40024703685ec69d3abbaccbf9c88c Mon Sep 17 00:00:00 2001 From: citats Date: Fri, 19 Mar 2004 09:49:29 +0000 Subject: Autodetect 2.6 vs 2.4 when building zaptel modules. Don't require 'make linux26' anymore git-svn-id: http://svn.digium.com/svn/zaptel/trunk@329 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 99ec1c6..5a7062d 100755 --- a/Makefile +++ b/Makefile @@ -49,17 +49,22 @@ MODULESO=$(shell for x in $(MODULES); do echo "$$x.o "; done ) MODULESKO=$(shell for x in $(MODULES); do echo "$$x.ko "; done ) ZTTOOL=$(shell if [ -f /usr/include/newt.h ]; then echo zttool; fi) +BINS=ztcfg torisatool makefw ztmonitor ztspeed $(ZTTOOL) + #PRIMARY=wcfxsusb PRIMARY=torisa #PRIMARY=wcfxo PWD=$(shell pwd) -all: $(MODULESO) ztcfg torisatool makefw ztmonitor ztspeed $(ZTTOOL) +BUILDVER=$(shell if uname -r | grep -q ^2.6; then echo "linux26"; else echo "linux24"; fi) +all: $(BUILDVER) + +linux24: $(MODULESO) $(BINS) linux26: -linux26: prereq ztcfg torisatool makefw ztmonitor ztspeed $(ZTTOOL) +linux26: prereq $(BINS) @if ! [ -d /usr/src/linux-2.6 ]; then echo "Link /usr/src/linux-2.6 to your kernel sources first!"; exit 1 ; fi - make -C /usr/src/linux-2.6 SUBDIRS=$(PWD) modules + @make -C /usr/src/linux-2.6 SUBDIRS=$(PWD) modules obj-m := $(MODULESO) -- cgit v1.2.3