]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/Makefile.std
LinCAN version and documentation updated to 0.3.5 and build portability fixes.
[lincan.git] / lincan / src / Makefile.std
index 037766c4550a30e5ec1452c7351742cf9fe70083..49c49563bc54247625678d29940f76671e00d136 100644 (file)
@@ -103,6 +103,10 @@ ifeq ($(KERNEL_VERSION),)
 KERNEL_VERSION=$(shell grep UTS_RELEASE ${KERNEL_LOCATION}/include/linux/utsrelease.h | \
                  sed 's/[^"]*"\(.*\)\{1\}"/\1/')
 endif
+ifeq ($(KERNEL_VERSION),)
+KERNEL_VERSION=$(shell grep UTS_RELEASE ${KERNEL_LOCATION}/include/generated/utsrelease.h | \
+                 sed 's/[^"]*"\(.*\)\{1\}"/\1/')
+endif
 
 #$(warning KERNEL_VERSION = $(KERNEL_VERSION))
 
@@ -143,7 +147,7 @@ endif
 # Target object file if any
 # this must be undefined for 2.5.xx kernels
 ifndef KERNEL_MODULE_V26
-O_TARGET     = can.o
+O_TARGET     = lincan.o
 endif
 # Regular object files
 O_OBJS      += $(SUPPORTED_CARDS:%=%.o)
@@ -166,9 +170,11 @@ LX_OBJS      =
 EXTRA_CFLAGS +=
 
 # Linux 2.4.2 and newer build system needs next
-can-objs = $(O_OBJS)
+lincan-objs = $(O_OBJS)
+ifndef KERNEL_MODULE_V26
 obj-y = $(O_OBJS)
-obj-m = can.o
+endif
+obj-m = lincan.o
 
 ifndef KERNEL_MODULE_V26
 FINAL_MODULE_OBJS=$(obj-m)
@@ -194,8 +200,8 @@ make_this_module: lincan_config.h
        echo Linux kernel version $(KERNEL_VERSION)
        echo Linux kernel sources $(KERNEL_LOCATION)
        echo Module target $(obj-m)
-       echo Module objects $(can-objs)
-       DIR=`pwd`; (cd $(KERNEL_LOCATION); make SUBDIRS=$$DIR modules)
+       echo Module objects $(lincan-objs)
+       DIR=`pwd`; (cd $(KERNEL_LOCATION); make M=$$DIR SUBDIRS=$$DIR modules)
 
 make_this_module_dep:
        DIR=`pwd`; (cd $(KERNEL_LOCATION); make SUBDIRS=$$DIR dep)