summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile11
1 files changed, 8 insertions, 3 deletions
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)