aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2022-12-04 15:03:08 -0500
committerAdam Harrison <adamdharrison@gmail.com>2022-12-04 15:03:08 -0500
commit85b453cec99b80a5bea4f0777d19676486ac15e7 (patch)
tree997e9b599f0652f3f41bac462c3a4ca0bffeb2c1 /build.sh
parentba7ffadd3cb4bd3a0aaa9fc1b9e33e3702eb57df (diff)
downloadlite-xl-plugin-manager-85b453cec99b80a5bea4f0777d19676486ac15e7.tar.gz
lite-xl-plugin-manager-85b453cec99b80a5bea4f0777d19676486ac15e7.zip
Got rid of makefile for zlib. Unecessary.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 9087cff..c1980cf 100755
--- a/build.sh
+++ b/build.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
: ${CC=gcc}
+: ${AR=ar}
: ${MAKE=make}
: ${BIN=lpm}
: ${JOBS=4}
@@ -16,8 +17,7 @@ CMAKE_DEFAULT_FLAGS=" $CMAKE_DEFAULT_FLAGS -DCMAKE_BUILD_TYPE=Release -DCMAKE_PR
mkdir -p lib/prefix/include lib/prefix/lib
if [[ "$@" != *"-lz"* ]]; then
[ ! -e "lib/zlib" ] && echo "Make sure you've cloned submodules. (git submodule update --init --depth=1)" && exit -1
- [[ ! -e "lib/zlib/build" && $OSTYPE != 'msys'* ]] && cd lib/zlib && mkdir build && cd build && ../configure --static --prefix=`pwd`/../../prefix && $MAKE -j $JOBS && $MAKE install && cd ../../../
- [[ ! -e "lib/zlib/build" && $OSTYPE == 'msys'* ]] && cd lib/zlib && mkdir build && $MAKE -f win32/Makefile.gcc -j $JOBS && cp *.a ../prefix/lib && cp *.h ../prefix/include && cd ../../
+ [[ ! -e "lib/zlib/build" && $OSTYPE != 'msys'* ]] && cd lib/zlib && mkdir build && cd build && $CC -I.. ../*.c -c && ar rc libz.a *.o && cp libz.a ../../prefix/lib && cp ../*.h ../../prefix/include && cd ../../../
LDFLAGS="$LDFLAGS -l:libz.a"
fi
if [[ "$@" != *"-lmbedtls"* && "$@" != *"-lmbedcrypto"* ]]; then