Commit 1675887a authored by Vaibhav Gupta's avatar Vaibhav Gupta

Rename variable 'LINUX' to 'KERNELSRC'

Variable name 'LINUX' is very ambiguous for its purpose in the makefile.
Also, this project builds as a part of COHT project which uses another
variable name 'KERNELSRC' for the same purpose. Hence, this change makes
this project uniform with others.
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
parent 7d089f1a
......@@ -59,7 +59,7 @@ To install this software package, you need to tell it where your
kernel sources live, so the package can pick the right header files.
You need to set only one environment variable:
LINUX
KERNELSRC
The top-level directory of the Linux kernel you are compiling
against. If not set, the default may work if you compile in the same
host where you expect to run the driver.
......@@ -69,7 +69,7 @@ Most likely, this is all you need to set. After this, you can
run:::
make
sudo make install LINUX=$LINUX
sudo make install KERNELSRC=$KERNELSRC
After installation, your carrier driver should load automatically
(for example, the PCI bus will load ``spec-fmc-carrier.ko``), but
......
......@@ -13,11 +13,11 @@ directory or fail with an error like:::
make: \*\*\* /lib/modules/3.10/build: No such file or directory.
This happens when you compiled by setting ``LINUX=`` and your
This happens when you compiled by setting ``KERNELSRC=`` and your
*sudo* is not propagating the environment to its child processes.
In this case, you should run this command instead::
sudo make modules_install LINUX=$LINUX
sudo make modules_install KERNELSRC=$KERNELSRC
Version Mismatch
================
......
......@@ -12,7 +12,7 @@ CPPCHECK ?= cppcheck
DKMS ?= 0
CURDIR := $(shell /bin/pwd)
KVERSION ?= $(shell uname -r)
LINUX ?= /lib/modules/$(KVERSION)/build
KERNELSRC ?= /lib/modules/$(KVERSION)/build
ifdef REPO_PARENT
ZIO ?= $(REPO_PARENT)/fmc/zio
......@@ -46,7 +46,7 @@ GIT_VERSION = $(shell git describe --always --dirty --long --tags)
all: modules
clean modules:
$(MAKE) -C $(LINUX) M=$(CURDIR) ZIO_ABS=$(ZIO_ABS) FMC_ABS=$(FMC_ABS) \
$(MAKE) -C $(KERNELSRC) M=$(CURDIR) ZIO_ABS=$(ZIO_ABS) FMC_ABS=$(FMC_ABS) \
ZIO_EXTRA_SYMBOLS-y=$(ZIO_EXTRA_SYMBOLS-y) \
FMC_EXTRA_SYMBOLS-y=$(FMC_EXTRA_SYMBOLS-y) \
ZIO_VERSION=$(ZIO_VERSION) \
......@@ -54,7 +54,7 @@ clean modules:
$@
install modules_install: modules
$(MAKE) -C $(LINUX) M=$(CURDIR) modules_install
$(MAKE) -C $(KERNELSRC) M=$(CURDIR) modules_install
cppcheck:
$(CPPCHECK) -q -I. -I$(ZIO_ABS)/include -I$(FMC_BUS_ABS)/ --enable=all *.c *.h
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment