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 @@ ...@@ -2,13 +2,10 @@
# #
# SPDX-FileCopyrightText: 2019 CERN # SPDX-FileCopyrightText: 2019 CERN
all: modules lib tools all: modules tools
lib:
@$(MAKE) -C lib $@
tools: tools:
@$(MAKE) -C tools $@ @$(MAKE) -C tools all
modules modules_install: modules modules_install:
@$(MAKE) -C drivers/fmc/ $@ @$(MAKE) -C drivers/fmc/ $@
...@@ -19,11 +16,9 @@ sources srpm: ...@@ -19,11 +16,9 @@ sources srpm:
clean: clean:
@$(MAKE) -C distribution $@ @$(MAKE) -C distribution $@
@$(MAKE) -C drivers/fmc/ $@ @$(MAKE) -C drivers/fmc/ $@
@$(MAKE) -C lib $@
@$(MAKE) -C tools $@ @$(MAKE) -C tools $@
cppcheck: cppcheck:
@$(MAKE) -C lib $@
@$(MAKE) -C tools $@ @$(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 @@ ...@@ -9,25 +9,30 @@
DESTDIR ?= /usr/local/ DESTDIR ?= /usr/local/
LIBFMC = ../lib/ LIB = ./lib/
TOOLS = lsfmc \ TOOLS = lsfmc \
fmc-slot-eeprom 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) GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\"" CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
LDFLAGS = -L$(LIBFMC) LDFLAGS = -L$(LIB)
LDLIBS = -lfmc LDLIBS = -lfmc
CPPCHECK ?= cppcheck CPPCHECK ?= cppcheck
all: $(TOOLS) 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: clean:
@$(MAKE) -C $(LIB) $@
rm -f $(TOOLS) rm -f $(TOOLS)
install: install:
...@@ -35,6 +40,7 @@ install: ...@@ -35,6 +40,7 @@ install:
install -D $(TOOLS) $(DESTDIR)/bin install -D $(TOOLS) $(DESTDIR)/bin
cppcheck: 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 .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