#!/bin/sh # file : etc/environments/default # copyright : Copyright (c) 2014-2019 Code Synthesis Ltd # license : TBC; see accompanying LICENSE file # # Environment setup script for C/C++ compilation. # # NOTE: don't forget to adjust the target mode selection below. # c=gcc cxx=g++ # $1 - target # $2 - bbot executable # $3+ - bbot options set -e # Exit on errors. # Based on target determine what we are building. # mode= case "$1" in x86_64-*) #mode="config.cc.coptions+=-m64" ;; i?86-*) mode="config.cc.coptions+=-m32" ;; *) echo "unknown target: '$1'" 1>&2 exit 1 ;; esac shift exec "$@" cc config.c="$c" config.cxx="$cxx" $mode