aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2023-05-23 17:02:57 -0400
committerjgmdev <jgmdev@gmail.com>2024-03-13 15:04:16 -0400
commit1b804dca9db26013d1522a27b24fdb58c6e14b75 (patch)
tree61cf31b7df179b20cda18d9eee04952bcde6e88a /build.sh
parentf677376167b401b2c8f9154ac30fcd21b8aff238 (diff)
downloadpragtical-plugin-manager-1.2.4.tar.gz
pragtical-plugin-manager-1.2.4.zip
Project rebrandingv1.2.4stable
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index be5e260..3c83541 100755
--- a/build.sh
+++ b/build.sh
@@ -3,14 +3,14 @@
: ${CC=gcc}
: ${AR=ar}
: ${MAKE=make}
-: ${BIN=lpm}
+: ${BIN=ppm}
: ${JOBS=4}
SRCS="src/*.c"
CFLAGS="$CFLAGS -Ilib/prefix/include"
LDFLAGS="$LDFLAGS -lm -Llib/prefix/lib"
-[[ "$@" == "clean" ]] && rm -rf lib/libgit2/build lib/zlib/build lib/libzip/build lib/mbedtls/build lib/prefix lua $BIN *.exe src/lpm.luac src/lpm.lua.c && exit 0
+[[ "$@" == "clean" ]] && rm -rf lib/libgit2/build lib/zlib/build lib/libzip/build lib/mbedtls/build lib/prefix lua $BIN *.exe src/ppm.luac src/ppm.lua.c && exit 0
cmake --version >/dev/null 2>/dev/null || { echo "Please ensure that you have cmake installed." && exit -1; }
# Build supporting libraries, libz, libmbedtls, libmbedcrypto, libgit2, libzip, libmicrotar, liblua
@@ -38,9 +38,9 @@ fi
[[ "$@" != *"-llua"* ]] && CFLAGS="$CFLAGS -Ilib/lua -DMAKE_LIB=1" && SRCS="$SRCS lib/lua/onelua.c"
# Build the pre-packaged lua file into the executbale.
-if [[ "$@" == *"-DLPM_STATIC"* ]]; then
+if [[ "$@" == *"-DPPM_STATIC"* ]]; then
[[ ! -e "lua.exe" ]] && { gcc -Ilib/lua -o lua.exe lib/lua/onelua.c -lm || exit -1; }
- ./lua.exe -e 'io.open("src/lpm.lua.c", "wb"):write("unsigned char lpm_luac[] = \""..string.dump(loadfile("src/lpm.lua")):gsub(".",function(c) return string.format("\\x%02X",string.byte(c)) end).."\";unsigned int lpm_luac_len = sizeof(lpm_luac)-1;")'
+ ./lua.exe -e 'io.open("src/ppm.lua.c", "wb"):write("unsigned char ppm_luac[] = \""..string.dump(loadfile("src/ppm.lua")):gsub(".",function(c) return string.format("\\x%02X",string.byte(c)) end).."\";unsigned int ppm_luac_len = sizeof(ppm_luac)-1;")'
fi
[[ $OSTYPE != 'msys'* && $CC != *'mingw'* && $CC != "emcc" ]] && CFLAGS="$CFLAGS -DLUA_USE_LINUX" && LDFLAGS="$LDFLAGS -ldl"