X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=extras%2Fcontrib%2Fsrc%2FMakefile;h=73533feebf5f34028a7db9a3b184e2a5930c7fd2;hb=286d3083010d5e1835f8d6983f756a06e7f677c0;hp=ee4721e88833a9dc8ddcd36af312ad70bd46c18f;hpb=26b823ad6c8f9bc77f6e9c65d9e39fddcf2f2371;p=vlc diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile index ee4721e888..73533feebf 100644 --- a/extras/contrib/src/Makefile +++ b/extras/contrib/src/Makefile @@ -115,7 +115,7 @@ endif # ifdef HAVE_WIN32 HOSTCONF+= --without-pic --disable-shared --enable-msw --disable-dependency-tracking -FFMPEGCONF+= --target-os=mingw32 --enable-memalign-hack +FFMPEGCONF+= --target-os=mingw32 --arch=x86 --enable-memalign-hack ifdef HAVE_WIN64 FFMPEGCONF+= --cpu=athlon64 --arch=x86_64 else @@ -125,7 +125,7 @@ endif ifdef HAVE_WINCE HOSTCONF+= --without-pic --disable-shared -FFMPEGCONF+= --arch=armv4l --cpu=armv4t --disable-encoders --disable-muxers --disable-mpegaudio-hp --disable-decoder=snow --disable-decoder=vc9 --disable-decoder=wmv3 --disable-decoder=vorbis --disable-decoder=dvdsub --disable-decoder=dvbsub --disable-protocols +FFMPEGCONF+= --target-os=mingw32ce --arch=armv4l --cpu=armv4t --disable-encoders --disable-muxers --disable-mpegaudio-hp --disable-decoder=snow --disable-decoder=vc9 --disable-decoder=wmv3 --disable-decoder=vorbis --disable-decoder=dvdsub --disable-decoder=dvbsub --disable-protocols endif ifdef HAVE_UCLIBC @@ -149,7 +149,11 @@ endif ifdef HAVE_DARWIN_OS X264CONF=--host=$(HOST) X264CONF += --enable-pic +ifdef HAVE_DARWIN_32 +FFMPEGCONF += --cc=gcc-4.0 +else FFMPEGCONF += --cc=$(CC) +endif FFMPEGCONF += --arch=$(ARCH) ifdef HAVE_DARWIN_64 FFMPEGCONF += --cpu=core2 @@ -181,6 +185,8 @@ ifdef HAVE_ISA_THUMB NOTHUMB ?= -mno-thumb endif +X264CONF+= --disable-avs-input --disable-lavf-input --disable-ffms-input --disable-mp4-output + DATE=`date +%Y-%m-%d` # *************************************************************************** @@ -351,8 +357,6 @@ pkg-config-$(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 (cd $@; autoconf) .pkgcfg: pkgconfig @@ -372,9 +376,6 @@ gettext-$(GETTEXT_VERSION).tar.gz: gettext: gettext-$(GETTEXT_VERSION).tar.gz $(EXTRACT_GZ) -ifdef HAVE_WIN32 - patch -p0 < Patches/gettext-win32.patch -endif ifdef HAVE_DARWIN_OS patch -p0 < Patches/gettext-macosx.patch endif @@ -388,18 +389,18 @@ endif ifneq ($(HOST),$(BUILD)) ifndef HAVE_CYGWIN # We'll use the installed gettext and only need to cross-compile libintl, also build autopoint and gettextsize tools need for VLC bootstrap - ( cd $< && make -C gettext-runtime/intl && patch -p1 < ../Patches/libintl.patch && make -C gettext-runtime/intl install && make -C gettext-tools/misc install ) + ( cd $< && make -C gettext-runtime/intl && make -C gettext-runtime/intl install && make -C gettext-tools/misc install ) else # We are compiling for MinGW on Cygwin -- build the full current gettext - ( cd $< && make && patch -p1 < ../Patches/libintl.patch && make install ) + ( cd $< && make && make install ) endif else # Build and install the whole gettext - ( cd $< && make && patch -p1 < ../Patches/libintl.patch && make install ) + ( cd $< && make && make install ) endif # Work around another non-sense of autoconf. ifdef HAVE_WIN32 - (cd ../include; sed -i.orig '311 c #if 0' libintl.h) + (cd $(PREFIX)/include; sed -i.orig '314 c #if 0' libintl.h) endif $(INSTALL_NAME) touch $@ @@ -434,7 +435,7 @@ libiconv-snowleopard: libiconv-snowleopard.tar.bz2 ifdef HAVE_DARWIN_OS ifdef HAVE_DARWIN_10 .iconv: libiconv-snowleopard - (cd libiconv-snowleopard && cp libiconv.* ../../hosts/$(BUILD)/lib/) + (cd libiconv-snowleopard && cp libiconv.* $(PREFIX)/lib/) touch $@ else .iconv: @@ -460,17 +461,18 @@ fontconfig-$(FONTCONFIG_VERSION).tar.gz: fontconfig: fontconfig-$(FONTCONFIG_VERSION).tar.gz Patches/fontconfig.patch $(EXTRACT_GZ) + patch -p0 < Patches/fontconfig-march.patch patch -p0 < Patches/fontconfig-nodocs.patch ifdef HAVE_WIN32 patch -p0 < Patches/fontconfig.patch patch -p0 < Patches/fontconfig-noxml2.patch -endif (cd $@; autoreconf -ivf) +endif .fontconfig: fontconfig .xml .freetype ifdef HAVE_WIN32 ifdef HAVE_CYGWIN - (cd $<; ./configure --target=$(HOST) --disable-pic --disable-shared --disable-docs --with-arch=i686 --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 && make && make install) + (cd $<; ./configure --target=$(HOST) --disable-pic --disable-shared --disable-docs --with-arch=i686 --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 && make && make install) else (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --with-arch=i686 --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --disable-libxml2 --disable-docs && make && make install) endif @@ -688,7 +690,7 @@ libogg-$(OGG_VERSION).tar.gz: libogg: libogg-$(OGG_VERSION).tar.gz $(EXTRACT_GZ) - patch -p0 < Patches/ogg.patch + patch -p0 < Patches/libogg-inttypes.patch patch -p0 < Patches/libogg-1.1.patch ifdef HAVE_WINCE patch -p0 < Patches/libogg-wince.patch @@ -845,19 +847,18 @@ endif FLAC_DISABLE_FLAGS = --disable-oggtest --disable-xmms-plugin --disable-cpplibs .flac: flac .ogg -ifdef HAVE_WIN32 - (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(FLAC_DISABLE_FLAGS) && cd src&& make -C libFLAC&& make -C libFLAC install && cd .. && make -C include install) -else -ifdef HAVE_DARWIN_OS ifdef HAVE_DARWIN_OS_ON_INTEL - (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-asm-optimizations && cd src && make -C libFLAC && make -C libFLAC install && cd .. && make -C include install) -else - (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(FLAC_DISABLE_FLAGS) && cd src && make -C libFLAC && make -C libFLAC install && cd .. && make -C include install) -endif + cd $< && \ + $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-asm-optimizations $(FLAC_DISABLE_FLAGS) else - (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(FLAC_DISABLE_FLAGS) && cd src && make -C libFLAC && make -C libFLAC install && cd .. && make -C include install) -endif -endif + cd $< && \ + $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(FLAC_DISABLE_FLAGS) +endif + cd $> libFLAC/flac.pc && \ + make -C libFLAC install + cd $< && make -C include install $(INSTALL_NAME) touch $@ @@ -905,6 +906,50 @@ CLEAN_FILE += .faad CLEAN_PKG += faad2 DISTCLEAN_PKG += faad2-$(FAAD2_VERSION).tar.gz + +# *************************************************************************** +# libvp8 +# *************************************************************************** + +libvpx-$(VPX_VERSION).tar.bz2: + $(WGET) $(VPX_URL) + +vpx: libvpx-$(VPX_VERSION).tar.bz2 + $(EXTRACT_BZ2) + patch -p0 < Patches/libvpx-cross.patch +ifdef HAVE_DARWIN_OS + patch -p0 < Patches/libvpx-darwin.patch +endif + +ifdef HAVE_WIN32 +VPX_TARGET=x86-win32-gcc +else +ifdef HAVE_DARWIN_OS +ifdef HAVE_DARWIN_64 +VPX_TARGET=x86_64-darwin9-gcc +else +ifdef HAVE_DARWIN_OS_ON_INTEL +VPX_TARGET=x86-darwin9-gcc +else +VPX_TARGET=ppc32-darwin9-gcc +endif +endif +else +VPX_TARGET=FIXME +endif +endif + +.vpx: vpx + (cd $<; ./configure --target=$(VPX_TARGET) --disable-install-bins --disable-install-srcs --disable-install-libs --disable-examples && XCC=$(CC) XNM=$(NM) XSTRIP=$(STRIP) make && make install) + (cd $<; cp vp8/*.h vpx_codec/*.h vpx_ports/*.h $(PREFIX)/include) # Of course, why the hell would one expect it to be listed or in make install? + rm $(PREFIX)/include/config.h + (cd $<; $(RANLIB) libvpx.a && cp libvpx.a $(PREFIX)/lib) # Of course, why the hell would one expect it to be listed or in make install? + touch $@ + +CLEAN_FILE += .vpx +CLEAN_PKG += vpx +DISTCLEAN_PKG += libvpx-$(VPX_VERSION).tar.bz2 + # *************************************************************************** # lame # *************************************************************************** @@ -932,16 +977,11 @@ libebml-$(LIBEBML_VERSION).tar.bz2: libebml: libebml-$(LIBEBML_VERSION).tar.bz2 $(EXTRACT_BZ2) -ifdef HAVE_WIN32 - (cd $@; patch -p0 < ../Patches/libebml-svn-win32.patch) -endif -ifdef HAVE_WIN64 - patch -p0 < Patches/libebml-win64.patch -endif + patch -p0 < Patches/libebml-win32.patch .ebml: libebml ifdef HAVE_WIN32 - (cd $<; make -C make/mingw32 prefix=$(PREFIX) $(HOSTCC2) CFLAGS="$(CFLAGS) -DWIN32" SHARED=no && make -C make/linux install_staticlib install_headers prefix=$(PREFIX) $(HOSTCC2)) + (cd $<; make -C make/mingw32 prefix=$(PREFIX) $(HOSTCC) CFLAGS="$(CFLAGS) -DWIN32" SHARED=no && make -C make/linux install_staticlib install_headers prefix=$(PREFIX) $(HOSTCC)) else (cd $<; make -C make/linux prefix=$(PREFIX) $(HOSTCC2) staticlib && make -C make/linux install_staticlib install_headers prefix=$(PREFIX)) $(RANLIB) $(PREFIX)/lib/libebml.a @@ -961,16 +1001,15 @@ libmatroska-$(LIBMATROSKA_VERSION).tar.bz2: libmatroska: libmatroska-$(LIBMATROSKA_VERSION).tar.bz2 $(EXTRACT_BZ2) - patch -p0 < ./Patches/libmatroska-kaxblock.patch ifdef HAVE_WIN32 - (cd $@; patch -p0 < ../Patches/libmatroska-win32.patch) + patch -p0 < Patches/libmatroska-win32.patch endif .matroska: libmatroska .ebml ifdef HAVE_WIN32 - (cd $<; make -C make/mingw32 prefix=$(PREFIX) $(HOSTCC2) SHARED=no EBML_DLL=no libmatroska.a && make -C make/linux install_staticlib install_headers prefix=$(PREFIX) $(HOSTCC2)) + (cd $<; make -C make/mingw32 prefix=$(PREFIX) $(HOSTCC) SHARED=no EBML_DLL=no libmatroska.a && make -C make/linux install_staticlib install_headers prefix=$(PREFIX) $(HOSTCC)) else - (cd $<; make -C make/linux prefix=$(PREFIX) $(HOSTCC2) staticlib && make -C make/linux install_staticlib install_headers prefix=$(PREFIX)) + (cd $<; make -C make/linux prefix=$(PREFIX) $(HOSTCC) staticlib && make -C make/linux install_staticlib install_headers prefix=$(PREFIX)) $(RANLIB) $(PREFIX)/lib/libmatroska.a endif touch $@ @@ -1023,25 +1062,24 @@ DISTCLEAN_PKG += amrwb-$(LIBAMR_WB_VERSION).tar.bz2 # *************************************************************************** ifdef SVN -ffmpeg: +ifdef HAVE_WIN32 +ffmpeg: .dshow_headers +else +ffmpeg: +endif $(SVN) co $(FFMPEG_SVN) ffmpeg + (cd ffmpeg; patch -p0 < ../Patches/ffmpeg-libvpx.patch;) ifdef HAVE_ISA_THUMB patch -p0 < Patches/ffmpeg-avcodec-no-thumb.patch endif +ifdef HAVE_WIN64 + (cd ffmpeg/libswscale; patch -p0 < ../../Patches/ffmpeg-win64.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) - (cd $@; patch -p0 < ../Patches/ffmpeg-dxva2.patch) -endif -ifdef NO_TEXT_RELOCATION - echo "Broken LD. Fix your tools." - exit -1 -endif - (cd $@; patch -p1 < ../Patches/eac3_spectral.patch) else ffmpeg-$(FFMPEG_VERSION).tar.gz: echo "ffmpeg snapshot is too old, you MUST use subversion !" @@ -1061,11 +1099,16 @@ FFMPEGCONF += \ --disable-ffplay \ --disable-devices \ --disable-protocols \ + --disable-filters \ --disable-network +ifdef HAVE_WIN64 +FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=vorbis --enable-libmp3lame --enable-w32threads --disable-dxva2 --disable-bsfs +else ifdef HAVE_WIN32 -FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=ac3 --enable-libmp3lame --enable-w32threads +FFMPEGCONF += --disable-bzlib --disable-decoder=dca --disable-encoder=vorbis --enable-libmp3lame --enable-w32threads --enable-dxva2 --disable-bsfs --enable-libvpx else -FFMPEGCONFG += --enable-pthreads +FFMPEGCONF += --enable-pthreads +endif endif ifdef HAVE_WINCE @@ -1095,33 +1138,33 @@ DISTCLEAN_PKG += ffmpeg-$(FFMPEG_VERSION).tar.gz # libdvdcss # *************************************************************************** -libdvdcss-$(LIBDVDCSS_VERSION).tar.gz: +libdvdcss-$(LIBDVDCSS_VERSION).tar.bz2: $(WGET) $(LIBDVDCSS_URL) -ifdef SVN -libdvdcss: - $(SVN) co svn://svn.videolan.org/libdvdcss/trunk libdvdcss - cd $@ && sh bootstrap -else -libdvdcss: libdvdcss-$(LIBDVDCSS_VERSION).tar.gz - $(EXTRACT_GZ) -endif +# ifdef SVN +# libdvdcss: +# $(SVN) co svn://svn.videolan.org/libdvdcss/trunk libdvdcss +# cd $@ && sh bootstrap +# else +libdvdcss: libdvdcss-$(LIBDVDCSS_VERSION).tar.bz2 + $(EXTRACT_BZ2) +# endif .dvdcss: libdvdcss (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --disable-doc --prefix=$(PREFIX) && make && make install) $(INSTALL_NAME) touch $@ -ifdef SVN -libdvdcss-source: libdvdcss - tar cv --exclude=.svn libdvdcss | bzip2 > libdvdcss-$(DATE).tar.bz2 - -SOURCE += libdvdcss-source -endif +# ifdef SVN +# libdvdcss-source: libdvdcss +# tar cv --exclude=.svn libdvdcss | bzip2 > libdvdcss-$(DATE).tar.bz2 +# +# SOURCE += libdvdcss-source +# endif CLEAN_FILE += .dvdcss CLEAN_PKG += libdvdcss -DISTCLEAN_PKG += libdvdcss-$(LIBDVDCSS_VERSION).tar.gz +DISTCLEAN_PKG += libdvdcss-$(LIBDVDCSS_VERSION).tar.bz2 # *************************************************************************** # dummy dvdread to trigger the INSTALL_NAME script @@ -1137,7 +1180,7 @@ DISTCLEAN_PKG += libdvdcss-$(LIBDVDCSS_VERSION).tar.gz # *************************************************************************** libdvdread: $(SVN) co $(LIBDVDREAD_SVN) libdvdread - (cd $@; patch -p 0 < ../Patches/libdvdread.patch) + (cd $@; patch -p 0 < ../Patches/libdvdread-dvdcss-static.patch) ifdef HAVE_WIN32 (cd $@; patch -p 0 < ../Patches/libdvdread-win32.patch) endif @@ -1178,7 +1221,7 @@ endif ifdef HAVE_WIN32 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) && make && make install) else - (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install) + (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && make && make install) endif $(INSTALL_NAME) touch $@ @@ -1215,21 +1258,27 @@ live555-$(LIVEDOTCOM_VERSION).tar.gz: live: live555-$(LIVEDOTCOM_VERSION).tar.gz $(EXTRACT_GZ) - patch -p0 < Patches/live-noapps.patch patch -p0 < Patches/live-uselocale.patch + patch -p0 < Patches/live-inet_ntop.patch ifdef HAVE_WIN64 patch -p0 < Patches/live-win64.patch endif +ifndef HAVE_WIN32 +ifndef HAVE_WINCE + patch -p0 < Patches/live-getaddrinfo.patch +endif +endif .live: live ifdef HAVE_WIN32 (cd $<;./genMakefiles mingw && make $(HOSTCC)) else ifdef HAVE_WINCE + (cd $<; sed -e 's/-lws2_32/-lws2/g' -i.orig config.mingw) (cd $<;./genMakefiles mingw && make $(HOSTCC)) else ifdef HAVE_DARWIN_OS - (cd $<; sed -e 's%-DBSD=1%-DBSD=1\ $(EXTRA_CFLAGS)\ $(EXTRA_LDFLAGS)%' -e 's%cc%$(CC)%' -e 's%c++%$(CXX)%' -i.orig config.macosx) + (cd $<; sed -e 's%-DBSD=1%-DBSD=1\ $(EXTRA_CFLAGS)\ $(EXTRA_LDFLAGS)%' -e 's%cc%$(CC)%' -e 's%c++%$(CXX)\ $(EXTRA_LDFLAGS)%' -i.orig config.macosx) (cd $<; ./genMakefiles macosx && make) else (cd $<; sed -e 's/=/= EXTRA_CPPFLAGS/' -e 's%EXTRA_CPPFLAGS%-I/include%' -i.orig groupsock/Makefile.head) @@ -1237,12 +1286,16 @@ ifdef HAVE_UCLIBC ifdef HAVE_BIGENDIAN (cd $<; ./genMakefiles armeb-uclibc && make $(HOSTCC)) endif +else +ifeq ($(ARCH)$(HAVE_MAEMO),armel) + (cd $<; ./genMakefiles armlinux && make $(HOSTCC)) else (cd $<; sed -e 's%-D_FILE_OFFSET_BITS=64%-D_FILE_OFFSET_BITS=64\ -fPIC\ -DPIC%' -i.orig config.linux) (cd $<; ./genMakefiles linux && make $(HOSTCC)) endif endif endif +endif endif mkdir -p $(PREFIX)/lib $(PREFIX)/include cp $