--extra-asflags=EASFLAGS add EASFLAGS to ASFLAGS
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS
--extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS
+ --extra-rcflags=ERCFLAGS add ERCFLAGS to RCFLAGS
Configuration options:
--disable-cli disable cli
log_check "whether $RC works"
echo "$1" > conftest.rc
if [ $compiler = ICL ]; then
- rc_cmd="$RC -foconftest.o conftest.rc"
+ rc_cmd="$RC $RCFLAGS -foconftest.o conftest.rc"
else
- rc_cmd="$RC -o conftest.o conftest.rc"
+ rc_cmd="$RC $RCFLAGS -o conftest.o conftest.rc"
fi
if $rc_cmd >conftest.log 2>&1; then
res=$?
LDFLAGS="$LDFLAGS"
LDFLAGSCLI="$LDFLAGSCLI"
ASFLAGS="$ASFLAGS"
+RCFLAGS="$RCFLAGS"
HAVE_GETOPT_LONG=1
cross_prefix=""
--extra-ldflags=*)
LDFLAGS="$LDFLAGS $optarg"
;;
+ --extra-rcflags=*)
+ RCFLAGS="$RCFLAGS $optarg"
+ ;;
--disable-thread)
thread="no"
;;
else
SYS="WINDOWS"
DEVNULL="NUL"
+ RC="${RC-${cross_prefix}windres}"
fi
;;
mingw*)
SYS="WINDOWS"
EXE=".exe"
DEVNULL="NUL"
+ [ $compiler = ICL ] && RC="${RC-rc}" || RC="${RC-${cross_prefix}windres}"
;;
sunos*|solaris*)
SYS="SunOS"
elif [ "$SYS" = WINDOWS -o "$SYS" = CYGWIN ]; then
ASFLAGS="$ASFLAGS -f win32 -DPREFIX"
LDFLAGS="$LDFLAGS -Wl,--large-address-aware"
+ [ $compiler = GNU ] && RCFLAGS="--target=pe-i386 $RCFLAGS"
else
ASFLAGS="$ASFLAGS -f elf"
fi
ASFLAGS="$ASFLAGS -f win32 -m amd64"
# only the GNU toolchain is inconsistent in prefixing function names with _
[ $compiler = GNU ] && cc_check "" "-S" && grep -q "_main:" conftest && ASFLAGS="$ASFLAGS -DPREFIX"
+ [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
else
ASFLAGS="$ASFLAGS -f elf -m amd64"
fi
;;
esac
-RC=""
if [ $SYS = WINDOWS ]; then
- [ $compiler = ICL ] && RC="rc" || RC="${cross_prefix}windres"
if ! rc_check "0 RCDATA {0}" ; then
RC=""
fi
LDFLAGSCLI="$(icl_ldflags $LDFLAGSCLI)"
LIBX264=libx264.lib
RANLIB=
- [ -n "$RC" ] && RC="$RC -I. -I\$(SRCPATH)/extras -fo"
+ [ -n "$RC" ] && RCFLAGS="$RCFLAGS -I. -I\$(SRCPATH)/extras -fo"
STRIP=
if [ $debug = yes ]; then
LDFLAGS="-debug $LDFLAGS"
DEPMT="-MT"
LD="$CC -o "
LIBX264=libx264.a
- [ -n "$RC" ] && RC="$RC -I. -o "
+ [ -n "$RC" ] && RCFLAGS="$RCFLAGS -I. -o "
fi
if [ $compiler = GNU ]; then
PROF_GEN_CC="-fprofile-generate"
AS=$AS
ASFLAGS=$ASFLAGS
RC=$RC
+RCFLAGS=$RCFLAGS
EXE=$EXE
HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
DEVNULL=$DEVNULL