Commit b5284a79 authored by Vaibhav Gupta's avatar Vaibhav Gupta

software: kernel: Makefile: check for dependencies

The building of the 'software/' directory will fail if the project
doesn't know the path to 'vme-bridge', 'fpga-mgr-backpoirt', 'fmc',
'i2c', and 'spi' projects.

Thus, to make the error more clear, let the build system directly point
out that a project is missing, instead of complaining for missing
headers.
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
parent 291d9fb1
......@@ -11,6 +11,30 @@ HDL_DIR ?= $(TOP_DIR)/hdl
KVERSION ?= $(shell uname -r)
KERNELSRC ?= /lib/modules/$(KVERSION)/build
CONFIG_FPGA_MGR_BACKPORT ?= n
# The following environment variables store the path of respective projects.
ifndef VMEBRIDGE
$(error "Missing VMEBRIDGE environment variable")
endif
ifeq ($(CONFIG_FPGA_MGR_BACKPORT),y)
ifndef FPGA_MGR
$(error "Missing FPGA_MGR environment variable")
endif
endif
ifndef FMC
$(error "Missing FMC environment variable")
endif
ifndef I2C
$(error "Missing I2C environment variable")
endif
ifndef SPI
$(error "Missing SPI environment variable")
endif
VMEBRIDGE_ABS ?= $(abspath $(VMEBRIDGE))
FPGA_MGR_ABS ?= $(abspath $(FPGA_MGR))
FMC_ABS ?= $(abspath $(FMC))
......@@ -21,8 +45,6 @@ VERSION = $(shell git describe --dirty --long --tags)
CHEBY ?= cheby
CONFIG_FPGA_MGR_BACKPORT ?= n
all: modules
.PHONY: all modules clean help install modules_install coccicheck svec-core-fpga.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