diff --git a/build.sh b/build.sh index e356e99..58bd62b 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # shellcheck disable=2086 -[ -z "$CFLAGS" ] && CFLAGS='-O2 -Wall -Wextra -pedantic' +[ -z "$CFLAGS" ] && CFLAGS='-Os -Wall -Wextra -pedantic' CLANG=clang STRIP=llvm-strip @@ -45,3 +45,5 @@ zig/zig cc $CFLAGS -Ijni-headers oc2rnet.c -static -shared -target x86_64-linux- zig/zig cc $CFLAGS -Ijni-headers oc2rnet.c -static -shared -target aarch64-linux-musl -o liboc2rnet-arm64.so zig/zig cc $CFLAGS -Ijni-headers oc2rnet.c -shared -target x86_64-windows-gnu -o oc2rnet-x86_64.dll -licmp zig/zig cc $CFLAGS -Ijni-headers oc2rnet.c -shared -target aarch64-windows-gnu -o oc2rnet-arm64.dll -licmp + +$STRIP *.so