all: modules tools
.PHONY: modules
-modules: configcheck $(TOP)/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
-
-$(addprefix $(obj)/, $(obj-y:/=)): $(TOP)/svnversion.h
-
-$(TOP)/svnversion.h:
- @cd $(TOP) && \
- 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
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
done
-$(MAKE) -C $(TOOLS) clean
rm -rf .tmp_versions
- rm -f modules.order *.symvers Module.markers svnversion.h
+ rm -f modules.order *.symvers Module.markers
.PHONY: info
info:
@# check kernel version
@case $(KERNELRELEASE) in \
- 2.[456].*) ;; \
+ 2.6.*) ;; \
[3-9].*) ;; \
*) echo "FAILED"; \
- echo "Only kernel versions 2.4.x and above are supported."; \
+ echo "Only kernel versions 2.6.13 and above are supported."; \
echo "You have $(KERNELRELEASE)."; \
exit 1 ;; \
esac
fi
@echo "ok."
+
+.PHONY: depmod
+depmod:
+ifeq ($(DESTDIR),)
+ /sbin/depmod -aeF $(KERNELPATH)/System.map $(KERNELRELEASE)
+endif