Index: Makefile =================================================================== RCS file: /usr/cvsroot/zaptel/Makefile,v retrieving revision 1.52.2.13 diff -u -r1.52.2.13 Makefile --- Makefile 8 Aug 2005 18:06:02 -0000 1.52.2.13 +++ Makefile 15 Oct 2005 16:43:28 -0000 @@ -2,6 +2,8 @@ # Makefile for tormenta/carrier driver and utilities # $Id: Makefile,v 1.52.2.13 2005/08/08 18:06:02 russell Exp $ # +KERNEL_VERSION?=`uname -r` + BASEADDR=0xd0000 # @@ -38,7 +40,7 @@ CONFIG_FILE=$(INSTALL_PREFIX)/etc/zaptel.conf CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\" -BUILDVER=$(shell if uname -r | grep -q ^2.6; then echo "linux26"; else echo "linux24"; fi) +BUILDVER=$(shell if echo -n $(KERNEL_VERSION) | grep -q ^2.6; then echo "linux26"; else echo "linux24"; fi) MODCONF=$(shell if [ -d $(ROOT_PREFIX)/etc/modprobe.d ]; then echo "$(ROOT_PREFIX)/etc/modprobe.d/zaptel"; elif [ -d $(ROOT_PREFIX)/etc/modutils ]; then echo "$(ROOT_PREFIX)/etc/modutils/zaptel"; elif [ -f $(ROOT_PREFIX)/etc/modprobe.conf ]; then echo "$(ROOT_PREFIX)/etc/modprobe.conf"; elif [ -f $(ROOT_PREFIX)/etc/modules.conf ]; then echo "$(ROOT_PREFIX)/etc/modules.conf"; else echo $(ROOT_PREFIX)/etc/conf.modules ; fi) ifeq (${BUILDVER},linux24) @@ -71,7 +73,7 @@ PRIMARY=torisa #PRIMARY=wcfxo PWD=$(shell pwd) -KERNEL_SOURCE?=/lib/modules/`uname -r`/build +KERNEL_SOURCE?=/lib/modules/$(KERNEL_VERSION)/build all: $(BUILDVER) $(LIBTONEZONE) @@ -272,17 +274,17 @@ if [ -f zttool ]; then install -D -m 755 zttool $(INSTALL_PREFIX)/sbin/zttool; fi if [ -f zaptel.ko ]; then \ for x in $(MODULESKO) ztdummy.ko; do \ - install -D -m 644 $$x $(INSTALL_PREFIX)/lib/modules/`uname -r`/misc/$$x ; \ + install -D -m 644 $$x $(INSTALL_PREFIX)/lib/modules/$(KERNEL_VERSION)/misc/$$x ; \ done; \ if ! [ -f wcfxsusb.ko ]; then \ - rm -f $(INSTALL_PREFIX)/lib/modules/`uname -r`/misc/wcfxsusb.o; \ + rm -f $(INSTALL_PREFIX)/lib/modules/$(KERNEL_VERSION)/misc/wcfxsusb.o; \ fi; \ else \ for x in $(MODULESO); do \ - install -D -m 644 $$x $(INSTALL_PREFIX)/lib/modules/`uname -r`/misc/$$x ; \ + install -D -m 644 $$x $(INSTALL_PREFIX)/lib/modules/$(KERNEL_VERSION)/misc/$$x ; \ done; \ if ! [ -f wcfxsusb.o ]; then \ - rm -f $(INSTALL_PREFIX)/lib/modules/`uname -r`/misc/wcfxsusb.ko; \ + rm -f $(INSTALL_PREFIX)/lib/modules/$(KERNEL_VERSION)/misc/wcfxsusb.ko; \ fi; \ fi install -D -m 755 $(LIBTONEZONE) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE) @@ -324,7 +326,7 @@ if [ -d /etc/modutils ]; then \ /sbin/update-modules ; \ fi - [ `id -u` = 0 ] && /sbin/depmod -a || : + [ `id -u` = 0 ] && /sbin/depmod -a $(KERNEL_VERSION) || : [ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE) config: