Commit a61378be authored by Loren Merritt's avatar Loren Merritt

VfW: build from main makefile


git-svn-id: svn://svn.videolan.org/x264/trunk@207 df754926-b1dd-0310-bc7b-ec298dee348c
parent c6f3d17f
......@@ -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
......
......@@ -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."
......
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment