X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/21d8a0ab23ef9aa66557c7645c604887497f188a..f77a6eb55fdb81f0aebffa7010d5038e95dfacab:/lincan/src/Makefile.std diff --git a/lincan/src/Makefile.std b/lincan/src/Makefile.std index 037766c..49c4956 100644 --- a/lincan/src/Makefile.std +++ b/lincan/src/Makefile.std @@ -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)