X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=extras%2Fcontrib%2Fsrc%2FMakefile;h=faa05e634f3ba005b277d85cbf49e0b00305f1cb;hb=8f77cb70b92aa2ffc78d21aafcf0d8022b6ebac4;hp=51e904c96ef199a3ffc8fdc999d571019d41ab5b;hpb=727eb9d899feb540f9ac298aeb125fa25d2cbbc8;p=vlc diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile index 51e904c96e..faa05e634f 100644 --- a/extras/contrib/src/Makefile +++ b/extras/contrib/src/Makefile @@ -1,7 +1,7 @@ -# *************************************************************************** +#*************************************************************************** # src/Makefile : Dearchive and compile all files necessary # *************************************************************************** -# Copyright (C) 2003 - 2006 the VideoLAN team +# Copyright (C) 2003 - 2007 the VideoLAN team # $Id$ # # Authors: Christophe Massiot @@ -36,6 +36,7 @@ include ./packages.mak export PATH := $(PREFIX)/bin:$(EXTRA_PATH):$(PATH) export PKG_CONFIG_PATH +export PKG_CONFIG_LIBDIR = $(PREFIX)/lib/pkgconfig export DYLD_LIBRARY_PATH = $(PREFIX)/lib # following is required for configure scripts that check dyld libraries # by building and running a test app @@ -82,20 +83,29 @@ else HOSTCC2=$(HOSTCC) endif +# For ffmpeg if not cross compiling +ifneq ($(CC),) + FFMPEGCONF=--cc="$(CC)" +endif + # -# compiling for MinGW under Cygwin could be detected as cross compiling -# unfortunately there isn't a complete separate GCC toolchain for MinGW under cygwin +# cross compiling # -ifeq (,$(findstring cygwin,$(BUILD)),) - ifneq ($(BUILD),$(HOST)) - # We are cross compiling - HOSTCONF=--host=$(HOST) --build=$(BUILD) - FFMPEGCONF=--cross-prefix=$(HOST)- - X264CONF=--crosscompile=$(HOST) +#This should be inside the if block but some config scripts are buggy +HOSTCONF=--target=$(HOST) --host=$(HOST) --build=$(BUILD) --program-prefix="" +ifneq ($(BUILD),$(HOST)) + # + # Compiling for MinGW under Cygwin could be deemed as cross compiling + # unfortunately there isn't a complete separate GCC toolchain for MinGW under Cygwin + # + ifeq ($(findstring cygwin,$(BUILD)),) + # We are REALLY cross compiling + FFMPEGCONF=--cross-prefix=$(HOST)- + X264CONF=--crosscompile=$(HOST) + PTHREADSCONF="CROSS=$(HOST)-" else - ifneq ($(CC),) - FFMPEGCONF=--cc="$(CC)" - endif + # We are compiling for MinGW on Cygwin + PTHREADSCONF=$(HOSTCC) endif endif @@ -123,7 +133,7 @@ FFMPEGCONF += --enable-memalign-hack endif ifdef HAVE_DARWIN_OS -X264CONF += --enable-pic +X264CONF += --enable-pic --enable-debug ifneq ($(HOST),i686-apple-darwin8) FFMPEG_CFLAGS += -DHAVE_LRINTF endif @@ -135,18 +145,15 @@ endif 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 .x264 .caca .mod \ - .png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager .SDL_image \ - .glib .libidl .gecko .mpcdec .dirac_encoder .dirac_decoder .aclocal \ - .libdca + .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 -ifneq ($(HOST),i686-apple-darwin8) -all: .goom2k4 -endif else ifdef HAVE_BEOS @@ -156,14 +163,16 @@ else .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 .speex .faad .faac .lame .twolame .ebml .matroska .ffmpeg .dvdcss \ + .FLAC .faad .faac .lame .twolame .ebml .matroska .ffmpeg .dvdcss \ .dvdnav .dvbpsi .aclocal .libdca endif + #.speex else ifdef HAVE_WIN32 @@ -174,7 +183,8 @@ else .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 + .dx_headers .dshow_headers .aclocal .gecko-win32 .unicows .libdca \ + .SDL_image # .SDL_image .daap .cddb .cdio .vcdimager .portaudio else @@ -187,10 +197,10 @@ else 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\ + .live .goom2k4 .caca .mod .x264 .xml .twolame \ + .png .gpg-error .gcrypt .gnutls .mpcdec \ .dvdnav .dvbpsi .wxwidgets .dirac \ - .aclocal .libdca + .aclocal .libdca .libraw1394 .libdc1394 # .png .gpg-error .gcrypt .gnutls .mpcdec\ # .SDL_image .daap .cddb .cdio .vcdimager endif @@ -306,11 +316,11 @@ endif # autoconf # *************************************************************************** -autoconf-$(AUTOCONF_VERSION).tar.gz: +autoconf-$(AUTOCONF_VERSION).tar.bz2: $(WGET) $(AUTOCONF_URL) -autoconf: autoconf-$(AUTOCONF_VERSION).tar.gz - $(EXTRACT_GZ) +autoconf: autoconf-$(AUTOCONF_VERSION).tar.bz2 + $(EXTRACT_BZ2) .autoconf: autoconf (cd $<; ./configure --prefix=$(PREFIX) && make && make install) @@ -318,7 +328,7 @@ autoconf: autoconf-$(AUTOCONF_VERSION).tar.gz CLEAN_FILE += .autoconf CLEAN_PKG += autoconf -DISTCLEAN_PKG += autoconf-$(AUTOCONF_VERSION).tar.gz +DISTCLEAN_PKG += autoconf-$(AUTOCONF_VERSION).tar.bz2 # *************************************************************************** # libtool @@ -376,15 +386,16 @@ DISTCLEAN_PKG += automake-$(AUTOMAKE_VERSION).tar.gz # pkgconfig # *************************************************************************** -pkgconfig-$(PKGCFG_VERSION).tar.gz: +pkg-config-$(PKGCFG_VERSION).tar.gz: $(WGET) $(PKGCFG_URL) -pkgconfig: pkgconfig-$(PKGCFG_VERSION).tar.gz +pkgconfig: pkg-config-$(PKGCFG_VERSION).tar.gz $(EXTRACT_GZ) patch -d pkgconfig/glib-1.2.8 -p 1 < Patches/glib.patch + patch -d pkgconfig -p0 < Patches/pkgcfg.patch .pkgcfg: pkgconfig - (cd pkgconfig; ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install) + (cd pkgconfig; autoconf && ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install) touch $@ CLEAN_FILE += .pkgcfg @@ -401,15 +412,17 @@ gettext-$(GETTEXT_VERSION).tar.gz: gettext: gettext-$(GETTEXT_VERSION).tar.gz $(EXTRACT_GZ) ifdef HAVE_DARWIN_OS - patch -p 0 < Patches/gettext-macosx.patch - (cd $@; ./autogen.sh) + patch -p0 < Patches/gettext-macosx.patch +endif +ifdef HAVE_WIN32 + patch -p0 < Patches/gettext-win32.patch endif .intl: gettext .iconv ifdef HAVE_WIN32 - ( cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-relocatable --with-iconv-prefix=$(PREFIX)) + ( cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-relocatable --with-iconv-prefix=$(PREFIX) --disable-java --disable-native-java) else - ( cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) ) + ( cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-java --disable-native-java) endif ifeq ($(BUILD),i586-pc-beos) # The ugliest kludge ever - so libtool correctly links shared libraries @@ -425,7 +438,7 @@ else endif # Work around another non-sense of autoconf. ifdef HAVE_WIN32 - (cd ../include; sed -i.orig '283 c #if !1' libintl.h) + (cd ../include; sed -i.orig '311 c #if !1' libintl.h) endif $(INSTALL_NAME) touch $@ @@ -444,7 +457,7 @@ libiconv-$(LIBICONV_VERSION).tar.gz: libiconv: libiconv-$(LIBICONV_VERSION).tar.gz $(EXTRACT_GZ) ifdef HAVE_DARWIN_OS - patch -p 0 < Patches/libiconv.patch + patch -p0 < Patches/libiconv.patch endif ifdef HAVE_DARWIN_OS @@ -489,9 +502,9 @@ fribidi-$(FRIBIDI_VERSION).tar.gz: fribidi: fribidi-$(FRIBIDI_VERSION).tar.gz $(EXTRACT_GZ) - patch -p 0 < Patches/fribidi.patch.real + patch -p0 < Patches/fribidi.patch.real ifdef HAVE_WIN32 - patch -p 0