]> bbs.cooldavid.org Git - jme.git/blobdiff - Makefile
jme: Cleanup PM operations after using new PM API
[jme.git] / Makefile
index 64e6dabb214079da760d18e9f7031800be2ad9f7..4285fbf4486f0aba793653e19c9bbbdba9e1f399 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,10 +15,11 @@ else
 #########################
 TEMPFILES := $(MODNAME).o $(MODNAME).mod.c $(MODNAME).mod.o Module.symvers .$(MODNAME).*.cmd .tmp_versions modules.order Module.markers Modules.symvers
 
-ifeq (,$(BUILD_KERNEL))
-BUILD_KERNEL=$(shell uname -r)
+ifeq (,$(KVER))
+KVER=$(shell uname -r)
 endif
-KSRC ?= /lib/modules/$(BUILD_KERNEL)/build
+KSRC ?= /lib/modules/$(KVER)/build
+MINSTDIR ?= /lib/modules/$(KVER)/kernel/drivers/net
 
 all: modules
        @rm -rf $(TEMPFILES)
@@ -34,11 +35,22 @@ namespacecheck: modules
        @rm -rf $(TEMPFILES)
 
 install: modules
-       $(MAKE) -C $(KSRC) M=`pwd` modules_install
+       install -m 644 $(MODNAME).ko $(MINSTDIR)
+       depmod -a $(KVER)
 
 patch:
        @/usr/bin/diff -uar -X dontdiff ../../trunc ./ > bc.patch || echo > /dev/null
 
+buildtest:
+       SRCDIRS=`find ~/linux-src -mindepth 1 -maxdepth 1 -type d -name 'linux-*' | sort -r -n`; \
+       for d in $${SRCDIRS}; do \
+               $(MAKE) clean && $(MAKE) -C . KSRC=$${d} modules; \
+               if [ $$? != 0 ]; then \
+                       exit $$?; \
+               fi; \
+       done
+       $(MAKE) clean
+
 clean:
        @rm -rf $(MODNAME).ko $(TEMPFILES)