Commit 0f5308b1 authored by Federico Vaga's avatar Federico Vaga

bld: improve makefiles

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 42c7f455
...@@ -30,4 +30,4 @@ $(DIRS): ...@@ -30,4 +30,4 @@ $(DIRS):
$(MAKE) -C $@ $(TARGET) $(MAKE) -C $@ $(TARGET)
cppcheck: cppcheck:
for d in $(DIRS); do $(MAKE) -C $$d cppcheck || exit 1; done for d in $(DIRS); do $(MAKE) -C $$d $@ || exit 1; done
...@@ -15,7 +15,7 @@ KVERSION ?= $(shell uname -r) ...@@ -15,7 +15,7 @@ KVERSION ?= $(shell uname -r)
KERNELSRC ?= /lib/modules/$(KVERSION)/build KERNELSRC ?= /lib/modules/$(KVERSION)/build
ifdef REPO_PARENT ifdef REPO_PARENT
ZIO ?= $(REPO_PARENT)/fmc/zio ZIO ?= $(REPO_PARENT)/zio
FMC ?= $(REPO_PARENT)/fmc-sw FMC ?= $(REPO_PARENT)/fmc-sw
endif endif
......
...@@ -6,12 +6,19 @@ ...@@ -6,12 +6,19 @@
-include Makefile.specific -include Makefile.specific
# include parent_common.mk for buildsystem's defines # include parent_common.mk for buildsystem's defines
IGNORE_CPU_SUFFIX := y
REPO_PARENT= $(shell pwd)/../../.. REPO_PARENT= $(shell pwd)/../../..
-include $(REPO_PARENT)/parent_common.mk -include $(REPO_PARENT)/parent_common.mk
ifdef REPO_PARENT
ZIO ?= $(REPO_PARENT)/zio
FMC ?= $(REPO_PARENT)/fmc-sw
endif
ZIO ?= ../zio ifndef ZIO
ZIO_ABS ?= $(abspath $(ZIO) ) $(error "Missing ZIO environment variable")
endif
ZIO_ABS ?= $(abspath $(ZIO))
VERSION := $(shell git describe --tags --abbrev=0 | tr -d 'v') 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]") SO_VERSION_XYZ := $(shell echo $(VERSION) | grep -o -E "[0-9]+\.[0-9]+\.[0-9]")
...@@ -75,4 +82,4 @@ cppcheck: ...@@ -75,4 +82,4 @@ cppcheck:
-include .depend -include .depend
.PHONY=cppcheck .PHONY: cppcheck
...@@ -54,3 +54,5 @@ install: ...@@ -54,3 +54,5 @@ install:
cppcheck: cppcheck:
$(CPPCHECK) -q -I. -I../kernel -I$(LIBFD) --suppress=missingIncludeSystem --enable=all *.c *.h $(CPPCHECK) -q -I. -I../kernel -I$(LIBFD) --suppress=missingIncludeSystem --enable=all *.c *.h
.PHONY: cppcheck
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