echo "available options:"
echo ""
echo " --help print this message"
-echo " --enable-avis-input enables avisynth input (cygwin only)"
+echo " --enable-avis-input enables avisynth input (win32 only)"
echo " --enable-mp4-output enables mp4 output (using gpac)"
echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS"
echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS"
+echo " --enable-debug adds -g, doesn't strip"
echo ""
exit 1
fi
-avis_input="off"
-mp4_output="off"
+avis_input="no"
+mp4_output="no"
+debug="no"
CC="gcc"
-CFLAGS="-g -Wall -I. -O4 -funroll-loops -D__X264__"
+CFLAGS="-Wall -I. -O4 -funroll-loops -D__X264__"
LDFLAGS=""
AS="nasm"
LDFLAGS="$LDFLAGS -mno-cygwin"
ASFLAGS="-f win32 -DPREFIX"
;;
- MINGW32*)
- SYS="MINGW32"
+ MINGW*)
+ SYS="MINGW"
ASFLAGS="-f win32 -DPREFIX"
;;
*)
for opt do
case "$opt" in
--enable-avis-input)
- if [ $SYS = CYGWIN ]; then
+ if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
CFLAGS="$CFLAGS -DAVIS_INPUT"
LDFLAGS="$LDFLAGS -lvfw32"
- avis_input="on"
+ avis_input="yes"
fi
;;
--enable-mp4-output)
if [ $SYS = CYGWIN -o $SYS = MINGW ]; then
LDFLAGS="$LDFLAGS -lwinmm"
fi
- mp4_output="on"
+ mp4_output="yes"
;;
--extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
;;
--extra-ldflags=*) LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
;;
+ --enable-debug)
+ CFLAGS="$CFLAGS -g"
+ debug="yes"
+ ;;
*)
echo "Unknown option $opt, ignored"
;;
esac
done
+if [ "$debug" != "yes" ]; then
+ CFLAGS="$CFLAGS -s"
+fi
+
rm -f config.mak
cat > config.mak << EOF
ARCH=$ARCH
echo "System: $SYS"
echo "avis input: $avis_input"
echo "mp4 output: $mp4_output"
+echo "debug: $debug"
echo
echo "You can run 'make' now."