Merge https://github.com/leif81/bti into main tree
[gregoa/bti.git] / autogen.sh
1 #!/bin/sh -e
2
3 autoreconf --install --symlink
4
5 CFLAGS="-g -Wall \
6 -Wmissing-declarations -Wmissing-prototypes \
7 -Wnested-externs -Wpointer-arith \
8 -Wpointer-arith -Wsign-compare -Wchar-subscripts \
9 -Wstrict-prototypes -Wshadow \
10 -Wformat=2 -Wtype-limits"
11
12 case "$1" in
13         *install|"")
14                 export CFLAGS="$CFLAGS -O2"
15                 echo "   configure:  $args"
16                 echo
17                 ./configure $args
18                 ;;
19         *devel)
20                 export CFLAGS="$CFLAGS -O0"
21                 echo "   configure:  $args"
22                 echo
23                 ./configure $args
24                 ;;
25         *clean)
26                 ./configure
27                 make maintainer-clean
28                 git clean -f -X
29                 exit 0
30                 ;;
31         *)
32                 echo "Usage: $0 [--install|--devel|--clean]"
33                 exit 1
34                 ;;
35 esac