summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-09-04 08:21:27 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-09-04 08:21:27 +0000
commita17236c53cd3ffe1d4eceb3be82b39001c006b3f (patch)
tree0ba3c659d54fbe8edd2f27c791adf59a5fa36df5
parentdafc3856d9c34d85a5c172c66d6a6e8ffa201b03 (diff)
MingW patches by (Glenn Maynard <g_sf at zewt dot org>)
Originally committed as revision 2203 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure7
-rw-r--r--libavcodec/os_support.h3
-rw-r--r--libavformat/Makefile7
3 files changed, 15 insertions, 2 deletions
diff --git a/configure b/configure
index 61218b2b1f..f253754274 100755
--- a/configure
+++ b/configure
@@ -191,6 +191,10 @@ dv1394="no"
ffserver="no"
network="no"
mingw32="yes"
+LIBPREF=""
+LIBSUF=".lib"
+SLIBPREF=""
+SLIBSUF=".dll"
;;
CYGWIN*)
v4l="no"
@@ -885,6 +889,9 @@ if test "$mmx" = "yes" ; then
echo "#define HAVE_MMX 1" >> $TMPH
echo "#define __CPU__ 586" >> $TMPH
fi
+if test "$mingw32" = "yes" ; then
+ echo "TARGET_MINGW32=yes" >> config.mak
+fi
if test "$builtin_vector" = "yes" ; then
echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
diff --git a/libavcodec/os_support.h b/libavcodec/os_support.h
index 93930f03ba..ef895b1d51 100644
--- a/libavcodec/os_support.h
+++ b/libavcodec/os_support.h
@@ -12,7 +12,8 @@
#ifdef __MINGW32__
# undef DATADIR /* clashes with /usr/include/w32api/objidl.h */
-# include <windows.h>
+__declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds);
+// # include <windows.h>
# define usleep(t) Sleep((t) / 1000)
#endif
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 256edeccc7..e064cf613b 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -80,7 +80,12 @@ $(LIB): $(OBJS) $(PPOBJS)
$(RANLIB) $@
$(SLIB): $(OBJS)
- $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(AMREXTRALIBS)
+ifeq ($(TARGET_MINGW32),yes)
+ $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(VPATH)/../libavcodec/avcodec.dll
+ -lib /machine:i386 /def:$(@:.dll=.def)
+else
+ $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(EXTRALIBS) $(AMREXTRALIBS)
+endif
depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend