diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2001-04-06 15:49:42 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2001-04-06 15:49:42 +0000 |
commit | 908d32f84c33a4192b8381d74fc6bccc73e309f9 (patch) | |
tree | 2c1ff01bd2b872db32745d9cd4ce093575331de3 /linux | |
parent | 2bd9bf98c7bc0c23870f86f97341197114c3e70a (diff) |
search /lib/modules/<version>/build/include first, then the others....
Diffstat (limited to 'linux')
-rw-r--r-- | linux/Makefile.linux | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/linux/Makefile.linux b/linux/Makefile.linux index 702fca0d..95044e6f 100644 --- a/linux/Makefile.linux +++ b/linux/Makefile.linux @@ -90,9 +90,10 @@ PRGLIBS = # This may not be correct, but it is the best assumption we can make. VERSION := $(shell uname -r) -A := /usr/src/linux-$(VERSION)/include -B := /usr/src/linux/include -C := /usr/include +A := /lib/modules/$(VERSION)/build/include +B := /usr/src/linux-$(VERSION)/include +C := /usr/src/linux/include +D := /usr/include V := $(shell gcc -E -nostdinc -I$A picker.c 2>/dev/null \ | grep -s 'RELEASE = ' | cut -d' ' -f3) @@ -107,15 +108,21 @@ else V := $(shell gcc -E -nostdinc -I$C picker.c 2>/dev/null \ | grep -s 'RELEASE = ' | cut -d' ' -f3) ifeq ($(V),"$(VERSION)") - TREE := $C + TREE := $C +else + V := $(shell gcc -E -nostdinc -I$D picker.c 2>/dev/null \ + | grep -s 'RELEASE = ' | cut -d' ' -f3) +ifeq ($(V),"$(VERSION)") + TREE := $D else TREE := 0 endif endif endif +endif ifeq ($(TREE),0) -all:; @echo Error: Could not locate kernel tree in $A $B $C +all:; @echo Error: Could not locate kernel tree in $A $B $C $D else SMP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'SMP = ' | cut -d' ' -f3) |