Commit 711bde0f authored by Federico Vaga's avatar Federico Vaga

Merge branch '24-remvoe-vme-dependency-in-makefile' into 'master'

Resolve "Remvoe VME dependency in Makefile"

Closes #24

See merge request be-cem-edl/fec/hardware-modules/fmc-tdc-1ns-5cha!8
parents 224130bd 3c9ae4b9
......@@ -38,8 +38,6 @@ documentation:
- $EDL_CI_EOS_OUTPUT_DIR
.script_fetch_kernel_dep: &script_fetch_kernel_dep
- git clone --depth 1 https://gitlab.cern.ch/cohtdrivers/coht.git ~/git/coht
- export VMEBUS=~/git/coht/vmebridge-ng
- git clone -b v1.1.5 --depth 1 https://ohwr.org/project/fmc-sw.git ~/git/fmc
- export FMC=~/git/fmc
- git clone -b v1.4.4 --depth 1 https://ohwr.org/project/zio.git ~/git/zio
......
......@@ -18,7 +18,7 @@ tools: lib
DESTDIR ?= /usr/local
.PHONY: all clean modules install modules_install $(DIRS)
.PHONY: all clean cppcheck flawfinder modules install modules_install $(DIRS)
install modules_install:
......@@ -33,5 +33,5 @@ modules_install: TARGET = modules_install
$(DIRS):
$(MAKE) -C $@ $(TARGET)
cppcheck:
for d in $(DIRS); do $(MAKE) -C $$d cppcheck || exit 1; done
flawfinder cppcheck:
for d in $(DIRS); do $(MAKE) -C $$d $@ || exit 1; done
......@@ -12,6 +12,7 @@ REPO_PARENT ?= $(TOPDIR)/..
TDC_HDL := $(TOPDIR)/hdl
CPPCHECK ?= cppcheck
FLAWFINDER ?= flawfinder
DKMS ?= 0
CURDIR := $(shell /bin/pwd)
KVERSION ?= $(shell uname -r)
......@@ -21,7 +22,6 @@ WBGEN2 ?= wbgen2
ifdef REPO_PARENT
ZIO ?= $(REPO_PARENT)/fmc/zio
FMC ?= $(REPO_PARENT)/fmc-sw
VMEBUS ?= $(REPO_PARENT)/vmebridge-ng
endif
ifeq ($(DKMS), 1)
......@@ -37,9 +37,6 @@ endif
ifndef FMC
$(error "Missing FMC environment variable")
endif
ifndef VMEBUS
$(error "Missing VMEBUS environment variable")
endif
ZIO_ABS ?= $(abspath $(ZIO))
ZIO_EXTRA_SYMBOLS-y = $(ZIO_ABS)/drivers/zio/Module.symvers
......@@ -75,7 +72,7 @@ modules: hw_headers
FMC_EXTRA_SYMBOLS-y=$(FMC_EXTRA_SYMBOLS-y) \
ZIO_VERSION=$(ZIO_VERSION) \
GIT_VERSION=$(GIT_VERSION) \
VMEBUS_ABS=$(VMEBUS_ABS) modules
$@
install modules_install: modules
$(MAKE) -C $(KERNELSRC) M=$(CURDIR) modules_install
......@@ -90,3 +87,6 @@ clean:
cppcheck:
$(CPPCHECK) -q -I. -I$(ZIO_ABS)/include -I$(FMC_BUS_ABS)/ --enable=all *.c *.h
flawfinder:
$(FLAWFINDER) -SQDC --error-level=3 .
......@@ -14,8 +14,14 @@ IGNORE_CPU_SUFFIX := y
REPO_PARENT ?=$(shell pwd)/../../../
-include $(REPO_PARENT)/parent_common.mk
ZIO ?= ../zio
ZIO_ABS ?= $(abspath $(ZIO) )
ifdef REPO_PARENT
ZIO ?= $(REPO_PARENT)/zio
endif
ifndef ZIO
$(error "Missing ZIO environment variable")
endif
ZIO_ABS ?= $(abspath $(ZIO))
VERSION := $(shell git describe --tags --abbrev=0 | tr -d 'v')
SO_VERSION_XYZ := $(shell echo $(VERSION) | grep -o -E "[0-9]+\.[0-9]+\.[0-9]")
......@@ -74,8 +80,8 @@ cppcheck:
$(CPPCHECK) -q -I. -I../kernel -I $(ZIO_ABS)/include --suppress=missingIncludeSystem --enable=warning,style,information,missingInclude *.c *.h
flawfinder:
$(FLAWFINDER) -SQDC --error-level=5 .
$(FLAWFINDER) -SQDC --error-level=6 .
-include .depend
.PHONY=cppcheck
.PHONY: cppcheck flawfinder
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