summaryrefslogblamecommitdiff
path: root/build.sh
blob: 1affb18b569188da75ad16f84aed93e5721c5ecc (plain) (tree)
1
2
3
4
5
6
7
8
9

           





                          
           

                                
             
        
                                    
                 
                                               

                                  
                                    
                 
                               
  
        
             
    
         
#!/bin/bash

CMD="$1"

if [[ -z "${CMD}" ]]; then
    export CMD="default"
fi

mkdir build
# this need for some outdated os
mkdir m4
autoreconf -i
cd build
if [[ "${CMD}" == "default" ]]; then
    export CC=gcc
    ../configure --enable-sanitize --enable-lto
elif [[ "${CMD}" == "old" ]]; then
    ../configure
elif [[ "${CMD}" == "gprof" ]]; then
    export CC=gcc
    ../configure --enable-gprof
fi
make -j3
export RET=$?
cd -
exit $RET