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

master
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
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)"

View File

@ -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}'"