-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmk
More file actions
executable file
·98 lines (79 loc) · 2.04 KB
/
Copy pathmk
File metadata and controls
executable file
·98 lines (79 loc) · 2.04 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/env bash
#
# 2025-03-22 16:21:10 dpw
#
set -eu
export os="$(uname -s)"
export arch="$(uname -m)"
[ $os == "Linux" ] && {
export CC=/usr/local/bin/gcc
export CXX=/usr/local/bin/g++
export FLAGS="-j8"
} || {
export FLAGS="-j20"
}
# parse the cli
while [[ $# -gt 0 ]]
do
case $1 in
init)
[ -d build ] || mkdir build
(cd build && cmake ..)
shift
;;
build)
clear
(cd build && time make $FLAGS || exit 1)
shift
;;
test)
./build/perf-timer ls -la
shift
;;
run)
./build/perf-timer help
./build/perf-timer ls -l ../perf-timer
shift
;;
format)
clang-format -i include/perftimer/*.hpp src/*.cpp
git status -s
shift
;;
clean)
(cd build && make clean)
shift
;;
clob*)
/bin/rm -fr build/
shift
;;
watch)
watchexec -c -w src/ -w include/ -e h,hpp,cpp ./mk build run
exit 0
;;
pull)
git pull
shift
;;
help)
echo "Targets:"
echo ""
echo " init : run the cmake command to create the build folder"
echo " build : compile cryptor to the build folder"
echo " run : runs the web server app"
echo " format : runs clang-format over includes and src"
echo " watch : run watcher over source and include"
echo " pull : pull the latest repo changes"
echo " clean : remove binary builds but leave the build folder"
echo " clobber : remove the entire build folder"
echo " verbose : show a verbose build"
echo " help : show this help"
exit 0
;;
*)
./mk help
exit 0
;;
esac
done