make/chklib.sh@31d73d150c76
make/chklib.sh
Thu, 03 Sep 2026 12:13:05 +0200
- author
- Mike Becker <universe@uap-core.de>
- date
- Thu, 03 Sep 2026 12:13:05 +0200
- changeset 214
- 31d73d150c76
- parent 197
-
9cbd4f09a22f
- permissions
- -rwxr-xr-x
make all should really build all (including the tests)
we removed the tests from the all-target initially
because they will cause warnings with compilers not
supporting C23
but we should not care too much about this
#!/bin/sh
libname="$1"
cc="$CC"
if test -z "$cc"; then cc=cc; fi
if test -z "$libname"; then exit 1; fi
echo 'int main(){return 0;}' > .chklib-test.c
if $cc -o /dev/null .chklib-test.c "-l$libname" ; then
rm .chklib-test.c
exit 0
else
rm .chklib-test.c
exit 1
fi