3 # Get invocation path (which could be a symlink in $PATH)
10 fullpath=`readlink -f "$fullpath"`
13 BASEDIR=`dirname "$fullpath"`
17 _linktype=Applications
19 while [[ $# -gt 0 ]]; do
35 _ldflags=$_ldflags" -shared -lc -lgcc"
39 _cflags=$_cflags" $1 $2"
49 _ldflags=$_ldflags" ${arg}"
59 _miscargs=$_miscargs" $1"
72 make --no-print-directory -f $BASEDIR/getconfig.mk ARCH=x86 TYPE=$_linktype > $cfgfile
76 #echo "_compile = $_compile, _preproc = $_preproc"
78 if [[ $_preproc -eq 1 ]]; then
79 run $_CC -E $CFLAGS $_cflags $_miscargs $_outfile
80 elif [[ $_makedep -eq 1 ]]; then
81 run $_CC -M $CFLAGS $_cflags $_miscargs $_outfile
82 elif [[ $_compile -eq 1 ]]; then
83 run $_CC $CFLAGS $_cflags $_miscargs -c $_outfile
84 elif echo " $_miscargs" | grep '\.c' >/dev/null; then
85 tmpout=`mktemp acess_gccproxy.XXXXXXXXXX.o --tmpdir`
86 run $_CC $CFLAGS $_cflags $_miscargs -c -o $tmpout
87 run $_LD $LDFLAGS $_ldflags $_libs $tmpout $_outfile -lgcc $_libs
90 run $_LD$_ldflags $_miscargs $_outfile $LDFLAGS $_libs