Fix compatibility with procfs API changes in Linux 3.10
[madwifi/.git] / Makefile
index 6b5f1c80143ac5d60022e73a7a12444f5c8aea95..371d9312b7eae3b60673cd7e80e1ee211ce9a65b 100644 (file)
--- a/Makefile
+++ b/Makefile
 obj := $(firstword $(obj) $(SUBDIRS) .)
 TOP = $(obj)
 
-ifneq (svnversion.h,$(MAKECMDGOALS))
 include $(TOP)/Makefile.inc
-endif
 
 obj-y := ath/ ath_hal/ ath_rate/ net80211/
 
+ifdef CRYPTO_TESTING
+obj-y += regression/
+endif
+
 .PHONY: all
 all: modules tools
 
 .PHONY: modules
-modules: configcheck svnversion.h
+modules: configcheck
 ifdef LINUX24
        for i in $(obj-y); do \
                $(MAKE) -C $$i || exit 1; \
@@ -62,22 +64,6 @@ else
        $(MAKE) -C $(KERNELPATH) SUBDIRS=$(shell pwd) modules
 endif
 
-.PHONY: svnversion.h
-svnversion.h:
-       @if [ -d .svn ]; then \
-               ver=$$(svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//'); \
-               echo "#define SVNVERSION \"svn r$$ver\"" > $@.tmp; \
-       elif [ -d .git ]; then \
-               ver=$$(git svn log | head -n2 | tail -n1 | cut -d\  -f1); \
-               echo "#define SVNVERSION \"svn $$ver\"" > $@.tmp; \
-       elif [ -s SNAPSHOT ]; then \
-               ver=$$(sed -e '/^Revision: */!d;s///;q' SNAPSHOT); \
-               echo "#define SVNVERSION \"svn r$$ver\"" > $@.tmp; \
-       else \
-               touch $@.tmp; \
-       fi || exit 1; \
-       diff $@ $@.tmp >/dev/null 2>&1 || cp -f $@.tmp $@; rm -f $@.tmp
-
 # conflicts with the 'tools' subdirectory
 .PHONY: tools
 tools:
@@ -129,17 +115,12 @@ clean:
        done
        -$(MAKE) -C $(TOOLS) clean
        rm -rf .tmp_versions
-       rm -f modules.order *.symvers svnversion.h
+       rm -f modules.order *.symvers Module.markers
 
 .PHONY: info
 info:
        @echo "The following settings will be used for compilation:"
-       @echo "TARGET       : $(TARGET)"
-       @echo "ARCH         : $(ARCH)"
        @echo "BUS          : $(BUS)"
-       @if [ -n "$(TOOLPATH)" ]; then \
-           @echo "TOOLPATH     : $(TOOLPATH)"; \
-       fi      
        @echo "KERNELRELEASE: $(KERNELRELEASE)"
        @echo "KERNELPATH   : $(KERNELPATH)"
        @echo "KERNELCONF   : $(KERNELCONF)"
@@ -171,13 +152,15 @@ unload:
 configcheck: sanitycheck
        @echo -n "Checking kernel configuration... "
        
-       @# check version of kernel
-       @echo $(KERNELRELEASE) | grep -q -i '^[2-9]\.[4-9]\.' || { \
-           echo "FAILED"; \
-           echo "Only kernel versions 2.4.x and above are supported."; \
-           echo "You have $(KERNELRELEASE)."; \
-           exit 1; \
-       }
+       @# check kernel version
+       @case $(KERNELRELEASE) in \
+           2.[456].*) ;; \
+           [3-9].*) ;; \
+           *) echo "FAILED"; \
+              echo "Only kernel versions 2.4.x and above are supported."; \
+              echo "You have $(KERNELRELEASE)."; \
+              exit 1 ;; \
+       esac
        
        @# check kernel configuration
        @if [ -z "$(CONFIG_SYSCTL)" ]; then \