Adding depends content in the dependencies for static & shared C libs.

This commit is contained in:
Philippe PITTOLI 2020-04-27 02:12:17 +02:00
parent e5683bd69d
commit b3c1b42704
2 changed files with 7 additions and 1 deletions

View File

@ -4,6 +4,9 @@ function sharedlib.build {
for i in ${src[@]}; do for i in ${src[@]}; do
write -n " ${i%.*}.o" write -n " ${i%.*}.o"
done done
for i in ${depends[@]}; do
write -n " ${i}"
done
write " ${depends[$target]} $(dirdep $target)" write " ${depends[$target]} $(dirdep $target)"
write "\t@echo '$(LD ${target})'" write "\t@echo '$(LD ${target})'"
write -n "\t$Q\$(CC) -o ${target} -shared \$(LDFLAGS)" write -n "\t$Q\$(CC) -o ${target} -shared \$(LDFLAGS)"

View File

@ -1,9 +1,12 @@
function staticlib.build { function staticlib.build {
write -n "${target}:" write -n "${target}:"
for i in ${src[@]} ${depends[@]}; do for i in ${src[@]}; do
write -n " ${i%.c}.o" write -n " ${i%.c}.o"
done done
for i in ${depends[@]}; do
write -n " ${i}"
done
write " ${depends[$target]} $(dirdep $target)" write " ${depends[$target]} $(dirdep $target)"
write "\t@echo '$(LD ${target})'" write "\t@echo '$(LD ${target})'"
write -n "\t$Q\$(AR) rc '${target}'" write -n "\t$Q\$(AR) rc '${target}'"