-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbld.sh
More file actions
executable file
·49 lines (37 loc) · 1.39 KB
/
bld.sh
File metadata and controls
executable file
·49 lines (37 loc) · 1.39 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
#!/bin/sh
# bld.sh - build the programs on Linux.
# Update TOC in doc
for F in *.md; do :
if egrep "<!-- mdtoc-start -->" $F >/dev/null; then :
# Update doc table of contents (see https://github.com/fordsfords/mdtoc).
if which mdtoc.pl >/dev/null; then mdtoc.pl -b "" $F;
elif [ -x ../mdtoc/mdtoc.pl ]; then ../mdtoc/mdtoc.pl -b "" $F;
else echo "FYI: mdtoc.pl not found; see https://github.com/fordsfords/mdtoc"; fi
fi
done
if [ ! -f lbm.sh ]; then :
echo "No 'lbm.sh', no tools built."
exit 1
fi
. ./lbm.sh
# For Linux
LIBS="-l pthread -l m -l rt"
echo "Building code"
gcc -Wall -g $LIBS \
-o um_lat_jitter cprt.c um_lat_jitter.c
if [ $? -ne 0 ]; then echo error in um_lat_jitter.c; exit 1; fi
gcc -Wall -g -I $LBM/include -I $LBM/include/lbm -L $LBM/lib -l lbm $LIBS \
-o um_lat_ping cprt.c um_lat_ping.c
if [ $? -ne 0 ]; then echo error in um_lat_ping.c; exit 1; fi
gcc -Wall -g -I $LBM/include -I $LBM/include/lbm -L $LBM/lib -l lbm $LIBS \
-o um_lat_pong cprt.c um_lat_pong.c
if [ $? -ne 0 ]; then echo error in um_lat_pong.c; exit 1; fi
gcc -Wall -g $LIBS \
-o sock_send cprt.c sock_send.c
javac $CP lbmpong.java
if [ $? -ne 0 ]; then echo error in lbmpong.java; exit 1; fi
javac $CP UmLatPing.java
if [ $? -ne 0 ]; then echo error in UmLatPing.java; exit 1; fi
javac $CP UmLatPong.java
if [ $? -ne 0 ]; then echo error in UmLatPong.java; exit 1; fi
echo "Success"