9 MAKEOPT
="--quiet -j$(($(grep processor /proc/cpuinfo | wc -l) + 1))"
10 CPPFLAGS
="$(llvm-config --cppflags)"
11 CFLAGS
="$CPPFLAGS -W -Wall -Wstrict-prototypes -pipe"
12 CFLAGS
="$CFLAGS -Wfloat-equal -Wundef -Wshadow -Wpointer-arith"
13 CFLAGS
="$CFLAGS -Wmissing-declarations -Wnested-externs"
14 CFLAGS
="$CFLAGS -Wmissing-prototypes"
15 CXXFLAGS
="$CPPFLAGS -W -Wall -pipe -Wundef -Wshadow -Wpointer-arith -Wabi -std=c++0x"
21 --verbose verbose Makefiles
23 --no-debug disable debug
29 until [[ $# -eq 0 ]] ;
34 MAKEOPT
="$(echo $MAKEOPT | sed s,--quiet,,g)"
52 [[ $# -eq 1 ]] && { echo --build-dir requiers an argument
; exit 2; }
63 if ! which ccache
2>&1 >/dev
/null
; then
67 if [[ $DEBUG -eq 0 ]]; then
68 CFLAGS
="$CFLAGS -DNDEBUG"
69 CXXFLAGS
="$CXXFLAGS -DNDEBUG"
71 CFLAGS
="$CFLAGS -ggdb"
72 CXXFLAGS
="$CXXFLAGS -ggdb"
75 if [[ $CCACHE = "ON" ]] ; then
77 ln -sf $
(which ccache
) .ccache
/g
++
78 ln -sf $
(which ccache
) .ccache
/gcc
79 export CC
="$PWD/.ccache/gcc"
80 export CXX
="$PWD/.ccache/g++"
91 -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE \
92 -DCMAKE_COLOR_MAKEFILE=$COLOR \