build.sh
changeset 23 a5c3269e6d99
parent 21 9884f4078c68
equal deleted inserted replaced
22:9adb804d66b0 23:a5c3269e6d99
     1 #!/bin/sh
     1 #!/bin/bash
     2 #
     2 #
     3 # Need to install the following on Ubuntu 12.04:
     3 # Need to install the following on Ubuntu 12.04:
     4 # - cmake
     4 # - cmake
     5 # - libgtk2.0-dev
     5 # - libgtk2.0-dev
     6 # - libxtst-dev
     6 # - libxtst-dev
     7 #
     7 #
     8 # If you find other deps, add them here
     8 # If you find other deps, add them here
     9 
     9 
    10 cmake -DCMAKE_BUILD_TYPE=Release .
    10 NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
    11 make
    11 let NCPU=$NCPU+2
       
    12 echo "Will build with 'make -j$NCPU' ... please edit this script if incorrect."
       
    13 
       
    14 set -x
       
    15 rm -rf cmake-build
       
    16 mkdir -p cmake-build
       
    17 cd $_
       
    18 cmake -DCMAKE_BUILD_TYPE=Release ..
       
    19 make -j$NCPU && cp -a 1pass ..
       
    20 cd ..
       
    21