Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
daf8e955
Commit
daf8e955
authored
23 years ago
by
Fabrice Bellard
Browse files
Options
Downloads
Patches
Plain Diff
added win32 cross compile support
Originally committed as revision 107 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
1705679e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+12
-6
12 additions, 6 deletions
Makefile
configure
+21
-5
21 additions, 5 deletions
configure
ffmpeg.c
+3
-6
3 additions, 6 deletions
ffmpeg.c
with
36 additions
and
17 deletions
Makefile
+
12
−
6
View file @
daf8e955
...
...
@@ -10,7 +10,13 @@ CFLAGS+=-p
LDFLAGS
+=
-p
endif
PROG
=
ffmpeg ffserver
ifeq
($(CONFIG_WIN32),yes)
EXE
=
.exe
PROG
=
ffmpeg
$(
EXE
)
else
EXT
=
PROG
=
ffmpeg ffserver
endif
all
:
lib $(PROG)
...
...
@@ -18,14 +24,14 @@ lib:
$(
MAKE
)
-C
libavcodec all
$(
MAKE
)
-C
libav all
ffmpeg
:
ffmpeg.o libav/libav.a libavcodec/libavcodec.a
gcc
$(
LDFLAGS
)
-o
$@
$^
-lm
ffmpeg
$(EXE)
:
ffmpeg.o libav/libav.a libavcodec/libavcodec.a
$(
CC
)
$(
LDFLAGS
)
-o
$@
$^
-lm
ffserver
:
ffserver.o libav/libav.a libavcodec/libavcodec.a
gcc
$(
LDFLAGS
)
-o
$@
$^
-lm
ffserver
$(EXE)
:
ffserver.o libav/libav.a libavcodec/libavcodec.a
$(
CC
)
$(
LDFLAGS
)
-o
$@
$^
-lm
%.o
:
%.c
gcc
$(
CFLAGS
)
-c
-o
$@
$<
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
install
:
all
install
-s
-m
755
$(
PROG
)
$(
prefix
)
/bin
...
...
This diff is collapsed.
Click to expand it.
configure
+
21
−
5
View file @
daf8e955
...
...
@@ -21,6 +21,7 @@ esac
gprof
=
"no"
mp3lib
=
"yes"
grab
=
"yes"
win32
=
"no"
if
[
"
$1
"
=
"-h"
-o
"
$1
"
=
"--help"
]
;
then
cat
<<
EOF
...
...
@@ -37,6 +38,7 @@ echo " --disable-mmx disable mmx usage"
echo
" --enable-gprof enable profiling with gprof [
$gprof
]"
echo
" --disable-mp3lib disable mp3 lib compiling"
echo
" --disable-grab disable audio/video grabbing code"
echo
" --enable-win32 enable win32 cross compile"
exit
1
fi
...
...
@@ -56,9 +58,23 @@ for opt do
;;
--disable-grab
)
grab
=
"no"
;;
--enable-win32
)
win32
=
"yes"
;;
esac
done
# Checking for CFLAGS
if
test
-z
"
$CFLAGS
"
;
then
CFLAGS
=
"-O2"
fi
if
[
"
$win32
"
=
"yes"
]
;
then
cross_prefix
=
"i386-mingw32msvc-"
cc
=
"
${
cross_prefix
}
gcc"
ar
=
"
${
cross_prefix
}
ar"
grab
=
"no"
fi
echo
"Install prefix
$prefix
"
echo
"C compiler
$cc
"
echo
"CPU
$cpu
"
...
...
@@ -71,11 +87,6 @@ echo "Creating config.mak and config.h"
echo
"# Automatically generated by configure - do not modify"
>
config.mak
echo
"/* Automatically generated by configure - do not modify */"
>
config.h
# Checking for CFLAGS
if
test
-z
"
$CFLAGS
"
;
then
CFLAGS
=
"-O2"
fi
echo
"prefix=
$prefix
"
>>
config.mak
echo
"MAKE=make"
>>
config.mak
echo
"CC=
$cc
"
>>
config.mak
...
...
@@ -120,3 +131,8 @@ if [ "$grab" = "yes" ] ; then
echo
"#define CONFIG_GRAB 1"
>>
config.h
echo
"CONFIG_GRAB=yes"
>>
config.mak
fi
if
[
"
$win32
"
=
"yes"
]
;
then
echo
"#define CONFIG_WIN32 1"
>>
config.h
echo
"CONFIG_WIN32=yes"
>>
config.mak
fi
This diff is collapsed.
Click to expand it.
ffmpeg.c
+
3
−
6
View file @
daf8e955
...
...
@@ -16,12 +16,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include
<stdlib.h>
#include
<stdio.h>
#include
<string.h>
#include
<errno.h>
#define HAVE_AV_CONFIG_H
#include
"avformat.h"
#ifndef CONFIG_WIN32
#include
"config.h"
#include
<unistd.h>
#include
<fcntl.h>
#include
<sys/ioctl.h>
...
...
@@ -33,7 +31,6 @@
#include
<ctype.h>
#endif
#include
"avformat.h"
#define MAXINT64 INT64_C(0x7fffffffffffffff)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment