From b3c1b427043372e24971869422f8995a439a0b3a Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Mon, 27 Apr 2020 02:12:17 +0200 Subject: [PATCH] Adding depends content in the dependencies for static & shared C libs. --- build/sharedlib.zsh | 3 +++ build/staticlib.zsh | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/sharedlib.zsh b/build/sharedlib.zsh index 4cff424..0819527 100644 --- a/build/sharedlib.zsh +++ b/build/sharedlib.zsh @@ -4,6 +4,9 @@ function sharedlib.build { for i in ${src[@]}; do write -n " ${i%.*}.o" done + for i in ${depends[@]}; do + write -n " ${i}" + done write " ${depends[$target]} $(dirdep $target)" write "\t@echo '$(LD ${target})'" write -n "\t$Q\$(CC) -o ${target} -shared \$(LDFLAGS)" diff --git a/build/staticlib.zsh b/build/staticlib.zsh index e4f44f4..ec1d1e8 100644 --- a/build/staticlib.zsh +++ b/build/staticlib.zsh @@ -1,9 +1,12 @@ function staticlib.build { write -n "${target}:" - for i in ${src[@]} ${depends[@]}; do + for i in ${src[@]}; do write -n " ${i%.c}.o" done + for i in ${depends[@]}; do + write -n " ${i}" + done write " ${depends[$target]} $(dirdep $target)" write "\t@echo '$(LD ${target})'" write -n "\t$Q\$(AR) rc '${target}'"