]> granicus.if.org Git - libx264/commitdiff
VfW: build from main makefile
authorLoren Merritt <pengvado@videolan.org>
Sat, 16 Apr 2005 20:21:06 +0000 (20:21 +0000)
committerLoren Merritt <pengvado@videolan.org>
Sat, 16 Apr 2005 20:21:06 +0000 (20:21 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@207 df754926-b1dd-0310-bc7b-ec298dee348c

Makefile
configure
vfw/build/cygwin/Makefile

index 24a09a698269ae309ae82f7e3cc3df944536ccda..daad7c58b1810d658791e22cd5001d303e37522f 100644 (file)
--- 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
index 5f375e13e999419eb4db32f8e7c735c8a1652923..62047c1612367f9a9260f9a884d804d7b398c3f7 100755 (executable)
--- 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."
index 0aa32176f7767b91a27abdd62d657ac78353b7bc..d47e88ea33843ebe171522eeddd3b86ee5c6bbe0 100644 (file)
@@ -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"