Commit 7fa9fc8e 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 6f83695a
......@@ -317,7 +317,7 @@ kernel sources live, so the package can pick the right header files.
You need to set only one environment variable:
@table @code
@item LINUX
@item 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
......@@ -330,7 +330,7 @@ run:
@example
make
sudo make install LINUX=$LINUX
sudo make install KERNELSRC=$KERNELSRC
@end example
In addition to the normal installation procedure for
......@@ -347,7 +347,7 @@ can be performed by:
@example
make
sudo make prereq_install LINUX=$LINUX
sudo make prereq_install KERNELSRC=$KERNELSRC
@end example
The step is not performed by default to avoid overwriting some
......@@ -796,12 +796,12 @@ directory or fail with an error like:
make: *** /lib/modules/2.6.37+/build: No such file or directory.
@end smallexample
This happens when you compiled by setting @code{LINUX=} and your
This happens when you compiled by setting @code{KERNELSRC=} and your
@i{sudo} is not propagating the environment to its child processes.
In this case, you should run this command instead
@smallexample
sudo make modules_install LINUX=$LINUX
sudo make modules_install KERNELSRC=$KERNELSRC
@end smallexample
@c ==========================================================================
......
......@@ -15,7 +15,7 @@ CPPCHECK ?= cppcheck
DKMS ?= 0
CURDIR := $(shell /bin/pwd)
KVERSION ?= $(shell uname -r)
LINUX ?= /lib/modules/$(KVERSION)/build
KERNELSRC ?= /lib/modules/$(KVERSION)/build
WBGEN2 ?= wbgen2
ifdef REPO_PARENT
......@@ -73,7 +73,7 @@ channel_regs.h: $(TDC_HDL)/rtl/wbgen/channel_regs.wb
$(WBGEN2) -s defines -C hw/$@ $<
modules: hw_headers
$(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) \
......@@ -81,9 +81,9 @@ modules: hw_headers
VMEBUS_ABS=$(VMEBUS_ABS) modules
install modules_install: modules
$(MAKE) -C $(LINUX) M=$(CURDIR) modules_install
$(MAKE) -C $(KERNELSRC) M=$(CURDIR) modules_install
# be able to run the "clean" rule even if $(LINUX) is not valid
# be able to run the "clean" rule even if $(KERNELSRC) is not valid
clean:
rm -rf *.o *~ .*.cmd *.ko *.mod.c .tmp_versions Module.symvers \
Module.markers modules.order
......
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