default: $(DEP) x264
-libx264.a: $(OBJS) $(OBJASM)
+libx264.a: $(DEP) $(OBJS) $(OBJASM)
ar rc libx264.a $(OBJS) $(OBJASM)
ranlib libx264.a
x264: libx264.a x264.o
- $(CC) -o $@ x264.o libx264.a $(CFLAGS) $(LDFLAGS)
+ $(CC) -o $@ x264.o libx264.a $(LDFLAGS)
+
+x264vfw.dll: libx264.a $(wildcard vfw/*.c vfw/*.h)
+ make -C vfw/build/cygwin
checkasm: testing/checkasm.o libx264.a
$(CC) -o $@ $< libx264.a $(LDFLAGS)
rm -f $(OBJS) $(OBJASM) config.h *.a x264.o .depend x264 TAGS
distclean: clean
- rm -f config.mak
+ rm -f config.mak vfw/build/cygwin/config.mak
DIR_INSTALL="/usr/local"
install: x264
echo " --help print this message"
echo " --enable-avis-input enables avisynth input (win32 only)"
echo " --enable-mp4-output enables mp4 output (using gpac)"
+echo " --enable-vfw compiles the VfW frontend"
+echo " --enable-debug adds -g, doesn't strip"
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="no"
mp4_output="no"
debug="no"
+vfw="no"
CC="gcc"
CFLAGS="-Wall -I. -O4 -funroll-loops -D__X264__"
CFLAGS="$CFLAGS -g"
debug="yes"
;;
+ --enable-vfw)
+ vfw="yes"
+ ;;
*)
echo "Unknown option $opt, ignored"
;;
esac
done
+VFWFLAGS=
if [ "$debug" != "yes" ]; then
CFLAGS="$CFLAGS -s"
+ LDFLAGS="$LDFLAGS -s"
+ VFWFLAGS="-s"
fi
rm -f config.mak
LDFLAGS=$LDFLAGS
AS=$AS
ASFLAGS=$ASFLAGS
+VFW=$vfw
EOF
+if [ "$vfw" == "yes" ]; then
+ rm -f vfw/build/cygwin/config.mak
+ echo "LDFLAGS=$VFWFLAGS" > vfw/build/cygwin/config.mak
+ echo "default: x264vfw.dll" >> config.mak
+fi
+
echo "Platform: $ARCH"
echo "System: $SYS"
echo "avis input: $avis_input"
echo "mp4 output: $mp4_output"
+echo "vfw: $vfw"
echo "debug: $debug"
echo
echo "You can run 'make' now."
# $Id: Makefile,v 1.1 2004/06/03 19:29:33 fenrir Exp $
##############################################################################
+include config.mak
+
# Dll to build
DLL=x264vfw.dll
-mno-cygwin -shared -Wl,-dll,--out-implib,$@.a,--enable-stdcall-fixup \
-o $@ \
$(OBJECTS) driverproc.def \
- -lgdi32 -lwinmm -lcomdlg32 -lcomctl32 $(LDFLAGS)
-ifdef NDEBUG
- @strip $(DIR_BUILD)/$(DLL)
-endif
+ -lgdi32 -lwinmm -lcomdlg32 -lcomctl32 $(LDFLAGS) $(CFLAGS)
clean:
@echo " Cl: Object files and target lib"