Commit 413442f8 authored by Federico Vaga's avatar Federico Vaga

bld: move lib/ to tools/lib/ like in linux repo

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 829e9728
......@@ -2,13 +2,10 @@
#
# SPDX-FileCopyrightText: 2019 CERN
all: modules lib tools
lib:
@$(MAKE) -C lib $@
all: modules tools
tools:
@$(MAKE) -C tools $@
@$(MAKE) -C tools all
modules modules_install:
@$(MAKE) -C drivers/fmc/ $@
......@@ -19,11 +16,9 @@ sources srpm:
clean:
@$(MAKE) -C distribution $@
@$(MAKE) -C drivers/fmc/ $@
@$(MAKE) -C lib $@
@$(MAKE) -C tools $@
cppcheck:
@$(MAKE) -C lib $@
@$(MAKE) -C tools $@
.PHONY: sources srpm modules modules_install clean all cppcheck
.PHONY: sources srpm modules modules_install clean all cppcheck tools
......@@ -9,25 +9,30 @@
DESTDIR ?= /usr/local/
LIBFMC = ../lib/
LIB = ./lib/
TOOLS = lsfmc \
fmc-slot-eeprom
CFLAGS = -ggdb -I. -I$(LIBFMC) -I../kernel -Wall -Werror $(EXTRACFLAGS)
CFLAGS = -ggdb -I. -I$(LIB) -I../kernel -Wall -Werror $(EXTRACFLAGS)
GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
LDFLAGS = -L$(LIBFMC)
LDFLAGS = -L$(LIB)
LDLIBS = -lfmc
CPPCHECK ?= cppcheck
all: $(TOOLS)
$(TOOLS): $(COMMON_SRCS:.c=.o) $(LIBFMC)/libfmc.a
$(TOOLS): $(COMMON_SRCS:.c=.o) $(LIB)/libfmc.a
$(LIB)/libfmc.a:
@$(MAKE) -C $(shell dirname $@)
clean:
@$(MAKE) -C $(LIB) $@
rm -f $(TOOLS)
install:
......@@ -35,6 +40,7 @@ install:
install -D $(TOOLS) $(DESTDIR)/bin
cppcheck:
$(CPPCHECK) -q -I. -I$(LIBFMC) --suppress=missingIncludeSystem --enable=all *.c *.h --error-exitcode=1
@$(MAKE) -C $(LIB) $@
$(CPPCHECK) -q -I. -I$(LIB) --suppress=missingIncludeSystem --enable=all *.c *.h --error-exitcode=1
.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