New Makefile target 'install' to simplify the installation process.
Thanks!
git-svn-id: svn://svn.berlios.de//socketcan/trunk@324
030b6a49-0b11-0410-94ab-
b0dab22257f2
TOPDIR = $(shell pwd)
-KERNELDIR = /lib/modules/`uname -r`/build
+KERNELVER = $(shell uname -r)
+KERNELDIR = /lib/modules/$(KERNELVER)/build
+MOD_DIR = /lib/modules/$(KERNELVER)/kernel
SUBDIRS = \
$(TOPDIR)/net/can \
@$(call targetinfo, "running make in drivers/net/can")
cd drivers/net/can && make KERNELDIR=$(KERNELDIR)
+install: net drivers
+ find -name \*.ko -exec install -v -D {} $(MOD_DIR)/{} \;
+ depmod $(KERNELVER)
+
clean:
@for dir in $(SUBDIRS); do \
$(call targetinfo, "cleaning in $$dir"); \