From: Loren Merritt Date: Sat, 16 Apr 2005 20:21:06 +0000 (+0000) Subject: VfW: build from main makefile X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=a61378bea90edd13a0e9b907917f7645e9266750;p=x264.git VfW: build from main makefile git-svn-id: svn://svn.videolan.org/x264/trunk@207 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/Makefile b/Makefile index 24a09a69..daad7c58 100644 --- a/Makefile +++ b/Makefile @@ -28,12 +28,15 @@ DEP = depend 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) @@ -58,7 +61,7 @@ clean: 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 diff --git a/configure b/configure index 5f375e13..62047c16 100755 --- a/configure +++ b/configure @@ -9,9 +9,10 @@ echo "" 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 @@ -19,6 +20,7 @@ fi avis_input="no" mp4_output="no" debug="no" +vfw="no" CC="gcc" CFLAGS="-Wall -I. -O4 -funroll-loops -D__X264__" @@ -116,14 +118,20 @@ for opt do 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 @@ -135,12 +143,20 @@ CFLAGS=$CFLAGS 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." diff --git a/vfw/build/cygwin/Makefile b/vfw/build/cygwin/Makefile index 0aa32176..d47e88ea 100644 --- a/vfw/build/cygwin/Makefile +++ b/vfw/build/cygwin/Makefile @@ -11,6 +11,8 @@ # $Id: Makefile,v 1.1 2004/06/03 19:29:33 fenrir Exp $ ############################################################################## +include config.mak + # Dll to build DLL=x264vfw.dll @@ -95,10 +97,7 @@ $(DLL): $(DIR_BUILD) $(OBJECTS) -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"