X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=extras%2Fcontrib%2Fsrc%2FMakefile;h=bf1fe9574da4ae50b80164254556c350d443d063;hb=4645de2aa3d33ff45b1c764b19ad63748c54d9ab;hp=e572bb7645b496d0c6e6117241f513b2c4045a86;hpb=489c95cabeb65e9184174ae02af24c173997382b;p=vlc diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile index e572bb7645..bf1fe9574d 100644 --- a/extras/contrib/src/Makefile +++ b/extras/contrib/src/Makefile @@ -54,6 +54,7 @@ export LDFLAGS = -L$(PREFIX)/lib $(EXTRA_LDFLAGS) ifneq ($(CC),) HOSTCC+= CC="$(CC)" +FFMPEGCONF += --cc=$(CC) endif ifneq ($(CXX),) HOSTCC+= CXX="$(CXX)" @@ -84,14 +85,9 @@ else HOSTCC2=$(HOSTCC) endif -# For ffmpeg if not cross compiling -ifneq ($(CC),) - FFMPEGCONF=--cc="$(CC)" -endif +FFMPEGCONF= -# # cross compiling -# #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)) @@ -101,7 +97,7 @@ ifneq ($(BUILD),$(HOST)) # ifndef HAVE_CYGWIN # We are REALLY cross compiling - FFMPEGCONF=--cross-prefix=$(HOST)- --enable-cross-compile + FFMPEGCONF+=--cross-prefix=$(HOST)- --enable-cross-compile X264CONF=--host=$(HOST) PTHREADSCONF="CROSS=$(HOST)-" else @@ -143,16 +139,10 @@ ifdef HAVE_DARWIN_OS_ON_INTEL FFMPEGCONF += --enable-memalign-hack --cpu=pentium-m endif -ifdef NO_TEXT_RELOCATION -FFMPEGCONF += --disable-mmx -endif - ifdef HAVE_DARWIN_OS X264CONF += --enable-pic ifdef HAVE_DARWIN_OS_ON_INTEL FFMPEG_CFLAGS += -DHAVE_LRINTF -else -FFMPEGCONF += --disable-altivec endif endif @@ -479,7 +469,7 @@ ifdef HAVE_WIN32 endif else ifdef HAVE_DARWIN_OS - (cd $<; $(HOSTCC) LIBXML2_CFLAGS=`xml2-config --cflags` LIBXML2_LIBS=`xml2-config --libs` ./configure $(HOSTCONF) --with-cache-dir=/var/cache/fontconfig --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,~/Library/Fonts --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 --disable-docs && make && make install-exec && (cd fontconfig ; make install-data) && cp fontconfig.pc $(PKG_CONFIG_LIBDIR)) + (cd $<; $(HOSTCC) LIBXML2_CFLAGS=`xml2-config --cflags` LIBXML2_LIBS=`xml2-config --libs` ./configure $(HOSTCONF) --with-cache-dir=/usr/X11/var/cache/fontconfig --with-confdir=/usr/X11/lib/X11/fonts --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,~/Library/Fonts --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 --disable-docs && make && make install-exec && (cd fontconfig ; make install-data) && cp fontconfig.pc $(PKG_CONFIG_LIBDIR)) else (cd $<; $(HOSTCC) LIBXML2_CFLAGS=`$(PREFIX)/bin/xml2-config --cflags` ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 --disable-docs && make && make install) endif @@ -787,19 +777,21 @@ libtheora: libtheora-$(THEORA_VERSION).tar.bz2 $(EXTRACT_BZ2) patch -p0 < Patches/theora.patch patch -p0 < Patches/libtheora-includes.patch +ifdef HAVE_WIN32 + patch -p0 < Patches/theora-doc.patch +endif (cd $@; autoconf) THEORACONF = --disable-sdltest --disable-oggtest --disable-vorbistest --disable-examples +ifdef HAVE_WIN32 +THEORACONF += --disable-docs +endif .theora: libtheora .ogg ifdef HAVE_BEOS (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(THEORACONF) --disable-asm && make && make install) else - ifdef NO_TEXT_RELOCATION - (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-asm $(THEORACONF) && make && make install) - else (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(THEORACONF)&& make && make install) - endif endif $(INSTALL_NAME) touch $@ @@ -936,7 +928,6 @@ lame-$(LAME_VERSION).tar.gz: lame: lame-$(LAME_VERSION).tar.gz $(EXTRACT_GZ) - patch -p0 < Patches/libmp3lame-mingw32.patch .lame: lame (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-analyser-hooks --disable-decoder --disable-shared --disable-gtktest --disable-frontend && make && make install) @@ -961,7 +952,6 @@ libebml-$(LIBEBML_VERSION).tar.bz2: libebml: libebml-$(LIBEBML_VERSION).tar.bz2 $(EXTRACT_BZ2) #endif - ifdef HAVE_WIN32 (cd $@; patch -p0 < ../Patches/libebml-svn-win32.patch) endif @@ -1000,7 +990,7 @@ libmatroska-$(LIBMATROSKA_VERSION).tar.bz2: libmatroska: libmatroska-$(LIBMATROSKA_VERSION).tar.bz2 $(EXTRACT_BZ2) #endif - + patch -p0 < ./Patches/libmatroska-kaxblock.patch ifdef HAVE_WIN32 (cd $@; patch -p0 < ../Patches/libmatroska-win32.patch) endif @@ -1083,18 +1073,18 @@ endif ifdef HAVE_DARWIN_OS_ON_INTEL (cd $@; patch -p0 < ../Patches/ffmpeg-macosx-intel-mmx.patch) endif -ifdef HAVE_DARWIN_OS - (cd $@/libswscale; patch -p0 < ../../Patches/ffmpeg-fix-noaltivec.patch) - (cd $@/libswscale; patch -p0 < ../../Patches/ffmpeg-libswscale-head.patch) -endif -ifdef NO_TEXT_RELOCATION - (cd $@; patch -p0 < ../Patches/ffmpeg-svn-mmx_removal-darwin9.patch) -endif ifdef HAVE_UCLIBC patch -p0 < Patches/ffmpeg-svn-uclibc.patch patch -p0 < Patches/ffmpeg-svn-internal-define.patch patch -p0 < Patches/ffmpeg-svn-libavformat.patch endif +ifdef HAVE_WIN32 + (cd $@; patch -p0 < ../Patches/ffmpeg-svn-win32.patch) +endif +ifdef NO_TEXT_RELOCATION + echo "Broken LD. Fix your tools." + exit -1 +endif else ffmpeg-$(FFMPEG_VERSION).tar.gz: echo "ffmpeg snapshot is too old, you MUST use subversion !" @@ -1105,8 +1095,10 @@ ffmpeg: ffmpeg-$(FFMPEG_VERSION).tar.gz $(EXTRACT_GZ) endif - -FFMPEGCONF = --enable-gpl --enable-postproc --disable-vhook --disable-ffserver --disable-ffmpeg --disable-ffplay --disable-devices --disable-protocols --disable-network --disable-filters +FFMPEGCONF += --enable-gpl --enable-postproc --disable-vhook --disable-ffserver --disable-ffmpeg --disable-ffplay --disable-devices --disable-protocols --disable-network --enable-swscale +ifdef HAVE_WIN32 +FFMPEGCONF += --disable-bzlib +endif ifdef HAVE_WINCE .ffmpeg: ffmpeg .zlib @@ -1410,7 +1402,7 @@ ifdef HAVE_WIN32 ifdef HAVE_CYGWIN (cd $<; $(HOSTCC) RANLIB="ranlib" AR="ar" STRIP="strip" ./configure $(X264CONF) --prefix="$(PREFIX)" --extra-cflags="-I$(PREFIX)/include" --extra-ldflags="-L$(PREFIX)/lib" && make && make install) else - (cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install) + (cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" --disable-pthread && make && make install) endif else ifdef HAVE_DARWIN_OS_ON_INTEL @@ -1445,6 +1437,7 @@ libmodplug: libmodplug-$(MODPLUG_VERSION).tar.gz $(EXTRACT_GZ) ifdef HAVE_WIN32 patch -p0 < Patches/libmodplug-win32.patch + (cd $@; autoreconf) endif .mod: libmodplug @@ -1662,16 +1655,11 @@ libxml2-$(XML_VERSION).tar.gz: xml: libxml2-$(XML_VERSION).tar.gz $(EXTRACT_GZ) -ifdef HAVE_WIN32 - patch -p0 < Patches/xml2-win32.patch - rm -f xml/aclocal.m4 - (cd $@; aclocal && automake && autoreconf) -endif ifdef HAVE_UCLIBC patch -p0 < Patches/xml2-uclibc.patch endif -XMLCONF = --with-minimal --with-catalog --with-reader --with-tree --with-push --with-xptr --with-valid --with-xpath --with-xinclude --with-sax1 --without-zlib --without-iconv --without-http --without-ftp --without-debug --without-docbook --without-regexps +XMLCONF = --with-minimal --with-catalog --with-reader --with-tree --with-push --with-xptr --with-valid --with-xpath --with-xinclude --with-sax1 --without-zlib --without-iconv --without-http --without-ftp --without-debug --without-docbook --without-regexps --without-python .xml: xml ifdef HAVE_CYGWIN @@ -1762,6 +1750,9 @@ zvbi-$(ZVBI_VERSION).tar.bz2: zvbi: zvbi-$(ZVBI_VERSION).tar.bz2 $(EXTRACT_BZ2) +ifdef HAVE_WIN32 + (cd $@; patch -p1 < ../Patches/zvbi-win32.patch; patch -p1 < ../Patches/zvbi-makefile.patch; autoreconf) +endif ifdef HAVE_WIN32 .zvbi: zvbi .pthreads @@ -1771,7 +1762,11 @@ endif ifdef HAVE_DARWIN_OS (cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS) -fnested-functions" && make && make install) else - (cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && make && make install) +ifdef HAVE_WIN32 + (cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS) --std=gnu99" LIBS="-lpthreadGC2" && make && make install) +else + (cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && make -C src && make -C src install) +endif endif $(INSTALL_NAME) touch $@ @@ -1880,7 +1875,7 @@ CIPHDIG= --enable-ciphers=aes,des,rfc2268,arcfour --enable-digests=sha1,md5,rmd1 .gcrypt: libgcrypt .gpg-error ifdef HAVE_WIN32 - (cd $<; ./autogen.sh && $(HOSTCC) ./configure $(HOSTCONF) --target=i586-mingw32msvc --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" $(CIPHDIG) --disable-shared --enable-static --disable-nls && sed -i 46s@sys/times.h@sys/time.h@ cipher/random.c && make && make install) + (cd $<; ./autogen.sh && $(HOSTCC) ./configure $(HOSTCONF) --target=i586-mingw32msvc --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" $(CIPHDIG) --disable-shared --enable-static --disable-nls && make && make install) else (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" $(CIPHDIG) && make && make install) endif @@ -1924,11 +1919,11 @@ ifdef HAVE_WIN32 (cd $@; autoconf) endif -.gnutls: gnutls .opencdk .gcrypt .gpg-error +.gnutls: gnutls .gcrypt .gpg-error ifdef HAVE_WIN32 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --target=i586-mingw32msvc --disable-cxx -disable-shared --enable-static --disable-nls --with-included-opencdk --with-included-libtasn1 && cd lgl && make && cd ../gl && make && cd ../lib &&make && make install && cd ../includes && make install) else - (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --disable-cxx --with-libopencdk-prefix=$(PREFIX) --disable-guile && make && make install) + (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --disable-cxx --with-included-opencdk --disable-guile && make && make install) endif $(INSTALL_NAME) touch $@ @@ -2361,7 +2356,7 @@ pthreads: pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz $(EXTRACT_GZ) .pthreads: pthreads - (cd $<; $(HOSTCC) make $(PTHREADSCONF) GC-static && mkdir -p $(PREFIX)/include && cp -v pthread.h sched.h semaphore.h $(PREFIX)/include/ && mkdir -p $(PREFIX)/lib && cp -v *.a $(PREFIX)/lib/) + (cd $<; $(HOSTCC) make $(PTHREADSCONF) GC GC-static && mkdir -p $(PREFIX)/include && cp -v pthread.h sched.h semaphore.h $(PREFIX)/include/ && mkdir -p $(PREFIX)/lib && cp -v *.{a,dll} $(PREFIX)/lib/) $(INSTALL_NAME) touch $@ @@ -2477,7 +2472,7 @@ libass: libass-$(ASS_VERSION).tar.bz2 patch -p0 < Patches/libass_mplayer_updates.patch ifneq ($(HOST),$(BUILD)) patch -p0 < Patches/libass-cross.patch - cd $@; autoconf; automake + (cd $@; autoreconf; automake) endif .libass: libass .png