1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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}"
|