From 37c79d55d217342d668e32960ad1cb207be1ad6d Mon Sep 17 00:00:00 2001 From: Mazet Laurent Date: Tue, 27 May 2025 19:19:14 +0200 Subject: [PATCH] correct lib rule --- .gitignore | 1 + makefile | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c6775da..2b71b23 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.d *.ld +*.lld *.o *.exe *.a diff --git a/makefile b/makefile index 84a07fc..1fcd3b3 100644 --- a/makefile +++ b/makefile @@ -94,10 +94,10 @@ count: clean: $(call TITLE, "Cleaning") touch clean - rm -f clean $(wildcard *.d *.ld *.log *.o *.test *~ .exec_* gmon.out _) + rm -f clean $(wildcard *.d *.ld *.lld *.log *.o *.test *~ .exec_* gmon.out _) $(call PASS, SUCCESS) -depends: $(patsubst %.c, %.d, $(wildcard *.c)) $(patsubst %, %.ld, $(ALLEXE)) +depends: $(patsubst %.c, %.d, $(wildcard *.c)) $(patsubst %, %.ld, $(ALLEXE)) $(patsubst %, %.lld, $(ALLDLL)) documentation: doxygen.conf $(shell awk '{sub(/#.*/,"")} /^FILE_PATTERNS/,!/\\$$/ {sub(/\\$$/,"");sub(/.*=/,"");print}' doxygen.conf) doxygen $<; true @@ -138,6 +138,7 @@ tests: include $(wildcard *.d) include $(wildcard *.ld) +include $(wildcard *.lld) gcov_%: $(MAKE) purge @@ -196,6 +197,11 @@ valgrind_%: %.exe $(MV) $@~ $@ $(call PASS, SUCCESS) +lib%.lld: %.c + $(call TITLE, "Building $@") + echo ${@:.lld=.a}: $(shell $(call GETCOMMENTS,$(AROPT), $<) | awk '{for (i=1;i<=NF;i++) if ($$(i) ~ /.o$$/) printf " %s", $$(i)}') > $@ + $(call PASS, SUCCESS) + %.ld: %.c $(call TITLE, "Building $@") echo ${<:.c=.exe}: $(shell $(call GETCOMMENTS,$(LDOPT), $<) | awk '{for (i=1;i<=NF;i++) if ($$(i) ~ /.o$$/) printf " %s", $$(i)}') > $@ -- 2.30.2