]> git.sesse.net Git - vlc/commitdiff
Extend contrib buildsystem to allow for a finer control on system and Linux distribut...
authorJean-Paul Saman <jpsaman@videolan.org>
Tue, 30 Jan 2007 12:52:47 +0000 (12:52 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Tue, 30 Jan 2007 12:52:47 +0000 (12:52 +0000)
Extend this logic to make a distinction for your system if it deviates from the standard Unix-like system that our contrib recognizes atm.

extras/contrib/README
extras/contrib/bootstrap
extras/contrib/src/Distributions/beos.mak [new file with mode: 0644]
extras/contrib/src/Distributions/darwin.mak [new file with mode: 0644]
extras/contrib/src/Distributions/debian.mak [new file with mode: 0644]
extras/contrib/src/Distributions/fedora.mak [new file with mode: 0644]
extras/contrib/src/Distributions/unix.mak [new file with mode: 0644]
extras/contrib/src/Distributions/win32.mak [new file with mode: 0644]
extras/contrib/src/Distributions/wince.mak [new file with mode: 0644]
extras/contrib/src/Makefile

index f981ec93751d1471cb3ee53e349977b1cbcd3db0..beeda4f33732f7b9240aae03b7ed5da4d27fd025 100644 (file)
@@ -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
 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
 building from source (can take a long time but is easily customizable)
 and fetching a pre-compiled binary package. Either type 'make src'
index a916b278a2920a08e9d7f3ae63a68e6a5f6840d6..d454970eee005f10cc53ee14ac7d74ff23342f18 100755 (executable)
@@ -48,6 +48,12 @@ rm -f config.mak
        echo "# Make changes if you know what you're doing."
 } > 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
     CC="${HOST}-gcc"
     CXX="${HOST}-g++"
@@ -77,6 +83,7 @@ case $HOST in
            EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}"
            EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
            echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
+        cat src/Distributions/darwin.mak >> distro.mak
         ;;
     i686-apple-darwin8)
            SDK_TARGET=10.4
@@ -88,6 +95,7 @@ case $HOST in
            EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}"
            EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
            echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
+        cat src/Distributions/darwin.mak >> distro.mak
         ;;
     i586-pc-beos)
             echo "HAVE_BEOS = 1" >> config.mak
@@ -112,10 +120,12 @@ case $HOST in
                 PATH="${PATH}:/usr/bin:/bin"
                 echo "PATH = ${PATH}" >> config.mak
             fi
+            cat src/Distributions/beos.mak >> distro.mak
         ;;
     *mingw32*)
             echo "HAVE_WIN32 = 1" >> config.mak
             echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak
+            cat src/Distributions/win32.mak >> distro.mak
         ;;
     i686-pc-cygwin)
             echo "HAVE_WIN32 = 1" >> config.mak
@@ -126,13 +136,25 @@ case $HOST in
             EXTRA_CPPFLAGS=" -mno-cygwin -isystem /usr/include/mingw"
             EXTRA_LDFLAGS=" -mno-cygwin"
             echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak
+            cat src/Distributions/win32.mak >> distro.mak
         ;;
     arm-wince-pe)
             echo "HAVE_WINCE = 1" >> config.mak
             echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak
             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
 
diff --git a/extras/contrib/src/Distributions/beos.mak b/extras/contrib/src/Distributions/beos.mak
new file mode 100644 (file)
index 0000000..92718ae
--- /dev/null
@@ -0,0 +1,17 @@
+# 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
diff --git a/extras/contrib/src/Distributions/darwin.mak b/extras/contrib/src/Distributions/darwin.mak
new file mode 100644 (file)
index 0000000..528c4ca
--- /dev/null
@@ -0,0 +1,12 @@
+# 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
+
diff --git a/extras/contrib/src/Distributions/debian.mak b/extras/contrib/src/Distributions/debian.mak
new file mode 100644 (file)
index 0000000..466ed6d
--- /dev/null
@@ -0,0 +1,10 @@
+# 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
+
diff --git a/extras/contrib/src/Distributions/fedora.mak b/extras/contrib/src/Distributions/fedora.mak
new file mode 100644 (file)
index 0000000..78087b3
--- /dev/null
@@ -0,0 +1,9 @@
+# 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
+
diff --git a/extras/contrib/src/Distributions/unix.mak b/extras/contrib/src/Distributions/unix.mak
new file mode 100644 (file)
index 0000000..1939b3d
--- /dev/null
@@ -0,0 +1,11 @@
+# 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
+
diff --git a/extras/contrib/src/Distributions/win32.mak b/extras/contrib/src/Distributions/win32.mak
new file mode 100644 (file)
index 0000000..2cf15f0
--- /dev/null
@@ -0,0 +1,12 @@
+# 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
+
diff --git a/extras/contrib/src/Distributions/wince.mak b/extras/contrib/src/Distributions/wince.mak
new file mode 100644 (file)
index 0000000..6904bdd
--- /dev/null
@@ -0,0 +1,3 @@
+# WinCE rules
+all: .dvbpsi .zlib .ffmpeg .ogg .tremor .faad
+
index b8430b541f3e0da9876bdcf7231dbb0129c42445..1555f990f49c0cc12ade6d3f3da0dbe62b27aafc 100644 (file)
@@ -145,71 +145,9 @@ DATE=`date +%Y-%m-%d`
 # ***************************************************************************
 # Standard rules
 # ***************************************************************************
-
-ifdef HAVE_DARWIN_OS
- 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
-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
+# Generated by ./bootstrap from default configuration in src/Distributions
+# 
+include ../distro.mak
 
 FORCE: