summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..9446ceb
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,42 @@
+blddir="${1}"
+hdrdir="${2}"
+libdir="${3}"
+
+if [ -z "${blddir}" ]
+then
+ echo "Build directory not set!"
+ exit 1
+fi
+
+if [ -z "${hdrdir}" ]
+then
+ echo "Header directory not set!"
+ exit 1
+fi
+
+if [ -z "${libdir}" ]
+then
+ echo "Library directory not set!"
+ exit 1
+fi
+
+rm -fr "${blddir}"
+cmake -B"${blddir}" -DCMAKE_BUILD_TYPE="Release" -DZP_ENABLE_SYSTEM_CALLS="True" -DZP_LIBRARY_TYPE="Shared" -DZP_TARGET="$(./getTarget.sh)"
+cmake --build build
+
+mkdir -pvm755 "${hdrdir}/zp/priv"
+mkdir -pvm755 "${hdrdir}/zp/"{"bs","mem","str"}".d"
+mkdir -pvm755 "${hdrdir}/zp/mth.d/"{"pair","vec2","vec3","vec4"}
+mkdir -pvm755 "${libdir}"
+
+install -vm644 "zp/include/zp/"{"bs","mem","mth","str"}{"",".h"} "${hdrdir}/zp"
+install -vm644 "zp/include/zp/priv/"{arch,chr,flt,impl,int,os,std}".h" "${hdrdir}/zp/priv"
+install -vm644 "zp/include/zp/bs.d/"{"isconsteval","syscl","trp","urch"}".ii" "${hdrdir}/zp/bs.d"
+install -vm644 "zp/include/zp/mem.d/"{"cpy","equ","fil","memcpy","memequ","memfil","memsrh","srh"}".ii" "${hdrdir}/zp/mem.d"
+install -vm644 "zp/include/zp/mth.d/"{"abs","dist","divmod","dot","exp","isnan","vadd","vsub"}".ii" "${hdrdir}/zp/mth.d"
+install -vm644 "zp/include/zp/mth.d/pair/cpair.ii" "${hdrdir}/zp/mth.d/pair"
+install -vm644 "zp/include/zp/mth.d/vec2/cvec.ii" "${hdrdir}/zp/mth.d/vec2"
+install -vm644 "zp/include/zp/mth.d/vec3/cvec.ii" "${hdrdir}/zp/mth.d/vec3"
+install -vm644 "zp/include/zp/mth.d/vec4/cvec.ii" "${hdrdir}/zp/mth.d/vec4"
+install -vm644 "zp/include/zp/str.d/"{"fmt","fmtlen","numdig","strcpy","strequ","strlen","strsrh","utf16dec","utf16declen","utf16enc","utf16enclen","utf8dec","utf8declen","utf8enc","utf8enclen","win1252dec","win1252enc"}".ii" "${hdrdir}/zp/str.d"
+install -vm755 "${blddir}/zp/libzp.so" "${libdir}"