X-Git-Url: http://git.ozo.com/?p=madwifi%2F.git;a=blobdiff_plain;f=Makefile;h=fa4e355763b0818c5fc193453f81b568d4fce938;hp=4d263ee014c3cd4325290b950519c35b5d79f7d4;hb=HEAD;hpb=2cb388736941852c65d215cc1baf8e182f860d45 diff --git a/Makefile b/Makefile index 4d263ee..fa4e355 100644 --- a/Makefile +++ b/Makefile @@ -43,40 +43,20 @@ 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 -ifdef LINUX24 - for i in $(obj-y); do \ - $(MAKE) -C $$i || exit 1; \ - done -else +modules: configcheck $(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 @@ -95,18 +75,19 @@ install-modules: modules for i in $(obj-y); do \ $(MAKE) -C $$i install || exit 1; \ done -ifeq ($(DESTDIR),) - (export KMODPATH=$(KMODPATH); /sbin/depmod -ae $(KERNELRELEASE)) -endif + $(MAKE) depmod .PHONY: install-tools install-tools: tools $(MAKE) -C $(TOOLS) install || exit 1 -.PHONY: uninstall ininstall-modules +.PHONY: uninstall uninstall: uninstall-tools uninstall-modules + +.PHONY: uninstall-modules uninstall-modules: sh scripts/find-madwifi-modules.sh -r $(KERNELRELEASE) $(DESTDIR) + $(MAKE) depmod .PHONY: list-modules find-modules list-modules: find-modules @@ -129,17 +110,12 @@ clean: done -$(MAKE) -C $(TOOLS) clean rm -rf .tmp_versions - rm -f *.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 +147,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.6.*) ;; \ + [3-9].*) ;; \ + *) echo "FAILED"; \ + echo "Only kernel versions 2.6.13 and above are supported."; \ + echo "You have $(KERNELRELEASE)."; \ + exit 1 ;; \ + esac @# check kernel configuration @if [ -z "$(CONFIG_SYSCTL)" ]; then \ @@ -210,3 +188,9 @@ endif fi @echo "ok." + +.PHONY: depmod +depmod: +ifeq ($(DESTDIR),) + /sbin/depmod -aeF $(KERNELPATH)/System.map $(KERNELRELEASE) +endif