aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2022-12-04 15:33:16 -0500
committerAdam Harrison <adamdharrison@gmail.com>2022-12-04 15:33:16 -0500
commit50ceefd226c785bd7226e66ed42c7ea499fb0480 (patch)
tree18154e931ceecb58ab927ff7d409a26fd5dfba39
parent9d674fc0937c8843d1c0bef98e72cd39864f08bd (diff)
downloadlite-xl-plugin-manager-50ceefd226c785bd7226e66ed42c7ea499fb0480.tar.gz
lite-xl-plugin-manager-50ceefd226c785bd7226e66ed42c7ea499fb0480.zip
Made build clearer.
-rw-r--r--README.md9
-rwxr-xr-xbuild.sh6
2 files changed, 11 insertions, 4 deletions
diff --git a/README.md b/README.md
index e388ada..380fa5c 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,14 @@ If you want to build it quickly, and have the right modules installed, you can
do:
```
-./build.sh -lz -lssl -lgit2 -lcurl -llua -lcrypto -larchive -llzma
+./build.sh -DLPM_LIVE=1 -lgit2 -lzip -llua -lm -lmbedtls -lmbedx509 -lmbedcrypto -lz
+```
+
+OR
+
+```
+gcc -DLPM_LIVE=1 src/lpm.c lib/microtar/src/microtar.c -Ilib/microtar/src -lz -lgit2 \
+ -lzip -llua -lm -lmbedtls -lmbedx509 -lmbedcrypto -o lpm
```
CI is enabled on this repository, so you can grab Windows and Linux builds from the
diff --git a/build.sh b/build.sh
index 362ae8e..3e070c0 100755
--- a/build.sh
+++ b/build.sh
@@ -8,11 +8,11 @@
SRCS="src/*.c"
CFLAGS="$CFLAGS -Ilib/prefix/include"
-LDFLAGS="$LDFLAGS -lm -pthread -static-libgcc -Llib/prefix/lib"
+LDFLAGS="$LDFLAGS -lm -static-libgcc -Llib/prefix/lib"
[[ "$@" == "clean" ]] && rm -rf lib/libgit2/build lib/zlib/build lib/libzip/build lib/mbedtls-2.27.0/build lib/prefix lua $BIN *.exe src/lpm.luac src/lpm.lua.c && exit 0
-# Build supporting libraries, libz, libmbedtls, libmbedcrypto, libgit2, liblzma, libarchive, liblua
+# Build supporting libraries, libz, libmbedtls, libmbedcrypto, libgit2, libzip, libmicrotar, liblua
CMAKE_DEFAULT_FLAGS=" $CMAKE_DEFAULT_FLAGS -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=`pwd`/lib/prefix -DCMAKE_INSTALL_PREFIX=`pwd`/lib/prefix -DBUILD_SHARED_LIBS=OFF"
mkdir -p lib/prefix/include lib/prefix/lib
if [[ "$@" != *"-lz"* ]]; then
@@ -42,7 +42,7 @@ if [[ "$@" != *"-DLPM_LIVE" ]]; then
xxd -i src/lpm.luac > src/lpm.lua.c
fi
-[[ $OSTYPE != 'msys'* && $CC != *'mingw'* && $CC != "emcc" ]] && LDFLAGS=" $LDFLAGS -ldl -pthread"
+[[ $OSTYPE != 'msys'* && $CC != *'mingw'* && $CC != "emcc" ]] && LDFLAGS=" $LDFLAGS -ldl"
[[ $OSTYPE == 'msys'* || $CC == *'mingw'* ]] && LDFLAGS="$LDFLAGS -lbcrypt -lws2_32 -lz -lwinhttp -lole32 -lcrypt32 -lrpcrt4"
[[ " $@" != *" -g"* && " $@" != *" -O"* ]] && CFLAGS="$CFLAGS -O3" && LDFLAGS="$LDFLAGS -s"