Mercurial > hg > octave-nkf
diff mkoctfile.in @ 4873:0358ed4394f5
[project @ 2004-04-22 05:51:20 by jwe]
author | jwe |
---|---|
date | Thu, 22 Apr 2004 05:51:20 +0000 |
parents | a62215ab8a03 |
children | f0f3ccba4388 |
line wrap: on
line diff
--- a/mkoctfile.in +++ b/mkoctfile.in @@ -74,6 +74,7 @@ defs= ldflags= dbg=: +pass_on_options= strip=false no_oct_file_strip_on_this_platform=%NO_OCT_FILE_STRIP% link=true @@ -160,6 +161,8 @@ -v, --verbose Echo commands as they are executed. + -W Pass flags though the compiler like -Wl,-rpath=... + FILE Compile or link FILE. Recognized file types are: .c C source @@ -217,6 +220,9 @@ --link-stand-alone) link_stand_alone=true ;; + -W*) + pass_on_options="$pass_on_options $1" + ;; *) echo "mkoctfile: unrecognized argument $1" 1>&2 exit 1 @@ -300,7 +306,7 @@ if [ -n "$F77" ]; then o=$b.o objfiles="$objfiles $o" - cmd="$F77 -c $FPICFLAG $ALL_FFLAGS $f -o $o" + cmd="$F77 -c $FPICFLAG $ALL_FFLAGS $pass_on_options $f -o $o" $dbg $cmd eval $cmd elif [ -n "$F2C" ]; then @@ -321,7 +327,7 @@ b=`echo $f | $SED 's,\.c$,,'` o=$b.o objfiles="$objfiles $o" - cmd="$CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $incflags $defs $f -o $o" + cmd="$CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $pass_on_options $incflags $defs $f -o $o" $dbg $cmd eval $cmd else @@ -346,7 +352,7 @@ esac o=$b.o objfiles="$objfiles $o" - cmd="$CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $incflags $defs $f -o $o" + cmd="$CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $pass_on_options $incflags $defs $f -o $o" $dbg $cmd eval $cmd else @@ -375,7 +381,7 @@ if $link; then if $link_stand_alone; then if [ -n "$LD_CXX" ]; then - cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $output_option $objfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $LIBREADLINE $LIBS $FLIBS" + cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $pass_on_options $output_option $objfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $LIBREADLINE $LIBS $FLIBS" $dbg $cmd eval $cmd else @@ -384,7 +390,7 @@ fi else LINK_DEPS="$LFLAGS $OCTAVE_LIBS $LDFLAGS $BLAS_LIBS $FFTW_LIBS $LIBS $FLIBS" - cmd="$DL_LD $DL_LDFLAGS -o $octfile $objfiles $ldflags $LINK_DEPS" + cmd="$DL_LD $DL_LDFLAGS $pass_on_options -o $octfile $objfiles $ldflags $LINK_DEPS" $dbg $cmd eval $cmd fi