Commit 861453b6 authored by Eric Petit's avatar Eric Petit

contrib/*: enhanced contrib system to support cross-compilations.

   Give an argument to bootstrap to use it (for example
   `./bootstrap i586-pc-beos')
parent a5b222b7
...@@ -5,6 +5,11 @@ other operating systems. ...@@ -5,6 +5,11 @@ other operating systems.
To use it, first in the contrib directory, type : To use it, first in the contrib directory, type :
./bootstrap ./bootstrap
You can specify an argument to cross compile, for example:
./bootstrap i586-pc-beos
This will look for a i586-pc-beos-gcc cross compiler. Default is to
build natively.
Customize config.mak if you need to, then you need to choose between Customize config.mak if you need to, then you need to choose between
building from source (can take a long time but is easily customizable) building from source (can take a long time but is easily customizable)
and fetching a pre-compiled binary package. Either type 'make src' and fetching a pre-compiled binary package. Either type 'make src'
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
# *************************************************************************** # ***************************************************************************
if test "$#" != "0"; then if test "$#" -gt "1"; then
echo "Usage: $0" >&2 echo "Usage: $0 <host>" >&2
echo " Prepare config.mak file." >&2 echo " Prepare config.mak file." >&2
exit 1 exit 1
fi fi
...@@ -33,17 +33,29 @@ export LANG ...@@ -33,17 +33,29 @@ export LANG
set -e set -e
set -x set -x
BUILD=`gcc -dumpmachine`
if test "$#" = "1"; then
HOST="$1"
else
HOST="$BUILD"
fi
echo -e "# Automatically generated by bootstrap.\n# Make changes if you know what you're doing.\n" >| config.mak echo -e "# Automatically generated by bootstrap.\n# Make changes if you know what you're doing.\n" >| config.mak
if test ".`uname -s`" = ".Darwin"; then echo "BUILD = $BUILD" >> config.mak
echo "SYS = DARWIN" >> config.mak echo "HOST = $HOST" >> config.mak
case $HOST in
ppc-darwin)
echo "EXTRA_CPPFLAGS = -no-cpp-precomp" >> config.mak echo "EXTRA_CPPFLAGS = -no-cpp-precomp" >> config.mak
echo "CONTRIB_URL = http://download.videolan.org/pub/videolan/devtools/contrib-macosx.tar.bz2" >> config.mak echo "CONTRIB_URL = http://download.videolan.org/pub/videolan/devtools/contrib-macosx.tar.bz2" >> config.mak
elif test ".`uname -s`" = ".BeOS"; then ;;
echo "SYS = BEOS" >> config.mak i586-pc-beos)
else echo "EXTRA_LDFLAGS = -lnet" >> config.mak
echo "SYS = UNKNOWN" >> config.mak ;;
fi *)
;;
esac
if which curl >/dev/null; then if which curl >/dev/null; then
echo "WGET = curl -O" >> config.mak echo "WGET = curl -O" >> config.mak
......
This diff is collapsed.
diff -ru ffmpeg.orig/configure ffmpeg/configure diff -ru ffmpeg-orig/configure ffmpeg/configure
--- ffmpeg.orig/configure Tue Nov 23 19:28:23 2004 --- ffmpeg-orig/configure 2005-01-21 23:16:04.000000000 +0100
+++ ffmpeg/configure Sun Nov 28 20:54:48 2004 +++ ffmpeg/configure 2005-02-18 21:43:55.000000000 +0100
@@ -210,7 +210,7 @@ @@ -210,7 +210,7 @@
2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc" 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
mmx="no" mmx="no"
...@@ -19,9 +19,28 @@ diff -ru ffmpeg.orig/configure ffmpeg/configure ...@@ -19,9 +19,28 @@ diff -ru ffmpeg.orig/configure ffmpeg/configure
;; ;;
--cpu=*) cpu=`echo $opt | cut -d '=' -f 2` --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
;; ;;
diff -ru ffmpeg.orig/libavcodec/eval.c ffmpeg/libavcodec/eval.c @@ -709,6 +709,18 @@
--- ffmpeg.orig/libavcodec/eval.c Wed Feb 18 13:49:30 2004 ranlib="${cross_prefix}${ranlib}"
+++ ffmpeg/libavcodec/eval.c Sun Nov 28 20:29:15 2004 strip="${cross_prefix}${strip}"
+if test "${cross_prefix}" = "i586-pc-beos-"; then
+ # Cross-compiling from Linux for BeOS
+ CFLAGS="$CFLAGS -DPIC -fomit-frame-pointer -fno-expensive-optimizations"
+ SHFLAGS=-nostart
+ audio_oss="no"
+ v4l="no"
+ dv1394="no"
+ netserver="yes"
+ need_inet_aton="yes"
+ extralibs="-lnet"
+fi
+
if test -z "$cross_prefix" ; then
# ---
diff -ru ffmpeg-orig/libavcodec/eval.c ffmpeg/libavcodec/eval.c
--- ffmpeg-orig/libavcodec/eval.c 2005-01-17 19:25:32.000000000 +0100
+++ ffmpeg/libavcodec/eval.c 2005-02-18 21:12:57.000000000 +0100
@@ -34,6 +34,8 @@ @@ -34,6 +34,8 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
...@@ -31,9 +50,9 @@ diff -ru ffmpeg.orig/libavcodec/eval.c ffmpeg/libavcodec/eval.c ...@@ -31,9 +50,9 @@ diff -ru ffmpeg.orig/libavcodec/eval.c ffmpeg/libavcodec/eval.c
#ifndef NAN #ifndef NAN
#define NAN 0 #define NAN 0
#endif #endif
diff -ru ffmpeg.orig/libavformat/tcp.c ffmpeg/libavformat/tcp.c diff -ru ffmpeg-orig/libavformat/tcp.c ffmpeg/libavformat/tcp.c
--- ffmpeg.orig/libavformat/tcp.c Thu Aug 12 02:09:32 2004 --- ffmpeg-orig/libavformat/tcp.c 2004-08-12 02:09:32.000000000 +0200
+++ ffmpeg/libavformat/tcp.c Sun Nov 28 20:29:15 2004 +++ ffmpeg/libavformat/tcp.c 2005-02-18 21:12:57.000000000 +0100
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
#include <netdb.h> #include <netdb.h>
#include <sys/time.h> #include <sys/time.h>
......
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