Commit bc0882cd authored by Vaibhav Gupta's avatar Vaibhav Gupta

kernel: Makefile: Restructure the makefile

Simplify the recipes and remove unused variables
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
parent b9ea64f5
......@@ -10,8 +10,6 @@ include $(TOP_DIR)/common.mk
KVERSION ?= $(shell uname -r)
KERNELSRC ?= /lib/modules/$(KVERSION)/build
INSTALL_MOD_PATH ?=
INSTALL_MOD_DIR ?= extra/cern/spec-fmc-carrier
CONFIG_FPGA_MGR_BACKPORT ?= n
......@@ -55,8 +53,9 @@ help coccicheck:
headers:
$(MAKE) -C $(HDR_DIR) $@
install: modules_install
modules: headers
modules_install modules: headers
$(MAKE) -C $(KERNELSRC) M=$(shell pwd) \
VERSION=$(GIT_VERSION) \
FPGA_MGR_ABS=$(FPGA_MGR_ABS) \
......@@ -65,19 +64,10 @@ modules: headers
I2C_ABS=$(I2C_ABS) \
SPI_ABS=$(SPI_ABS) \
$@
install: modules_install
modules_install: modules
@$(MAKE) -C $(KERNELSRC) M=$(shell pwd) \
INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) \
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
$@
clean:
@rm -f spec-core-fpga.h
@$(MAKE) -C $(KERNELSRC) M=$(shell pwd) $@
INCLUDE := -I./
cppcheck:
$(CPPCHECK) -q $(INCLUDE) --suppress=missingIncludeSystem --enable=all *.c *.h --error-exitcode=1
$(CPPCHECK) -q -I. -I$(KERNELSRC) --suppress=missingIncludeSystem --enable=all *.c *.h --error-exitcode=1
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