correct lib rule
authorMazet Laurent <laurent.mazet@thalesgroup.com>
Tue, 27 May 2025 17:19:14 +0000 (19:19 +0200)
committerMazet Laurent <laurent.mazet@thalesgroup.com>
Tue, 27 May 2025 17:19:14 +0000 (19:19 +0200)
.gitignore
makefile

index c6775da5ec0be795bd2ae18ba18f90e8e3088859..2b71b233aecbf8fe4df58baaa40663b980b60cb7 100644 (file)
@@ -1,5 +1,6 @@
 *.d
 *.ld
+*.lld
 *.o
 *.exe
 *.a
index 84a07fc08b3dafe7fb33751b304364805d610963..1fcd3b31b1b0d436c641ff1637d1cedca17ca955 100644 (file)
--- 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)}') > $@