rc_check() {
log_check "whether $RC works"
echo "$1" > conftest.rc
- if $RC conftest.rc -o conftest.o >conftest.log 2>&1; then
+ if [ $compiler = ICL ]; then
+ rc_cmd="$RC -foconftest.o conftest.rc"
+ else
+ rc_cmd="$RC -o conftest.o conftest.rc"
+ fi
+ if $rc_cmd >conftest.log 2>&1; then
res=$?
log_ok
else
log_fail
log_msg "Failed commandline was:"
log_msg "--------------------------------------------------"
- log_msg "$RC conftest.rc -o conftest.o"
+ log_msg "$rc_cmd"
cat conftest.log >> config.log
log_msg "--------------------------------------------------"
log_msg "Failed program was:"
# Windows Intel Compiler creates dependency generation with absolute Windows paths, Cygwin's make does not support Windows paths.
[[ $host_os = cygwin* ]] && die "Windows Intel Compiler support requires MSYS"
compiler=ICL
- CFLAGS="$CFLAGS -Qstd=c99 -nologo -Qms0 -DHAVE_STRING_H -Iextras"
+ CFLAGS="$CFLAGS -Qstd=c99 -nologo -Qms0 -DHAVE_STRING_H -I\$(SRCPATH)/extras"
QPRE="-Q"
`$CC 2>&1 | grep -q IA-32` && host_cpu=i486
`$CC 2>&1 | grep -q "Intel(R) 64"` && host_cpu=x86_64
RC=""
if [ $SYS = WINDOWS ]; then
- RC="${cross_prefix}windres"
+ [ $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"
STRIP=
if [ $debug = yes ]; then
LDFLAGS="-debug $LDFLAGS"
DEPMT="-MT"
LD="$CC -o "
LIBX264=libx264.a
+ [ -n "$RC" ] && RC="$RC -I. -o "
fi
if [ $compiler = GNU ]; then
PROF_GEN_CC="-fprofile-generate"
# MSVC link does not act similarly, so it is required to make an export definition out of x264.h and use it at link time
echo "SOFLAGS=-dll -def:x264.def -implib:\$(IMPLIBNAME) $SOFLAGS" >> config.mak
echo "EXPORTS" > x264.def
- grep "^\(int\|void\|x264_t\|extern\).*x264.*[\[(;]" x264.h | sed -e "s/.*\(x264.*\)[\[(].*/\1/;s/.*\(x264.*\);/\1/;s/open/open_$API/g" >> x264.def
+ grep "^\(int\|void\|x264_t\|extern\).*x264.*[\[(;]" ${SRCPATH}/x264.h | sed -e "s/.*\(x264.*\)[\[(].*/\1/;s/.*\(x264.*\);/\1/;s/open/open_$API/g" >> x264.def
else
echo 'IMPLIBNAME=libx264.dll.a' >> config.mak
echo "SOFLAGS=-shared -Wl,--out-implib,\$(IMPLIBNAME) -Wl,--enable-auto-image-base $SOFLAGS" >> config.mak