configure
changeset 473 8cecdb44533e
parent 467 40efa79d27dd
child 494 aa36efce6e78
equal deleted inserted replaced
472:4f5cb68098cf 473:8cecdb44533e
    65 
    65 
    66 ###########################################################################
    66 ###########################################################################
    67 #                             DEFAULT BUILD OPTIONS                       #
    67 #                             DEFAULT BUILD OPTIONS                       #
    68 ###########################################################################
    68 ###########################################################################
    69 
    69 
    70 # Leave empty for automatic detection
       
    71 CC=
       
    72 CXX=
       
    73 LD=
       
    74 
       
    75 #default target
    70 #default target
    76 SUB_TARGET=
    71 SUB_TARGET=
    77 
    72 
    78 # First compiler option - we will check if it exists
    73 # First compiler option - we will check if it exists
    79 CC1=gcc
    74 CC1=gcc
   104 	
    99 	
   105 	case $1 in
   100 	case $1 in
   106 	--cc=*)		CC=$optarg;;
   101 	--cc=*)		CC=$optarg;;
   107 	--cxx=*)	CXX=$optarg;;
   102 	--cxx=*)	CXX=$optarg;;
   108 	--ld=*)		LD=$optarg;;
   103 	--ld=*)		LD=$optarg;;
       
   104 	--binutils=*)   BINUTILS_PREFIX=$optarg;;
   109 	--arch=*)	SUB_ARCH_NAME=$optarg;;
   105 	--arch=*)	SUB_ARCH_NAME=$optarg;;
   110 	--os=*)		SUB_OS_NAME=$optarg;;
   106 	--os=*)		SUB_OS_NAME=$optarg;;
   111 	--kerneldir=*)	SUB_KERNELDIR=$optarg;;
   107 	--kerneldir=*)	SUB_KERNELDIR=$optarg;;
   112 	--prefix=*)	SUB_PREFIX=$optarg;;
   108 	--prefix=*)	SUB_PREFIX=$optarg;;
   113 	--target=*)	SUB_TARGET=$optarg;;
   109 	--target=*)	SUB_TARGET=$optarg;;
   160 		echo	"               \"lincan\" lincan driver"
   156 		echo	"               \"lincan\" lincan driver"
   161 		echo	"                 see http://www.ocera.org/download/components/WP7/lincan-0.3.3.html"
   157 		echo	"                 see http://www.ocera.org/download/components/WP7/lincan-0.3.3.html"
   162 		echo	"               \"can4linux\" can4linux driver"
   158 		echo	"               \"can4linux\" can4linux driver"
   163 		echo	"                 see http://www.port.de/engl/canprod/hw_can4linux.html"
   159 		echo	"                 see http://www.port.de/engl/canprod/hw_can4linux.html"
   164 		echo 	" --timers=foo  Use 'foo' as TIMERS driver (can be 'unix', 'xeno', 'rtai' or 'kernel')"
   160 		echo 	" --timers=foo  Use 'foo' as TIMERS driver (can be 'unix', 'xeno', 'rtai' or 'kernel')"
   165 		echo 	" --wx=foo  force result of WxWidgets detection (0 or 1)"
   161 		echo 	" --wx=foo      Force result of WxWidgets detection (0 or 1)"
       
   162 		echo 	" --binutils=path   Override binutils path detection (as regards \$CC content)"
   166 		echo 	" --disable-dll Disable run-time dynamic linking of can, led and nvram drivers"
   163 		echo 	" --disable-dll Disable run-time dynamic linking of can, led and nvram drivers"
   167 		echo 	" --enable-lss  Enable the LSS services"
   164 		echo 	" --enable-lss  Enable the LSS services"
   168 		echo 	" --enable-lss-fs  Enable the LSS FastScan service"
   165 		echo 	" --enable-lss-fs  Enable the LSS FastScan service"
   169 		echo	" --disable-Ox  Disable gcc \"-Ox\" optimizations."
   166 		echo	" --disable-Ox  Disable gcc \"-Ox\" optimizations."
   170 		echo	" --debug=foo,foo,..   Enable debug messages, ERR -> only errors, WAR)."
   167 		echo	" --debug=foo,foo,..   Enable debug messages, ERR -> only errors, WAR)."
   494 	exit -1
   491 	exit -1
   495 fi
   492 fi
   496 
   493 
   497 echo "Using ${CC} as a C compiler"
   494 echo "Using ${CC} as a C compiler"
   498 
   495 
   499 SUB_BINUTILS_PREFIX=`echo "$CC" | sed 's/gcc$//'`
   496 if [ "$BINUTILS_PREFIX" = "" ]; then
       
   497 	SUB_BINUTILS_PREFIX=`echo "$CC" | sed 's/gcc$//'`
       
   498 else
       
   499 	SUB_BINUTILS_PREFIX=$BINUTILS_PREFIX
       
   500 fi
   500 
   501 
   501 if [ "$CXX" = "" ]; then
   502 if [ "$CXX" = "" ]; then
   502 	CXX=${SUB_BINUTILS_PREFIX}g++
   503 	CXX=${SUB_BINUTILS_PREFIX}g++
   503 fi
   504 fi
   504 
   505