aboutsummaryrefslogtreecommitdiff
path: root/extra/bearssl/build
diff options
context:
space:
mode:
Diffstat (limited to 'extra/bearssl/build')
-rwxr-xr-xextra/bearssl/build16
1 files changed, 5 insertions, 11 deletions
diff --git a/extra/bearssl/build b/extra/bearssl/build
index c0e5e7f2..4ee354ae 100755
--- a/extra/bearssl/build
+++ b/extra/bearssl/build
@@ -4,12 +4,7 @@ for patch in *.patch; do
patch -p1 < "$patch"
done
-kinstall() {
- mkdir -p "${3%/*}"; cp "$2" "$3"
- chmod "$1" "$3"
-}
-
-make "CC=${CC:=cc}" "AR=${AR:=ar}" LD=$CC
+make "CC=${CC:=cc}" "AR=${AR:=ar}" LD="$CC"
# Build static binary for bearssl, word splitting on CFLAGS is intentional.
# shellcheck disable=2086
@@ -20,8 +15,7 @@ make "CC=${CC:=cc}" "AR=${AR:=ar}" LD=$CC
build/libbearssl.a \
-o brssl
-kinstall 755 brssl "$1/usr/bin/brssl"
-kinstall 644 build/libbearssl.a "$1/usr/lib/libbearssl.a"
-kinstall 755 build/libbearssl.so "$1/usr/lib/libbearssl.so"
-
-mv inc "$1/usr/include"
+clinst -Dm755 brssl "$1/usr/bin/brssl"
+clinst -Dm644 build/libbearssl.a "$1/usr/lib/libbearssl.a"
+clinst -Dm755 build/libbearssl.so "$1/usr/lib/libbearssl.so"
+clinst -Dm644 -t "$1/usr/include" inc/*.h