dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 301a13bf370157535b52d35a54b50d0ecfbb78cf
parent b50b804ea8838a6bd5ac63fe3d574762eef4c89e
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Wed, 21 May 2014 12:52:56 +0200

option to add compiler flags as crun arguments

Diffstat:
Mbin/crun | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/bin/crun b/bin/crun @@ -7,7 +7,7 @@ # Define compilers and the common compiler flags CC=gcc CXX=g++ -CFLAGS="-g -Wall -Wextra -lm" +CFLAGS="-g -Wall -Wextra " fullfilename=$(basename $1) extension="${fullfilename##*.}" @@ -20,21 +20,20 @@ tmpname=/tmp/$filename function compile { if [ -e $tmpname ]; then if [[ $2 -nt $tmpname ]]; then - #echo $1 $2 -o $tmpname $CFLAGS - $1 $2 -o $tmpname $CFLAGS + $1 $2 -o $tmpname $CFLAGS $3 $4 $5 $6 $7 $8 $9 fi else - $1 $2 -o $tmpname $CFLAGS + $1 $2 -o $tmpname $CFLAGS $3 $4 $5 $6 $7 $8 $9 fi } # Compile source to file in /tmp if [ "$extension" == "c" ]; then - compile $CC $1 + compile $CC $1 $2 $3 $4 $5 $6 $7 $8 $9 fi if [ "$extension" == "cpp" ]; then - compile $CXX $1 + compile $CXX $1 $2 $3 $4 $5 $6 $7 $8 $9 fi $tmpname