diff options
author | citats <citats@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-03-19 09:49:29 +0000 |
---|---|---|
committer | citats <citats@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-03-19 09:49:29 +0000 |
commit | 3d40c3796d40024703685ec69d3abbaccbf9c88c (patch) | |
tree | 92b9fb3fd7f654adbae586e339df77b6e1331ff2 | |
parent | d750a2c6207f8e6fb650e1921a03b44010364ea5 (diff) |
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
-rwxr-xr-x | Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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) |