-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtasks.sh
executable file
·58 lines (47 loc) · 901 Bytes
/
tasks.sh
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/zsh
PROJ_ROOT=${PWD}
SRC_ROOT=${PROJ_ROOT}/src
LIB_ROOT=${PROJ_ROOT}/liblifehash
TARGET_OPT=
# TARGET_OPT="-target apple-darwin-x86_64"
# TARGET_OPT="-target apple-darwin-arm64"
# OPTIMIZE_OPT="--debug -O0"
OPTIMIZE_OPT=-O3
if [[ "$OSTYPE" == "linux"* ]]; then
export CFLAGS="${TARGET_OPT} ${OPTIMIZE_OPT}"
export CXXFLAGS="${CFLAGS} -std=c++17"
export CPPFLAGS=
export LDFLAGS="${TARGET_OPT}"
else
export CFLAGS="${TARGET_OPT} ${OPTIMIZE_OPT} -fdiagnostics-absolute-paths"
export CXXFLAGS="${CFLAGS} -std=c++17 -stdlib=libc++"
export CPPFLAGS=
export LDFLAGS="${TARGET_OPT} -lstdc++"
fi
clean()
(
make clean
)
configure()
(
./configure --prefix=${PREFIX:-/usr/local}
clean
)
build()
(
make liblifehash
make test
dsymutil test/test
)
check()
(
make check
)
install()
(
make install
)
uninstall()
(
make uninstall
)