Commit fb005c12 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Extend contrib buildsystem to allow for a finer control on system and Linux...

Extend contrib buildsystem to allow for a finer control on system and Linux distributions rules. The bootstrap tries to guess the operating system to build for by looking at the compiler prefix. For native building (usually Linux/Unix-like systems) additional matching logic should be written. Currently only Fedora-Core systems are detected as being different from the normal Unix-rules.

Extend this logic to make a distinction for your system if it deviates from the standard Unix-like system that our contrib recognizes atm.
parent 6b89b49e
...@@ -10,6 +10,10 @@ You can specify an argument to cross compile, for example: ...@@ -10,6 +10,10 @@ You can specify an argument to cross compile, for example:
This will look for a i586-pc-beos-gcc cross compiler. Default is to This will look for a i586-pc-beos-gcc cross compiler. Default is to
build natively. build natively.
Bootstrap generates your default contrib configuration and puts it in a file
named 'distro.mak'. Edit this file to fine-tune your preferences for 3rd-party
libraries that will be build in the contrib system.
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'
......
...@@ -48,6 +48,12 @@ rm -f config.mak ...@@ -48,6 +48,12 @@ rm -f config.mak
echo "# Make changes if you know what you're doing." echo "# Make changes if you know what you're doing."
} > config.mak } > config.mak
rm -f distro.mak
{
echo "# Automatically generated by bootstrap"
echo "# Make changes if you know what you're doing."
} > distro.mak
if test "$HOST" != "$BUILD"; then if test "$HOST" != "$BUILD"; then
CC="${HOST}-gcc" CC="${HOST}-gcc"
CXX="${HOST}-g++" CXX="${HOST}-g++"
...@@ -77,6 +83,7 @@ case $HOST in ...@@ -77,6 +83,7 @@ case $HOST in
EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}" EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}"
EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}" EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
cat src/Distributions/darwin.mak >> distro.mak
;; ;;
i686-apple-darwin8) i686-apple-darwin8)
SDK_TARGET=10.4 SDK_TARGET=10.4
...@@ -88,6 +95,7 @@ case $HOST in ...@@ -88,6 +95,7 @@ case $HOST in
EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}" EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}"
EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}" EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
cat src/Distributions/darwin.mak >> distro.mak
;; ;;
i586-pc-beos) i586-pc-beos)
echo "HAVE_BEOS = 1" >> config.mak echo "HAVE_BEOS = 1" >> config.mak
...@@ -112,10 +120,12 @@ case $HOST in ...@@ -112,10 +120,12 @@ case $HOST in
PATH="${PATH}:/usr/bin:/bin" PATH="${PATH}:/usr/bin:/bin"
echo "PATH = ${PATH}" >> config.mak echo "PATH = ${PATH}" >> config.mak
fi fi
cat src/Distributions/beos.mak >> distro.mak
;; ;;
*mingw32*) *mingw32*)
echo "HAVE_WIN32 = 1" >> config.mak echo "HAVE_WIN32 = 1" >> config.mak
echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak
cat src/Distributions/win32.mak >> distro.mak
;; ;;
i686-pc-cygwin) i686-pc-cygwin)
echo "HAVE_WIN32 = 1" >> config.mak echo "HAVE_WIN32 = 1" >> config.mak
...@@ -126,13 +136,25 @@ case $HOST in ...@@ -126,13 +136,25 @@ case $HOST in
EXTRA_CPPFLAGS=" -mno-cygwin -isystem /usr/include/mingw" EXTRA_CPPFLAGS=" -mno-cygwin -isystem /usr/include/mingw"
EXTRA_LDFLAGS=" -mno-cygwin" EXTRA_LDFLAGS=" -mno-cygwin"
echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak
cat src/Distributions/win32.mak >> distro.mak
;; ;;
arm-wince-pe) arm-wince-pe)
echo "HAVE_WINCE = 1" >> config.mak echo "HAVE_WINCE = 1" >> config.mak
echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak
EXTRA_CPPFLAGS=" -D_WIN32_WCE" EXTRA_CPPFLAGS=" -D_WIN32_WCE"
cat src/Distributions/wince.mak >> distro.mak
;; ;;
*) *)
if test "$HOST" = "$BUILD"; then
echo "PKG_CONFIG_LIBDIR = /usr/lib/pkgconfig" >> config.mak
fi
# Try to match distribution
if test -f /etc/fedora-release; then
cat src/Distributions/fedora.mak >> distro.mak
else
# Default Unix-like systems
cat src/Distributions/unix.mak >> distro.mak
fi
;; ;;
esac esac
......
# Beos Rules
ifeq ($(HOST),$(BUILD))
# Native build: we need perl, autoconf, etc first
all: .perl .autoconf .automake .libtool .iconv .intl .freetype .fribidi \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \
.dvdnav .dvbpsi .aclocal .libdca
#.speex seems
else
# Cross compiling: we already have the Linux tools, only build the
# libraries now
all: .iconv .intl .freetype .fribidi \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .faad .faac .lame .twolame .ebml .matroska .ffmpeg .dvdcss \
.dvdnav .dvbpsi .aclocal .libdca
endif
#.speex
# Darwin rules
all: .autoconf .automake .libtool .intl .pkgcfg .freetype .fribidi \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \
.dvdcss .dvdnav .dvdread .dvbpsi .live .caca .mod \
.png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager \
.SDL_image .glib .libidl .gecko .mpcdec .dirac_encoder .dirac_decoder \
.libdca .tag .x264 .goom2k4 .aclocal
# .expat .clinkcc don't work with SDK yet
# .glib .libidl .gecko are required to build the mozilla plugin
# .mozilla will build an entire mozilla. it can be used if we need to create a new .gecko package
# Debian Linux
all: .iconv .intl .freetype .fribidi .zlib \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \
.live .goom2k4 .caca .mod .x264 .xml .twolame \
.png .gpg-error .gcrypt .gnutls .mpcdec \
.dvdnav .dvbpsi .wxwidgets .dirac \
.aclocal .libdca .libraw1394 .libdc1394
# .SDL_image .daap .cddb .cdio .vcdimager
# Fedora Linux rules
all: .intl .freetype .fribidi .zlib \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \
.live .goom2k4 .caca .mod .x264 .xml .twolame \
.mpcdec \
.dvdnav .dvbpsi .wxwidgets .dirac \
.aclocal .libdca .libraw1394 .libdc1394
# Standard Linux or other UNIX-like systems
all: .iconv .intl .freetype .fribidi .zlib \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \
.live .goom2k4 .caca .mod .x264 .xml .twolame \
.png .gpg-error .gcrypt .gnutls .mpcdec \
.dvdnav .dvbpsi .wxwidgets .dirac \
.aclocal .libdca .libraw1394 .libdc1394
# .png .gpg-error .gcrypt .gnutls .mpcdec \
# .SDL_image .daap .cddb .cdio .vcdimager
# WIN32 rules
all: .autoconf .automake .libtool .intl .pkgcfg .freetype .fribidi \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \
.dvdcss .dvdnav .dvdread .dvbpsi .live .caca .mod \
.png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager \
.SDL_image .glib .libidl .gecko .mpcdec .dirac_encoder .dirac_decoder \
.libdca .tag .x264 .goom2k4 .aclocal
# .expat .clinkcc don't work with SDK yet
# .glib .libidl .gecko are required to build the mozilla plugin
# .mozilla will build an entire mozilla. it can be used if we need to create a new .gecko package
# WinCE rules
all: .dvbpsi .zlib .ffmpeg .ogg .tremor .faad
...@@ -145,71 +145,9 @@ DATE=`date +%Y-%m-%d` ...@@ -145,71 +145,9 @@ DATE=`date +%Y-%m-%d`
# *************************************************************************** # ***************************************************************************
# Standard rules # Standard rules
# *************************************************************************** # ***************************************************************************
# Generated by ./bootstrap from default configuration in src/Distributions
ifdef HAVE_DARWIN_OS #
all: .autoconf .automake .libtool .intl .pkgcfg .freetype .fribidi \ include ../distro.mak
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \
.dvdcss .dvdnav .dvdread .dvbpsi .live .caca .mod \
.png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager \
.SDL_image .glib .libidl .gecko .mpcdec .dirac_encoder .dirac_decoder \
.libdca .tag .x264 .goom2k4 .aclocal
# .expat .clinkcc don't work with SDK yet
# .glib .libidl .gecko are required to build the mozilla plugin
# .mozilla will build an entire mozilla. it can be used if we need to create a new .gecko package
else
ifdef HAVE_BEOS
ifeq ($(HOST),$(BUILD))
# Native build: we need perl, autoconf, etc first
all: .perl .autoconf .automake .libtool .iconv .intl .freetype .fribidi \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \
.dvdnav .dvbpsi .aclocal .libdca
#.speex seems
else
# Cross compiling: we already have the Linux tools, only build the
# libraries now
all: .iconv .intl .freetype .fribidi \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .faad .faac .lame .twolame .ebml .matroska .ffmpeg .dvdcss \
.dvdnav .dvbpsi .aclocal .libdca
endif
#.speex
else
ifdef HAVE_WIN32
all: .iconv .intl .freetype .fribidi .zlib \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .shout .vorbisenc .theora \
.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \
.live .goom2k4 .caca .mod .x264 .xml .twolame \
.png .gpg-error .gcrypt .gnutls .mpcdec \
.dvdnav .dvbpsi .wxwidgets .qt4 .dirac \
.dx_headers .dshow_headers .aclocal .gecko-win32 .unicows .libdca \
.SDL_image
# .SDL_image .daap .cddb .cdio .vcdimager .portaudio
else
ifdef HAVE_WINCE
all: .dvbpsi .zlib .ffmpeg .ogg .tremor .faad
else
# Standard Linux or other UNIX-like systems
all: .iconv .intl .freetype .fribidi .zlib \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \
.live .goom2k4 .caca .mod .x264 .xml .twolame \
.png .gpg-error .gcrypt .gnutls .mpcdec \
.dvdnav .dvbpsi .wxwidgets .dirac \
.aclocal .libdca .libraw1394 .libdc1394
# .png .gpg-error .gcrypt .gnutls .mpcdec\
# .SDL_image .daap .cddb .cdio .vcdimager
endif
endif
endif
endif
FORCE: FORCE:
......
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