-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·23 lines (21 loc) · 979 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash -ve
shopt -s expand_aliases
alias GCC="gcc -g -pthread -O3 -DBUILDDATE=\"\\\"$(date)\\\"\" -DVERSION=\"\\\"$(git describe)\\\"\""
#GCC -o nlri-unittest nlri-unittest.c libutil.c
GCC -o logbuffer-test logbuffer-test.c libutil.c
GCC -o kakapo main.c session.c stats.c libutil.c parsearg.c
#GCC timedloop-unittest.c libutil.c -o timedloop-unittest
#GCC -o bytestring-unittest bytestring-unittest.c libutil.c
#GCC libutil.c update-unittest.c -o update-unittest
#GCC -I. test/hostaddress.c util.c -o test/hostaddress
set +v
echo "built version $(git describe)"
##
## the following macro expansions also works....
#alias GCC="gcc -g -pthread -O3 -D_GNU_SOURCE"
#VERSION="$(git describe)"
#DATE="$(date)"
#GCC -o kakapo main.c session.c stats.c libutil.c parsearg.c -DVERSION="\"$VERSION\"" -DBUILDDATE="\"$DATE\""
#DVERSION="-DVERSION=\"$(git describe)\""
#DDATE="-DBUILDDATE=\"$(date)\""
#GCC -o kakapo main.c session.c stats.c libutil.c parsearg.c "$DVERSION" "$DDATE"