1 #***************************************************************************
2 # src/Makefile : Dearchive and compile all files necessary
3 # ***************************************************************************
4 # Copyright (C) 2003 - 2008 the VideoLAN team
7 # Authors: Christophe Massiot <massiot@via.ecp.fr>
8 # Derk-Jan Hartman <hartman at videolan dot org>
9 # Eric Petit <titer@m0k.org>
10 # Felix Paul Kühne <fkuehne@videolan.org>
11 # Christophe Mutricy <xtophe AT xtelevision.com>
12 # Gildas Bazin <gbazin at videolan dot org>
13 # Damien Fouilleul <damienf at videolan dot org>
14 # Jean-Baptiste Kempf <jb at videolan dot org>
16 # This program is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 # GNU General Public License for more details.
26 # You should have received a copy of the GNU General Public License
27 # along with this program; if not, write to the Free Software
28 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
29 # ***************************************************************************
32 include ./packages.mak
34 # ***************************************************************************
35 # Set a clean environment
36 # ***************************************************************************
38 export PATH := $(PREFIX)/bin:$(EXTRA_PATH):$(PATH)
39 export PKG_CONFIG_PATH
40 export PKG_CONFIG_LIBDIR = $(PREFIX)/lib/pkgconfig
41 export MACOSX_DEPLOYMENT_TARGET = $(SDK_TARGET)
42 export LIBRARY_PATH := $(PREFIX)/lib:$(LIBRARY_PATH)
43 export CFLAGS = -I$(PREFIX)/include $(EXTRA_CFLAGS) $(EXTRA_CPPFLAGS)
44 export CPPFLAGS = -I$(PREFIX)/include $(EXTRA_CFLAGS) $(EXTRA_CPPFLAGS)
45 export CXXFLAGS = -I$(PREFIX)/include $(EXTRA_CFLAGS) $(EXTRA_CPPFLAGS)
46 export LDFLAGS = -L$(PREFIX)/lib $(EXTRA_LDFLAGS)
48 # ***************************************************************************
49 # Cross compilation variables
50 # We'll usually use --host=<platform>, except for a few libraries which
51 # don't handle it (gotta set CC/CXX/etc), and obviously FFmpeg has its own
52 # way of doing it... ;)
53 # ***************************************************************************
65 HOSTCC+= RANLIB="$(RANLIB)"
71 HOSTCC+= STRIP="$(STRIP)"
75 # Define ranlib on non-cross compilation setups
80 # For libebml/libmatroska. Grrr.
82 HOSTCC2=$(HOSTCC) AR="$(AR) rcvu"
87 # For ffmpeg if not cross compiling
89 FFMPEGCONF=--cc="$(CC)"
95 #This should be inside the if block but some config scripts are buggy
96 HOSTCONF=--target=$(HOST) --host=$(HOST) --build=$(BUILD) --program-prefix=""
97 ifneq ($(BUILD),$(HOST))
99 # Compiling for MinGW under Cygwin could be deemed as cross compiling
100 # unfortunately there isn't a complete separate GCC toolchain for MinGW under Cygwin
103 # We are REALLY cross compiling
104 FFMPEGCONF=--cross-prefix=$(HOST)- --enable-cross-compile
105 X264CONF=--host=$(HOST)
106 PTHREADSCONF="CROSS=$(HOST)-"
108 # We are compiling for MinGW on Cygwin
109 PTHREADSCONF=$(HOSTCC)
114 # Special target-dependant options
117 HOSTCONF+= --without-pic --disable-shared --enable-msw --with-included-opencdk --with-included-libtasn1 --disable-dependency-tracking
118 FFMPEGCONF+= --target-os=mingw32 --enable-memalign-hack --cpu=i686 --arch=i686 --disable-debug
122 HOSTCONF+= --without-pic --disable-shared
123 FFMPEGCONF+= --enable-mingwce --cpu=armv4l --disable-debug --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
128 FFMPEGCONF+= --arch=armeb --enable-armv5te --enable-iwmmxt
130 FFMPEGCONF+= --arch=armv4l
132 FFMPEGCONF+= --enable-small --disable-debug --disable-mpegaudio-hp
133 FFMPEG_CFLAGS += -DHAVE_LRINTF --std=c99
135 FFMPEGCONF+= --enable-libmp3lame --enable-libfaac --enable-swscale
139 FFMPEGCONF+= --cpu=x86 --disable-debug --disable-audio-beos
142 ifdef HAVE_DARWIN_OS_ON_INTEL
143 FFMPEGCONF += --enable-memalign-hack --cpu=pentium-m
146 ifdef NO_TEXT_RELOCATION
147 FFMPEGCONF += --disable-mmx
151 X264CONF += --enable-pic
152 ifdef HAVE_DARWIN_OS_ON_INTEL
153 FFMPEG_CFLAGS += -DHAVE_LRINTF
155 FFMPEGCONF += --disable-altivec
160 FFMPEGCONF+= --enable-libamr-nb --enable-libamr-wb --enable-nonfree
163 DATE=`date +%Y-%m-%d`
165 # ***************************************************************************
167 # ***************************************************************************
168 # Generated by ./bootstrap from default configuration in src/Distributions
170 include ../distro.mak
174 # ***************************************************************************
176 # ***************************************************************************
180 gunzip -c $< | tar xf - --exclude='[*?:<>\|]'
181 mv $(patsubst %.tar.gz,%,$(patsubst %.tgz,%,$(notdir $<))) $@ || true
187 bunzip2 -c $< | tar xf - --exclude='[*?:<>\|]'
188 mv $(patsubst %.tar.bz2,%,$(notdir $<)) $@ || true
195 mv $(patsubst %.zip,%,$(notdir $<)) $@ || true
199 ### Darwin-specific ###
200 # These macros prepare the dynamic libraries for inclusion in the Mac OS X
201 # bundle. For instance if you're building a library named libtoto.dylib,
202 # which depends on the contrib library libtata.dylib, you should have the
204 # .toto: toto_directory .tata
205 # cd $< ; ./configure --prefix=$(PREFIX)
207 # $(MAKE) -C $< install
211 ifeq ($(HOST),i586-pc-beos)
212 # We test if the file actually exists, as sometimes (but not always)
213 # libtool won't accept to build the shared library
215 if test -f $(PREFIX)/lib/lib$(patsubst .%,%,$@).so ; then \
216 mkdir -p $(PREFIX)/vlc-lib ; \
217 cp $(PREFIX)/lib/lib$(patsubst .%,%,$@).so \
218 $(PREFIX)/vlc-lib/ ; \
223 # ***************************************************************************
225 # ***************************************************************************
227 ifeq ($(BUILD),i586-pc-beos)
228 perl-$(PERL_VERSION).tar.gz:
231 perl: perl-$(PERL_VERSION).tar.gz
233 sed -i.orig 's%prefix="/boot/home/config"%prefix="$(PREFIX)"%' perl/hints/beos.sh
236 (cd $<; ./Configure -d -e && make && make install && ln -sf perl5/$(PERL_VERSION)/BePC-beos/CORE/libperl.so $(PREFIX)/lib/libperl.so)
241 DISTCLEAN_PKG += perl-$(PERL_VERSION).tar.gz
244 # ***************************************************************************
246 # ***************************************************************************
248 autoconf-$(AUTOCONF_VERSION).tar.bz2:
249 $(WGET) $(AUTOCONF_URL)
251 autoconf: autoconf-$(AUTOCONF_VERSION).tar.bz2
255 (cd $<; ./configure --prefix=$(PREFIX) && make && make install)
258 CLEAN_FILE += .autoconf
259 CLEAN_PKG += autoconf
260 DISTCLEAN_PKG += autoconf-$(AUTOCONF_VERSION).tar.bz2
262 # ***************************************************************************
264 # ***************************************************************************
266 make-$(GNUMAKE_VERSION).tar.bz2:
267 $(WGET) $(GNUMAKE_URL)
269 gnumake: make-$(GNUMAKE_VERSION).tar.bz2
275 (cd $<; ./configure --prefix=$(PREFIX) && make && make install)
280 CLEAN_FILE += .gnumake
282 DISTCLEAN_PKG += make-$(GNUMAKE_VERSION).tar.bz2
284 # ***************************************************************************
286 # ***************************************************************************
287 cmake-$(CMAKE_VERSION).tar.gz:
290 cmake: cmake-$(CMAKE_VERSION).tar.gz
294 # cvs -d :pserver:anonymous:cmake@www.cmake.org:/cvsroot/CMake co -d cmake CMake
297 (cd $<; ./configure --prefix=$(PREFIX) && make && make install)
303 # ***************************************************************************
305 # ***************************************************************************
308 libtool-$(LIBTOOL_VERSION).tar.gz:
309 $(WGET) $(LIBTOOL_URL)
311 libtool: libtool-$(LIBTOOL_VERSION).tar.gz
315 (cd $<; ./configure --prefix=$(PREFIX) && make && make install)
316 ln -sf libtool $(PREFIX)/bin/glibtool
317 ln -sf libtoolize $(PREFIX)/bin/glibtoolize
321 DISTCLEAN_PKG += libtool-$(LIBTOOL_VERSION).tar.gz
322 CLEAN_FILE += .libtool
326 ifeq ($(BUILD),i586-pc-beos)
327 libtool-$(LIBTOOL_VERSION).tar.gz:
328 $(WGET) $(LIBTOOL_URL)
330 libtool: libtool-$(LIBTOOL_VERSION).tar.gz
334 (cd $<; ./configure --prefix=$(PREFIX) && make && make install)
338 DISTCLEAN_PKG += libtool-$(LIBTOOL_VERSION).tar.gz
339 CLEAN_FILE += .libtool
343 # ***************************************************************************
345 # ***************************************************************************
347 automake-$(AUTOMAKE_VERSION).tar.gz:
348 $(WGET) $(AUTOMAKE_URL)
350 automake: automake-$(AUTOMAKE_VERSION).tar.gz
354 (cd $<; ./configure --prefix=$(PREFIX) && make && make install)
357 CLEAN_FILE += .automake
358 CLEAN_PKG += automake
359 DISTCLEAN_PKG += automake-$(AUTOMAKE_VERSION).tar.gz
361 # ***************************************************************************
363 # ***************************************************************************
365 pkg-config-$(PKGCFG_VERSION).tar.gz:
366 $(WGET) $(PKGCFG_URL)
368 pkgconfig: pkg-config-$(PKGCFG_VERSION).tar.gz
370 patch -d pkgconfig/glib-1.2.8 -p 1 < Patches/glib.patch
371 patch -d pkgconfig -p0 < Patches/pkgcfg.patch
374 (cd pkgconfig; autoconf && ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
377 CLEAN_FILE += .pkgcfg
378 CLEAN_PKG += pkgconfig
379 DISTCLEAN_PKG += pkg-config-$(PKGCFG_VERSION).tar.gz
381 # ***************************************************************************
383 # ***************************************************************************
385 gettext-$(GETTEXT_VERSION).tar.gz:
386 $(WGET) $(GETTEXT_URL)
388 gettext: gettext-$(GETTEXT_VERSION).tar.gz
391 patch -p0 < Patches/gettext-win32.patch
394 patch -p0 < Patches/gettext-macosx.patch
397 .intl: gettext .iconv
399 ( cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-relocatable --with-iconv-prefix=$(PREFIX) --disable-java --disable-native-java)
401 ( cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-java --disable-native-java --without-emacs)
403 ifeq ($(BUILD),i586-pc-beos)
404 # The ugliest kludge ever - so libtool correctly links shared libraries
405 # on BeOS. Sorry, I just can't figure out how libtool works
406 ( cd $< && for f in `find . -name libtool`; do sed -e 's/ -shared / -nostart /' -e 's/^predep_objects.*/predep_objects=""/' -i $$f; chmod +x $$f; done )
408 ifneq ($(HOST),$(BUILD))
410 # We'll use the installed gettext and only need to cross-compile libintl, also build autopoint and gettextsize tools need for VLC bootstrap
411 ( cd $< && make -C gettext-runtime/intl && patch -p1 < ../Patches/libintl.patch && make -C gettext-runtime/intl install && make -C gettext-tools/misc install )
413 # We are compiling for MinGW on Cygwin -- build the full current gettext
414 ( cd $< && make && patch -p1 < ../Patches/libintl.patch && make install )
417 # Build and install the whole gettext
418 ( cd $< && make && patch -p1 < ../Patches/libintl.patch && make install )
420 # Work around another non-sense of autoconf.
422 (cd ../include; sed -i.orig '311 c #if 0' libintl.h)
429 DISTCLEAN_PKG += gettext-$(GETTEXT_VERSION).tar.gz
431 # ***************************************************************************
433 # ***************************************************************************
435 libiconv-$(LIBICONV_VERSION).tar.gz:
436 $(WGET) $(LIBICONV_URL)
438 libiconv: libiconv-$(LIBICONV_VERSION).tar.gz
441 patch -p0 < Patches/libiconv.patch
443 patch -p0 < Patches/libiconv-autoconf-uclibc.patch
450 (cd libiconv; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls && make && make install)
456 CLEAN_PKG += libiconv
457 DISTCLEAN_PKG += libiconv-$(LIBICONV_VERSION).tar.gz
459 # ***************************************************************************
461 # ***************************************************************************
463 fontconfig-$(FONTCONFIG_VERSION).tar.gz:
464 $(WGET) $(FONTCONFIG_URL)
466 fontconfig: fontconfig-$(FONTCONFIG_VERSION).tar.gz Patches/fontconfig.patch
468 patch -p0 < Patches/fontconfig.patch
469 patch -p0 < Patches/fontconfig-nodocs.patch
471 .fontconfig: fontconfig .xml .freetype
474 (cd $<; autoreconf && LIBXML2_CFLAGS=`$(PREFIX)/bin/xml2-config --cflags` ./configure --target=$(HOST) --disable-pic --disable-shared --disable-docs --with-cache-dir=WINDOWSTEMPDIR --with-arch=i686 --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 && make && make install)
476 (cd $<; autoreconf && $(HOSTCC) LIBXML2_CFLAGS=`$(PREFIX)/bin/xml2-config --cflags` ./configure $(HOSTCONF) --with-cache-dir=WINDOWSTEMPDIR --with-arch=i686 --prefix=$(PREFIX) --with-freetype-config=$(PREFIX)/bin/freetype-config --enable-libxml2 --disable-docs && make && make install)
480 (cd $<; autoreconf && $(HOSTCC) LIBXML2_CFLAGS=`xml2-config --cflags` LIBXML2_LIBS=`xml2-config --libs` ./configure $(HOSTCONF) --with-cache-dir=/var/cache/fontconfig --with-confdir=/etc/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))
482 (cd $<; autoreconf && $(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)
488 CLEAN_FILE += .fontconfig
489 CLEAN_PKG += fontconfig
490 DISTCLEAN_PKG += fontconfig-$(FONTCONFIG_VERSION).tar.gz
492 # ***************************************************************************
494 # ***************************************************************************
496 freetype-$(FREETYPE2_VERSION).tar.gz:
497 $(WGET) $(FREETYPE2_URL)
499 freetype2: freetype-$(FREETYPE2_VERSION).tar.gz
504 (cd $<; ./configure --target=$(HOST) --disable-pic --disable-shared --prefix=$(PREFIX) && make && make install)
506 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
511 CLEAN_FILE += .freetype
512 CLEAN_PKG += freetype2
513 DISTCLEAN_PKG += freetype-$(FREETYPE2_VERSION).tar.gz
515 # ***************************************************************************
517 # ***************************************************************************
519 fribidi-$(FRIBIDI_VERSION).tar.gz:
520 $(WGET) $(FRIBIDI_URL)
522 fribidi: fribidi-$(FRIBIDI_VERSION).tar.gz
524 patch -p0 < Patches/fribidi.patch
526 .fribidi: fribidi .iconv
527 (cd $<; rm -f configure; ./bootstrap && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
531 CLEAN_FILE += .fribidi
533 DISTCLEAN_PKG += fribidi-$(FRIBIDI_VERSION).tar.gz
535 # ***************************************************************************
537 # ***************************************************************************
539 a52dec-$(A52DEC_VERSION).tar.gz:
540 $(WGET) $(A52DEC_URL)
542 a52dec: a52dec-$(A52DEC_VERSION).tar.gz
546 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd liba52 && make && make install && cd ../include && make && make install)
551 DISTCLEAN_PKG += a52dec-$(A52DEC_VERSION).tar.gz
553 # ***************************************************************************
555 # ***************************************************************************
558 # @echo "*** Please press return here : ***"
559 # cvs -d $(MPEG2DEC_CVSROOT) login
560 # cvs -d $(MPEG2DEC_CVSROOT) co mpeg2dec
561 # (cd $@; ./bootstrap)
563 mpeg2dec-$(MPEG2DEC_VERSION).tar.gz:
564 $(WGET) $(MPEG2DEC_URL)
566 # It is easier to use bootstrapped versions...
567 #mpeg2dec-$(MPEG2DEC_VERSION).tar.gz:
568 # $(WGET) $(MPEG2DEC_SNAPSHOT)
569 # mv mpeg2dec-$(MPEG2DEC_DATE).tar.gz $@
571 mpeg2dec: mpeg2dec-$(MPEG2DEC_VERSION).tar.gz
575 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --without-x --disable-sdl && cd libmpeg2 && make && make install && cd ../include && make && make install)
579 CLEAN_PKG += mpeg2dec
580 #DISTCLEAN_PKG += mpeg2dec-$(MPEG2DEC_VERSION)-cvs.tar.gz
581 DISTCLEAN_PKG += mpeg2dec-$(MPEG2DEC_VERSION).tar.gz
583 # ***************************************************************************
585 # ***************************************************************************
587 libid3tag-$(LIBID3TAG_VERSION).tar.gz:
588 $(WGET) $(LIBID3TAG_URL)
590 libid3tag: libid3tag-$(LIBID3TAG_VERSION).tar.gz
592 patch -d libid3tag -p0 < Patches/libid3tag-0.15.1b-fix-CVE-2008-2109.patch
595 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
599 CLEAN_FILE += .id3tag
600 CLEAN_PKG += libid3tag
601 DISTCLEAN_PKG += libid3tag-$(LIBID3TAG_VERSION).tar.gz
603 # ***************************************************************************
605 # ***************************************************************************
607 pcre-$(PCRE_VERSION).tar.bz2:
610 pcre: pcre-$(PCRE_VERSION).tar.bz2
614 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared && make && make install )
619 DISTCLEAN_PKG += pcre-$(PCRE_VERSION).tar.bz2
621 # ***************************************************************************
623 # ***************************************************************************
626 LUA_MAKEPLATEFORM=mingw
629 LUA_MAKEPLATEFORM=macosx
632 LUA_MAKEPLATEFORM=linux
635 LUA_MAKEPLATEFORM=bsd
637 LUA_MAKEPLATEFORM=generic
643 lua-$(LUA_VERSION).tar.gz:
646 lua: lua-$(LUA_VERSION).tar.gz
651 ( cd $<; sed -i.orig 's/lua luac/lua.exe/' Makefile ; cd src; sed -i.orig 's/CC=/#CC=/' Makefile; cd ../..;)
652 (cd $<; $(HOSTCC) make $(LUA_MAKEPLATEFORM); cd src; $(HOSTCC) make liblua.a; cd ..;$(HOSTCC) make install INSTALL_TOP=$(PREFIX); $(RANLIB) $(PREFIX)/lib/liblua.a)
653 (cd $<; sed -i.orig 's@prefix= /usr/local@prefix= $(PREFIX)@' etc/lua.pc; mkdir -p $(PREFIX)/lib/pkgconfig; cp etc/lua.pc $(PREFIX)/lib/pkgconfig)
655 (cd $<; $(HOSTCC) make $(LUA_MAKEPLATEFORM) && make install INSTALL_TOP=$(PREFIX))
661 DISTCLEAN_PKG += lua-$(LUA_VERSION).tar.gz
663 # ***************************************************************************
665 # ***************************************************************************
667 libmad-$(LIBMAD_VERSION).tar.gz:
668 $(WGET) $(LIBMAD_URL)
670 libmad: libmad-$(LIBMAD_VERSION).tar.gz
674 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="-O3" && make && make install)
680 DISTCLEAN_PKG += libmad-$(LIBMAD_VERSION).tar.gz
682 # ***************************************************************************
684 # ***************************************************************************
686 libogg-$(OGG_VERSION).tar.gz:
689 libogg: libogg-$(OGG_VERSION).tar.gz
691 patch -p0 < Patches/ogg.patch
692 patch -p0 < Patches/libogg-1.1.patch
694 patch -p0 < Patches/libogg-wince.patch
699 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make install)
705 DISTCLEAN_PKG += libogg-$(OGG_VERSION).tar.gz
707 # ***************************************************************************
709 # ***************************************************************************
712 # @echo "*** Please type \"anoncvs\" here : ***"
713 # cvs -d $(OGG_CVSROOT) login
714 # cvs -d $(OGG_CVSROOT) co vorbis
715 # (cd $@; ./autogen.sh)
717 libvorbis-$(VORBIS_VERSION).tar.gz:
718 $(WGET) $(VORBIS_URL)
720 libvorbis: libvorbis-$(VORBIS_VERSION).tar.gz
722 patch -p0 < Patches/libvorbis.patch
723 patch -d libvorbis -p0 < Patches/libvorbis-r14598-CVE-2008-1420.patch
724 patch -d libvorbis -p0 < Patches/libvorbis-r14602-CVE-2008-1419.patch
725 patch -d libvorbis -p0 < Patches/libvorbis-r14602-CVE-2008-1423.patch
728 .vorbis: libvorbis .ogg
729 # FIXME: shared libs disabled for now because of linking errors
730 # -- titer 2005/09/16
731 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared && make && make install)
735 .vorbisenc: .vorbis .ogg
739 CLEAN_FILE += .vorbis .vorbisenc
740 CLEAN_PKG += libvorbis
741 DISTCLEAN_PKG += libvorbis-$(VORBIS_VERSION).tar.gz
743 # ***************************************************************************
745 # ***************************************************************************
749 $(SVN) co http://svn.xiph.org/trunk/Tremor tremor
750 (cd $@ && patch -p0 < ../Patches/tremor.patch)
751 (cd $@; rm -f ogg.h && echo "#include <ogg/ogg.h>" > ogg.h && rm -f os_types.h && echo "#include <ogg/os_types.h>" > os_types.h && ./autogen.sh)
753 tremor-$(TREMOR_VERSION).tar.bz2:
754 echo "tremor snapshot does not exist, you MUST use subversion !"
756 $(WGET) $(TREMOR_URL)
758 tremor: tremor-$(TREMOR_VERSION).tar.bz2
763 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared && make && make install)
768 tremor-source: tremor
769 tar cfvz tremor-$(DATE).tar.gz tremor
771 SOURCE += tremor-source
774 CLEAN_FILE += .tremor
776 #DISTCLEAN_PKG += tremor-$(TREMOR_VERSION).tar.bz2 #no tremor snapshot
778 # ***************************************************************************
780 # ***************************************************************************
782 libtheora-$(THEORA_VERSION).tar.bz2:
783 $(WGET) $(THEORA_URL)
785 libtheora: libtheora-$(THEORA_VERSION).tar.bz2
787 patch -p0 < Patches/theora.patch
788 patch -p0 < Patches/libtheora-includes.patch
791 .theora: libtheora .ogg
793 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest --disable-asm --disable-examples && make && make install)
795 ifdef NO_TEXT_RELOCATION
796 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-asm --disable-sdltest --disable-oggtest --disable-vorbistest --disable-asm --disable-examples && make && make install)
798 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest --disable-examples && make && make install)
804 CLEAN_FILE += .theora
805 CLEAN_PKG += libtheora
806 DISTCLEAN_PKG += libtheora-$(THEORA_VERSION).tar.bz2
808 # ***************************************************************************
810 # ***************************************************************************
812 libshout-$(SHOUT_VERSION).tar.gz:
815 libshout: libshout-$(SHOUT_VERSION).tar.gz
818 patch -p0 < Patches/libshout-win32.patch
819 (cd $@; autoreconf && automake)
822 .shout: libshout .theora .ogg .speex .vorbis
823 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install )
828 CLEAN_PKG += libshout
829 DISTCLEAN_PKG += libshout-$(SHOUT_VERSION).tar.gz
831 # ***************************************************************************
833 # ***************************************************************************
835 flac-$(FLAC_VERSION).tar.gz:
838 flac: flac-$(FLAC_VERSION).tar.gz
841 patch -p0 < Patches/flac-win32.patch
844 FLAC_DISABLE_FLAGS = --disable-oggtest --disable-xmms-plugin --disable-cpplibs
848 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(FLAC_DISABLE_FLAGS) && cd src&& make -C libFLAC&& make -C libFLAC install && cd .. && make -C include install)
851 ifdef HAVE_DARWIN_OS_ON_INTEL
852 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-asm-optimizations && cd src && make -C libFLAC && make -C libFLAC install && cd .. && make -C include install)
854 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(FLAC_DISABLE_FLAGS) && cd src && make -C libFLAC && make -C libFLAC install && cd .. && make -C include install)
857 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(FLAC_DISABLE_FLAGS) && cd src && make -C libFLAC && make -C libFLAC install && cd .. && make -C include install)
865 DISTCLEAN_PKG += flac-$(FLAC_VERSION).tar.gz
867 # ***************************************************************************
869 # ***************************************************************************
871 speex-$(SPEEX_VERSION).tar.gz:
874 speex: speex-$(SPEEX_VERSION).tar.gz
876 patch -p0 < Patches/speex.patch
878 patch -p0 < Patches/speex-BeOS.patch
882 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --enable-ogg=no && make && make install)
888 DISTCLEAN_PKG += speex-$(SPEEX_VERSION).tar.gz
890 # ***************************************************************************
892 # ***************************************************************************
894 faad2-$(FAAD2_VERSION).tar.gz:
897 faad2: faad2-$(FAAD2_VERSION).tar.gz
902 (cd $< && $(HOSTCC) ./configure $(HOSTCONF) --disable-shared --prefix=$(PREFIX) CFLAGS="-O3" && sed -i.orig "s/shrext_cmds/shrext/g" libtool && make -C libfaad && make -C libfaad install)
907 DISTCLEAN_PKG += faad2-$(FAAD2_VERSION).tar.gz
909 # ***************************************************************************
911 # ***************************************************************************
913 faac-$(FAAC_VERSION).tar.gz:
916 faac: faac-$(FAAC_VERSION).tar.gz
920 (cd $<; ./bootstrap && $(HOSTCC) ./configure $(HOSTCONF) --without-mp4v2 --prefix=$(PREFIX) --disable-shared && make && make install)
925 DISTCLEAN_PKG += faac-$(FAAC_VERSION).tar.gz
927 # ***************************************************************************
929 # ***************************************************************************
931 lame-$(LAME_VERSION).tar.gz:
934 lame: lame-$(LAME_VERSION).tar.gz
936 patch -p0 < Patches/libmp3lame-mingw32.patch
939 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-analyser-hooks --disable-decoder --disable-shared --disable-gtktest --disable-frontend && make && make install)
944 DISTCLEAN_PKG += lame-$(LAME_VERSION).tar.gz
946 # ***************************************************************************
948 # ***************************************************************************
950 libebml-$(LIBEBML_VERSION).tar.bz2:
951 $(WGET) $(LIBEBML_URL)
953 ## No reasons to use SVN anymore
956 # $(SVN) co http://svn.matroska.org/svn/matroska/trunk/libebml libebml
958 libebml: libebml-$(LIBEBML_VERSION).tar.bz2
963 (cd $@; patch -p0 < ../Patches/libebml-svn-win32.patch)
968 (cd $<; make -C make/mingw32 prefix=$(PREFIX) $(HOSTCC2) CFLAGS="$(CFLAGS) -DWIN32" SHARED=no && make -C make/linux install_staticlib install_headers prefix=$(PREFIX) $(HOSTCC2))
970 (cd $<; make -C make/linux prefix=$(PREFIX) $(HOSTCC2) staticlib && make -C make/linux install_staticlib install_headers prefix=$(PREFIX))
971 $(RANLIB) $(PREFIX)/lib/libebml.a
974 ## No reasons to use SVN anymore
976 #libebml-source: libebml
977 # tar cfvz libebml-$(DATE).tar.gz libebml
978 #SOURCE += libebml-source
983 DISTCLEAN_PKG += libebml-$(LIBEBML_VERSION).tar.bz2
985 # ***************************************************************************
987 # ***************************************************************************
989 libmatroska-$(LIBMATROSKA_VERSION).tar.bz2:
990 $(WGET) $(LIBMATROSKA_URL)
992 ## No reasons to use SVN anymore
995 # $(SVN) co http://svn.matroska.org/svn/matroska/trunk/libmatroska libmatroska
997 libmatroska: libmatroska-$(LIBMATROSKA_VERSION).tar.bz2
1002 (cd $@; patch -p0 < ../Patches/libmatroska-win32.patch)
1005 .matroska: libmatroska .ebml
1007 (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))
1009 (cd $<; make -C make/linux prefix=$(PREFIX) $(HOSTCC2) staticlib && make -C make/linux install_staticlib install_headers prefix=$(PREFIX))
1010 $(RANLIB) $(PREFIX)/lib/libmatroska.a
1014 ## No reasons to use SVN anymore
1016 #libmatroska-source: libmatroska
1017 # tar cfvz libmatroska-$(DATE).tar.gz libmatroska
1019 #SOURCE += libmatroska-source
1022 CLEAN_FILE += .matroska
1023 CLEAN_PKG += libmatroska
1024 DISTCLEAN_PKG += libmatroska-$(LIBMATROSKA_VERSION).tar.bz2
1026 # ***************************************************************************
1028 # ***************************************************************************
1030 amrnb-$(LIBAMR_NB_VERSION).tar.bz2:
1031 $(WGET) $(LIBAMR_NB)
1033 libamrnb: amrnb-$(LIBAMR_NB_VERSION).tar.bz2
1037 (cd $<; $(HOSTCC) ./configure --prefix=$(PREFIX) --enable-shared && make && make install)
1040 CLEAN_FILE += .libamrnb
1041 CLEAN_PKG += libamrnb
1042 DISTCLEAN_PKG += amrnb-$(LIBAMR_NB_VERSION).tar.bz2
1044 # ***************************************************************************
1046 # ***************************************************************************
1048 amrwb-$(LIBAMR_WB_VERSION).tar.bz2:
1049 $(WGET) $(LIBAMR_WB)
1051 libamrwb: amrwb-$(LIBAMR_WB_VERSION).tar.bz2
1055 (cd $<; $(HOSTCC) ./configure --prefix=$(PREFIX) --enable-shared && make && make install)
1059 CLEAN_FILE += .libamrwb
1060 CLEAN_PKG += libamrwb
1061 DISTCLEAN_PKG += amrwb-$(LIBAMR_WB_VERSION).tar.bz2
1063 # ***************************************************************************
1066 # ***************************************************************************
1070 $(SVN) co $(FFMPEG_SVN) ffmpeg -r 14080
1071 ifeq ($(HOST),i586-pc-beos)
1072 (cd $@; patch -p0 < ../Patches/ffmpeg-svn-beos.patch)
1075 patch -p1 < Patches/ffmpeg-svn-wince.patch
1078 (cd $@; patch -p0 < ../Patches/ffmpeg-alignment.patch)
1080 ifdef HAVE_DARWIN_OS_ON_INTEL
1081 (cd $@; patch -p0 < ../Patches/ffmpeg-macosx-intel-mmx.patch)
1083 ifdef HAVE_DARWIN_OS
1084 (cd $@/libswscale; patch -p0 < ../../Patches/ffmpeg-fix-noaltivec.patch)
1086 ifdef NO_TEXT_RELOCATION
1087 (cd $@; patch -p1 < ../Patches/ffmpeg-svn-mmx_removal-darwin9.patch)
1090 patch -p0 < Patches/ffmpeg-svn-uclibc.patch
1091 patch -p0 < Patches/ffmpeg-svn-internal-define.patch
1092 patch -p0 < Patches/ffmpeg-svn-libavformat.patch
1095 ffmpeg-$(FFMPEG_VERSION).tar.gz:
1096 echo "ffmpeg snapshot is too old, you MUST use subversion !"
1098 $(WGET) $(FFMPEG_URL)
1100 ffmpeg: ffmpeg-$(FFMPEG_VERSION).tar.gz
1105 .ffmpeg: ffmpeg .zlib
1110 .ffmpeg: ffmpeg .faac .lame
1114 (cd $<; $(HOSTCC) ./configure $(FFMPEGCONF) --prefix=$(PREFIX) --extra-cflags="$(CFLAGS) $(FFMPEG_CFLAGS) -DRUNTIME_CPUDETECT" --extra-ldflags="$(LDFLAGS)" --enable-gpl --enable-postproc --disable-vhook --disable-ffserver --disable-ffmpeg --disable-ffplay --disable-devices --disable-protocols --disable-shared --enable-static && make && make install-libs install-headers)
1118 ffmpeg-source: ffmpeg
1119 tar cfvz ffmpeg-$(DATE).tar.gz ffmpeg
1121 SOURCE += ffmpeg-source
1124 CLEAN_FILE += .ffmpeg
1126 DISTCLEAN_PKG += ffmpeg-$(FFMPEG_VERSION).tar.gz
1128 # ***************************************************************************
1130 # ***************************************************************************
1132 libdvdcss-$(LIBDVDCSS_VERSION).tar.gz:
1133 $(WGET) $(LIBDVDCSS_URL)
1137 $(SVN) co svn://svn.videolan.org/libdvdcss/trunk libdvdcss
1138 cd $@ && sh bootstrap
1140 libdvdcss: libdvdcss-$(LIBDVDCSS_VERSION).tar.gz
1145 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --disable-doc --prefix=$(PREFIX) && make && make install)
1150 libdvdcss-source: libdvdcss
1151 tar cfvz libdvdcss-$(DATE).tar.gz libdvdcss
1153 SOURCE += libdvdcss-source
1156 CLEAN_FILE += .dvdcss
1157 CLEAN_PKG += libdvdcss
1158 DISTCLEAN_PKG += libdvdcss-$(LIBDVDCSS_VERSION).tar.gz
1160 # ***************************************************************************
1161 # dummy dvdread to trigger the INSTALL_NAME script
1162 # ***************************************************************************
1167 # CLEAN_FILE += .dvdread
1169 # ***************************************************************************
1170 # libdvdread: We use dvdnav's dvdread
1171 # ***************************************************************************
1175 $(SVN) co $(LIBDVDREAD_SVN) libdvdread
1176 (cd $@; patch -p 0 < ../Patches/libdvdread.patch)
1178 (cd $@; patch -p 0 < ../Patches/libdvdread-win32.patch)
1180 (cd $@; sh autogen.sh noconfig)
1182 .libdvdread: libdvdread .dvdcss
1183 (cd libdvdread; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) && make && make install)
1187 CLEAN_FILE += .libdvdread
1188 CLEAN_PKG += libdvdread
1189 #DISTCLEAN_PKG += libdvdread-$(LIBDVDREAD_VERSION).tar.gz
1191 # ***************************************************************************
1193 # ***************************************************************************
1197 $(SVN) co $(LIBDVDNAV_SVN) libdvdnav
1198 patch -d libdvdnav -p0 < Patches/libdvdnav.patch
1199 (cd $@; ./autogen.sh noconfig)
1201 libdvdnav-$(LIBDVDNAV_VERSION).tar.gz:
1202 $(WGET) $(LIBDVDNAV_URL)
1204 libdvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.gz
1206 patch -p0 < Patches/libdvdnav.patch
1208 patch -p0 < Patches/libdvdnav-win32.patch
1210 (cd $@; ./autogen.sh noconfig)
1213 .dvdnav: libdvdnav .libdvdread
1215 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) && make && make install)
1217 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install)
1222 CLEAN_FILE += .dvdnav
1223 CLEAN_PKG += libdvdnav
1224 DISTCLEAN_PKG += libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2
1226 # ***************************************************************************
1228 # ***************************************************************************
1230 libdvbpsi5-$(LIBDVBPSI_VERSION).tar.gz:
1231 $(WGET) $(LIBDVBPSI_URL)
1233 libdvbpsi: libdvbpsi5-$(LIBDVBPSI_VERSION).tar.gz
1237 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd src && make && make install)
1241 CLEAN_FILE += .dvbpsi
1242 CLEAN_PKG += libdvbpsi
1243 DISTCLEAN_PKG += libdvbpsi5-$(LIBDVBPSI_VERSION).tar.gz
1245 # ***************************************************************************
1247 # ***************************************************************************
1249 live555-$(LIVEDOTCOM_VERSION).tar.gz:
1250 $(WGET) $(LIVEDOTCOM_URL)
1252 live: live555-$(LIVEDOTCOM_VERSION).tar.gz
1254 patch -p0 < Patches/live-noapps.patch
1258 (cd $<;./genMakefiles mingw && make $(HOSTCC))
1260 ifdef HAVE_DARWIN_OS
1261 (cd $<; sed -e 's%EXTRA_CFLAGS%$(EXTRA_CFLAGS)%' -e 's%EXTRA_LDFLAGS%$(EXTRA_LDFLAGS)%' -i.orig config.macosx)
1262 (cd $<; ./genMakefiles macosx && make)
1264 (cd $<; sed -e 's/=/= EXTRA_CPPFLAGS/' -e 's%EXTRA_CPPFLAGS%-I/include%' -i.orig groupsock/Makefile.head)
1266 ifdef HAVE_BIGENDIAN
1267 (cd $<; ./genMakefiles armeb-uclibc && make $(HOSTCC))
1270 (cd $<; ./genMakefiles linux && make $(HOSTCC))
1274 cp $</groupsock/libgroupsock.a $(PREFIX)/lib
1275 cp $</liveMedia/libliveMedia.a $(PREFIX)/lib
1276 cp $</UsageEnvironment/libUsageEnvironment.a $(PREFIX)/lib
1277 cp $</BasicUsageEnvironment/libBasicUsageEnvironment.a $(PREFIX)/lib
1278 cp $</groupsock/include/*.hh $</groupsock/include/*.h $(PREFIX)/include
1279 cp $</liveMedia/include/*.hh $(PREFIX)/include
1280 cp $</UsageEnvironment/include/*.hh $(PREFIX)/include
1281 cp $</BasicUsageEnvironment/include/*.hh $(PREFIX)/include
1286 DISTCLEAN_PKG += live555-$(LIVEDOTCOM_VERSION).tar.gz
1288 # ***************************************************************************
1290 # ***************************************************************************
1292 #goom-macosx-altivec-bin.tar.gz:
1293 # $(WGET) $(GOOM_URL)
1295 #goom: goom-macosx-altivec-bin.tar.gz
1302 #CLEAN_FILE += .goom
1304 #DISTCLEAN_PKG += goom-macosx-altivec-bin.tar.gz
1306 # ***************************************************************************
1308 # ***************************************************************************
1310 goom$(GOOM2k4_VERSION).tar.gz:
1311 $(WGET) $(GOOM2k4_URL)
1312 mv goom-$(GOOM2k4_VERSION)-src.tar.gz goom$(GOOM2k4_VERSION).tar.gz
1314 goom: goom$(GOOM2k4_VERSION).tar.gz
1316 ifdef HAVE_DARWIN_OS
1317 patch -p0 < Patches/goom.patch
1320 (cd $@; dos2unix configure.in)
1321 patch -p0 < Patches/goom2k4-0-win32.patch
1323 patch -p0 < Patches/goom2k4-0-mmx.patch
1327 ifdef HAVE_DARWIN_OS
1328 (cd $<; ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
1330 (cd $< && rm -f configure; aclocal -I m4/ && automake --add-missing && autoconf configure.in > configure && $(HOSTCC) sh ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static --disable-glibtest --disable-gtktest && make && make install)
1334 CLEAN_FILE += .goom2k4
1336 DISTCLEAN_PKG += goom$(GOOM2k4_VERSION).tar.gz
1338 # ***************************************************************************
1340 # ***************************************************************************
1342 libcaca-$(LIBCACA_VERSION).tar.gz:
1343 $(WGET) $(LIBCACA_URL)
1345 libcaca: libcaca-$(LIBCACA_VERSION).tar.gz
1347 ifdef HAVE_DARWIN_OS
1348 #remove me at next libcaca upgrade
1349 patch -p0 < Patches/caca_driver_cocoa.diff
1350 patch -p0 < Patches/caca_macosx.diff
1351 ifndef HAVE_DARWIN_OS_ON_INTEL
1352 patch -p0 < Patches/caca-osx-ppc.patch
1358 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --enable-win32 --disable-x11 --disable-imlib2 --disable-doc --disable-ruby --disable-csharp --disable-cxx && make && make install)
1360 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-imlib2 --disable-doc --disable-ruby --disable-csharp --disable-cxx && make && make install)
1365 CLEAN_PKG += libcaca
1366 DISTCLEAN_PKG += libcaca-$(LIBCACA_VERSION).tar.gz
1368 # ***************************************************************************
1370 # ***************************************************************************
1372 libdca-$(LIBDCA_VERSION).tar.bz2:
1373 $(WGET) $(LIBDCA_URL)
1375 libdca: libdca-$(LIBDCA_VERSION).tar.bz2
1379 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
1385 DISTCLEAN_PKG += libdca-$(LIBDCA_VERSION).tar.bz2
1387 # ***************************************************************************
1389 # ***************************************************************************
1391 x264-$(X264_VERSION).tar.gz:
1396 $(GIT) clone git://git.videolan.org/x264.git
1397 patch -p0 < Patches/x264-svn-info-threads.patch
1399 (cd x264; patch -p0 < ../Patches/x264-svn-win32.patch )
1401 ifdef HAVE_DARWIN_OS
1402 (cd $@; patch -p0 < ../Patches/x264-svn-darwin.patch )
1407 x264: x264-$(X264_VERSION).tar.gz
1411 (cd x264;patch -p0 <../Patches/x264-20050624-win32.patch)
1414 patch -p0 < Patches/x264.patch
1420 .x264: x264 .pthreads
1422 (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)
1424 (cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
1427 ifdef HAVE_DARWIN_OS_ON_INTEL
1429 (cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
1432 (cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
1439 tar cfvz x264-$(DATE).tar.gz x264
1441 SOURCE += x264-source
1446 DISTCLEAN_PKG += x264-$(X264_VERSION).tar.gz
1448 # ***************************************************************************
1450 # ***************************************************************************
1452 libmodplug-$(MODPLUG_VERSION).tar.gz:
1453 $(WGET) $(MODPLUG_URL)
1455 libmodplug: libmodplug-$(MODPLUG_VERSION).tar.gz
1458 patch -p0 < Patches/libmodplug-win32.patch
1462 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
1466 CLEAN_PKG += libmodplug
1467 DISTCLEAN_PKG += libmodplug-$(MODPLUG_VERSION).tar.gz
1469 # ***************************************************************************
1471 # ***************************************************************************
1473 libcddb-$(CDDB_VERSION).tar.bz2:
1476 libcddb: libcddb-$(CDDB_VERSION).tar.bz2
1480 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static CFLAGS="$(CFLAGS) -D_BSD_SOCKLEN_T_=int" LDFLAGS="$(LDFLAGS) -liconv" && make && make install)
1484 CLEAN_PKG += libcddb
1485 DISTCLEAN_PKG += libcddb-$(CDDB_VERSION).tar.bz2
1487 # ***************************************************************************
1489 # ***************************************************************************
1491 vcdimager-$(VCDIMAGER_VERSION).tar.gz:
1492 $(WGET) $(VCDIMAGER_URL)
1494 vcdimager: vcdimager-$(VCDIMAGER_VERSION).tar.gz
1497 ifdef HAVE_DARWIN_OS
1498 .vcdimager: vcdimager
1499 (cd $<; ./configure --prefix=$(PREFIX) --disable-shared --enable-static LDFLAGS="$(LDFLAGS) -framework CoreFoundation -framework IOKit" && make && make install)
1502 .vcdimager: vcdimager
1503 (cd $<; ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
1507 CLEAN_FILE += .vcdimager
1508 CLEAN_PKG += vcdimager
1509 DISTCLEAN_PKG += vcdimager-$(VCDIMAGER_VERSION).tar.gz
1511 # ***************************************************************************
1513 # ***************************************************************************
1515 libcdio-$(CDIO_VERSION).tar.gz:
1518 libcdio: libcdio-$(CDIO_VERSION).tar.gz
1520 patch -p0 < Patches/libcdio-install-cdparanoia-pc.patch
1523 (cd $<; sed -e 's%@ENABLE_CPP_TRUE@SUBDIRS = C++%@ENABLE_CPP_TRUE@SUBDIRS = %' -i.orig example/Makefile.in && autoreconf -fisv && ./configure --prefix=$(PREFIX) --without-vcdinfo --disable-shared && make && make install)
1527 CLEAN_PKG += libcdio
1528 DISTCLEAN_PKG += libcdio-$(CDIO_VERSION).tar.gz
1530 # ***************************************************************************
1532 # ***************************************************************************
1534 wxWidgets-$(WXWIDGETS_VERSION).tar.gz:
1535 $(WGET) $(WXWIDGETS_URL)
1537 wxwidgets: wxWidgets-$(WXWIDGETS_VERSION).tar.gz
1539 (cd wxwidgets; patch -p0 < ../Patches/wxwidgets_uri.patch)
1541 .wxwidgets: wxwidgets
1542 (cd wxwidgets; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --enable-optimise --disable-debug --enable-unicode --disable-threads --disable-gif --disable-pcx --disable-iff --disable-pnm --without-zlib --without-libpng --without-libjpeg --without-libtiff --without-regex --disable-zipstream --disable-fs_zip --enable-no_rtti --enable-no_exceptions --disable-exceptions --disable-stl --disable-html --without-expat --disable-protocols --disable-protocol --disable-xrc --disable-sound --disable-dialupman --disable-mediactrl --disable-joystick --disable-grid --disable-datepick --disable-postscript--disable-filesystem --disable-fileproto --disable-ipc --disable-sockets --disable-precomp-headers && make && make install)
1546 CLEAN_FILE += .wxwidgets
1547 CLEAN_PKG += wxwidgets
1548 DISTCLEAN_PKG += wxWidgets-$(WXWIDGETS_VERSION).tar.gz
1550 # ***************************************************************************
1551 # qt4 (win32 binary)
1552 # ***************************************************************************
1554 qt4-$(QT4_VERSION)-win32-bin.tar.bz2:
1557 qt4_win32: qt4-$(QT4_VERSION)-win32-bin.tar.bz2
1560 .qt4_win32: qt4_win32
1561 (cd qt4_win32;mkdir -p $(PREFIX)/bin; mkdir -p $(PREFIX)/include;mkdir -p $(PREFIX)/lib/pkgconfig;rm -f $(PREFIX)/lib/pkgconfig/Qt*; sed 's,@@PREFIX@@,$(PREFIX),' lib/pkgconfig/QtCore.pc.in > $(PREFIX)/lib/pkgconfig/QtCore.pc;sed 's,@@PREFIX@@,$(PREFIX),' lib/pkgconfig/QtGui.pc.in > $(PREFIX)/lib/pkgconfig/QtGui.pc;cp -r include/* $(PREFIX)/include;cp lib/*a $(PREFIX)/lib)
1562 ifeq ($(BUILD),i686-pc-cygwin)
1563 (cd qt4_win32;cp bin/*.exe $(PREFIX)/bin)
1565 (cd qt4_win32;cp bin/* $(PREFIX)/bin)
1569 CLEAN_FILE += .qt4_win32
1570 CLEAN_PKG += qt4_win32
1571 DISTCLEAN_PKG += qt4-$(QT4_VERSION)-win32-bin.tar.bz2
1573 # ***************************************************************************
1574 # qt4 (trolltech binaries)
1575 # ***************************************************************************
1577 qt-win-opensource-$(QT4T_VERSION)-mingw.exe:
1580 Qt_win32: qt-win-opensource-$(QT4T_VERSION)-mingw.exe
1582 7z -oQt x qt-win-opensource-$(QT4T_VERSION)-mingw.exe \$$OUTDIR/bin\ /bin \$$OUTDIR/bin\ /lib \$$OUTDIR/bin\ /include/QtCore \$$OUTDIR/bin\ /include/QtGui \$$OUTDIR/bin\ /src/gui \$$OUTDIR/bin\ /src/corelib \$$OUTDIR/bin\ /translations
1583 mv Qt/\$$OUTDIR/bin\ /* Qt/ && rmdir Qt/\$$OUTDIR/bin\ Qt/\$$OUTDIR
1584 find Qt -name '* ' -exec sh -c "mv \"{}\" `echo {}`" \;
1585 find Qt/src -name '*.cpp' -exec rm {} \;
1586 find Qt/translations -type f -a ! -name 'qt_*.qm' -exec rm {} \;
1587 find Qt/include -name '*.h' -exec sh -c "mv {} {}.tmp; sed 's,..\/..\/src,..\/src,' {}.tmp > {}; rm -f {}.tmp" \;
1588 mkdir Qt/lib/pkgconfig
1589 sed -e s,@@VERSION@@,$(QT4T_VERSION), -e s,@@PREFIX@@,$(PREFIX), Patches/QtCore.pc.in > Qt/lib/pkgconfig/QtCore.pc
1590 sed -e s,@@VERSION@@,$(QT4T_VERSION), -e s,@@PREFIX@@,$(PREFIX), Patches/QtGui.pc.in > Qt/lib/pkgconfig/QtGui.pc
1593 mkdir -p $(PREFIX)/bin $(PREFIX)/include/qt4/src $(PREFIX)/lib/pkgconfig $(PREFIX)/share/qt4/translations
1594 cp Qt/bin/moc.exe Qt/bin/rcc.exe Qt/bin/uic.exe $(PREFIX)/bin
1595 cp -r Qt/include/QtCore Qt/include/QtGui $(PREFIX)/include/qt4
1596 cp -r Qt/src/corelib Qt/src/gui $(PREFIX)/include/qt4/src
1597 cp Qt/lib/libQtCore4.a Qt/lib/libQtGui4.a $(PREFIX)/lib
1598 cp Qt/lib/pkgconfig/* $(PREFIX)/lib/pkgconfig
1599 cp Qt/translations/* $(PREFIX)/share/qt4/translations
1602 CLEAN_FILE += .Qt_win32
1603 CLEAN_PKG += Qt_win32
1604 DISTCLEAN_PKG += qt-win-opensource-$(QT4T_VERSION)-mingw.exe
1606 # ***************************************************************************
1607 # qt4 (source-code compilation for Mac)
1608 # ***************************************************************************
1610 qt-mac-opensource-src-$(QT4_MAC_VERSION).tar.gz:
1611 $(WGET) $(QT4_MAC_URL)
1613 qt4_mac: qt-mac-opensource-src-$(QT4_MAC_VERSION).tar.gz
1617 (cd qt4_mac; ./configure -prefix $(PREFIX) -release -fast -no-qt3support -sdk $(MACOSX_SDK) -no-framework && make && make install)
1620 CLEAN_FILE += .qt4_mac
1621 CLEAN_PKG += qt4_mac
1622 DISTCLEAN_PKG += qt-mac-opensource-src-$(QT4_MAC_VERSION).tar.gz
1624 # ***************************************************************************
1626 # ***************************************************************************
1628 zlib-$(ZLIB_VERSION).tar.gz:
1631 zlib: zlib-$(ZLIB_VERSION).tar.gz
1633 patch -p0 < Patches/zlib.patch
1636 (cd zlib; $(HOSTCC2) ./configure --prefix=$(PREFIX) && make install)
1642 DISTCLEAN_PKG += zlib-$(ZLIB_VERSION).tar.gz
1644 # ***************************************************************************
1646 # ***************************************************************************
1648 pa_snapshot_v$(PORTAUDIO_VERSION).tar.gz:
1649 $(WGET) $(PORTAUDIO_URL)
1651 portaudio: pa_snapshot_v$(PORTAUDIO_VERSION).tar.gz
1653 ifneq ($(HOST),$(BUILD))
1654 (patch -p0 < Patches/portaudio-cross.patch;cd $@; autoconf)
1657 .portaudio: portaudio
1658 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
1662 CLEAN_FILE += .portaudio
1663 CLEAN_PKG += portaudio
1664 DISTCLEAN_PKG += pa_snapshot_v$(PORTAUDIO_VERSION).tar.gz
1666 # ***************************************************************************
1668 # ***************************************************************************
1670 libxml2-$(XML_VERSION).tar.gz:
1673 xml: libxml2-$(XML_VERSION).tar.gz
1676 patch -p0 < Patches/xml2-win32.patch
1677 rm -f xml/aclocal.m4
1680 patch -p0 < Patches/xml2-uclibc.patch
1685 (cd xml; aclocal && automake && autoreconf)
1688 (cd xml; ac_cv_header_pthread_h="no" CFLAGS="-DLIBXML_STATIC" $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --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 && make && make install)
1690 (cd xml; CFLAGS="-DLIBXML_STATIC" $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --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 && make && make install)
1692 ifndef HAVE_DARWIN_OS
1699 DISTCLEAN_PKG += libxml2-$(XML_VERSION).tar.gz
1701 # ***************************************************************************
1703 # ***************************************************************************
1705 twolame-$(TWOLAME_VERSION).tar.gz:
1706 $(WGET) $(TWOLAME_URL)
1708 twolame: twolame-$(TWOLAME_VERSION).tar.gz
1711 patch -p0 < Patches/twolame-BeOS.patch
1716 (cd twolame/win32; $(WGET) "http://twolame.svn.sourceforge.net/viewvc/*checkout*/twolame/trunk/win32/winutil.h")
1718 (cd twolame; $(HOSTCC) CFLAGS="${CFLAGS} -DLIBTWOLAME_STATIC" ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd libtwolame && make && make install)
1722 CLEAN_FILE += .twolame
1723 CLEAN_PKG += twolame
1724 DISTCLEAN_PKG += twolame-$(TWOLAME_VERSION).tar.gz
1726 # ***************************************************************************
1728 # ***************************************************************************
1730 libpng-$(PNG_VERSION).tar.bz2:
1733 libpng: libpng-$(PNG_VERSION).tar.bz2
1736 (cd $@; cat ../Patches/libpng-win32.patch | sed s,??PREFIX??,$(PREFIX), | patch -p0)
1738 (cat Patches/libpng-osx.patch | sed -e 's%??PREFIX??%$(PREFIX)%' -e 's%??EXTRA_CFLAGS??%$(EXTRA_CFLAGS)%' -e 's%??EXTRA_LDFLAGS??%$(EXTRA_LDFLAGS)%' | patch -p0)
1740 (patch -p0 < Patches/libpng-makefile.patch)
1741 ifdef HAVE_DARWIN_OS_ON_INTEL
1742 (patch -p0 < Patches/libpng-darwin-mactel.patch)
1746 ifdef HAVE_DARWIN_OS
1747 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
1750 (cd $<; rm -f INSTALL; cp scripts/makefile.cygwin Makefile && make $(HOSTCC) && make install-static)
1752 ifeq ($(PNG_VERSION),1.2.8)
1753 (cd $<; PREFIX=$(PREFIX) DESTDIR=$(PREFIX) cp scripts/makefile.linux Makefile && make && make install)
1755 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
1764 DISTCLEAN_PKG += libpng-$(PNG_VERSION).tar.bz2
1766 # ***************************************************************************
1768 # ***************************************************************************
1770 zvbi-$(ZVBI_VERSION).tar.bz2:
1773 zvbi: zvbi-$(ZVBI_VERSION).tar.bz2
1777 .zvbi: zvbi .pthreads
1781 ifdef HAVE_DARWIN_OS
1782 (cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS) -fnested-functions" && make && make install)
1784 (cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && make && make install)
1791 DISTCLEAN_PKG += zvbi-$(ZVBI_VERSION).tar.bz2
1793 # ***************************************************************************
1795 # ***************************************************************************
1799 # $(SVN) co -r 325 $(LIBDC1394_SVN)/libraw1394/trunk/libraw1394 libraw1394
1800 # (cd $<; libtoolize --copy --force; \
1802 # aclocal -I extras/contrib/share/aclocal; \
1805 # automake --add-missing --copy -Wall)
1808 libraw1394-$(LIBRAW1394_VERSION).tar.gz:
1809 $(WGET) $(LIBRAW1394_URL)
1811 libraw1394: libraw1394-$(LIBRAW1394_VERSION).tar.gz
1815 .raw1394: libraw1394
1816 (cd $<; ./configure --prefix=$(PREFIX) && make && make DESTDIR=$(PRFIX) install)
1817 # sed 's/^typedef u_int8_t byte_t;/\/* typedef u_int8_t byte_t;\*\//'
1820 CLEAN_FILE += .raw1394
1821 CLEAN_PKG += libraw1394
1822 DISTCLEAN_PKG += libraw1394-$(LIBRAW1394_VERSION).tar.gz
1824 # ***************************************************************************
1826 # ***************************************************************************
1830 # $(SVN) co -r 325 $(LIBDC1394_SVN)/libdc1394/trunk/libdc1394 libdc1394
1831 # (cd $<; libtoolize --copy --force; \
1833 # aclocal -I extras/contrib/share/aclocal; \
1836 # automake --add-missing --copy -Wall)
1839 libdc1394-$(LIBDC1394_VERSION).tar.gz:
1840 $(WGET) $(LIBDC1394_URL)
1842 libdc1394: libdc1394-$(LIBDC1394_VERSION).tar.gz
1847 (cd $<; ./configure --prefix=$(PREFIX) && \
1848 patch -p1 < ../Patches/libdc1394-noexamples.patch && \
1849 make && make DESTDIR=$(PRFIX) install)
1852 CLEAN_FILE += .dc1394
1853 CLEAN_PKG += libdc1394
1854 DISTCLEAN_PKG += libdc1394-$(LIBDC1394_VERSION).tar.gz
1856 # ***************************************************************************
1858 # ***************************************************************************
1860 libgpg-error-$(GPGERROR_VERSION).tar.bz2:
1861 $(WGET) $(GPGERROR_URL)
1863 libgpg-error: libgpg-error-$(GPGERROR_VERSION).tar.bz2
1866 .gpg-error: libgpg-error
1867 ifdef HAVE_DARWIN_OS_ON_INTEL
1868 (cd $<; ./autogen.sh)
1870 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls --disable-shared --disable-languages && make && make install)
1874 CLEAN_FILE += .gpg-error
1875 CLEAN_PKG += libgpg-error
1876 DISTCLEAN_PKG += libgpg-error-$(GPGERROR_VERSION).tar.bz2
1878 # ***************************************************************************
1880 # ***************************************************************************
1882 libgcrypt-$(GCRYPT_VERSION).tar.bz2:
1883 $(WGET) $(GCRYPT_URL)
1885 libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2
1887 patch -p0 < Patches/gcrypt.patch
1889 CIPHDIG= --enable-ciphers=aes,des,rfc2268,arcfour --enable-digests=sha1,md5,rmd160 --enable-publickey-digests=dsa
1891 .gcrypt: libgcrypt .gpg-error
1893 (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)
1895 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" $(CIPHDIG) && make && make install)
1900 CLEAN_FILE += .gcrypt
1901 CLEAN_PKG += libgcrypt
1902 DISTCLEAN_PKG += libgcrypt-$(GCRYPT_VERSION).tar.bz2
1904 # ***************************************************************************
1905 # opencdk (requires by gnutls 2.x)
1906 # ***************************************************************************
1908 opencdk-$(OPENCDK_VERSION).tar.bz2:
1909 $(WGET) $(OPENCDK_URL)
1911 opencdk: opencdk-$(OPENCDK_VERSION).tar.bz2
1915 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" $(HOSTCC) && make && make install)
1918 CLEAN_FILE += .opencdk
1919 CLEAN_PKG += opencdk
1920 DISTCLEAN_PKG += opencdk-$(OPENCDK_VERSION).tar.bz2
1922 # ***************************************************************************
1924 # ***************************************************************************
1926 gnutls-$(GNUTLS_VERSION).tar.bz2:
1927 $(WGET) $(GNUTLS_URL)
1929 gnutls: gnutls-$(GNUTLS_VERSION).tar.bz2
1932 patch -p0 < Patches/gnutls-win32.patch
1933 (cd $@; cd lgl; ln -sf alloca_.h alloca.h;)
1936 .gnutls: gnutls .opencdk .gcrypt .gpg-error
1938 (cd $<; autoconf && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --target=i586-mingw32msvc --disable-cxx -disable-shared --enable-static --disable-nls && cd lgl && make && cd ../gl && make && cd ../lib &&make && make install && cd ../includes && make install)
1940 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --disable-cxx --with-libopencdk-prefix=$(PREFIX) --disable-guile && make && make install)
1945 CLEAN_FILE += .gnutls
1947 DISTCLEAN_PKG += gnutls-$(GNUTLS_VERSION).tar.bz2
1949 # ***************************************************************************
1951 # ***************************************************************************
1953 libopendaap-$(DAAP_VERSION).tar.bz2:
1956 libopendaap: libopendaap-$(DAAP_VERSION).tar.bz2
1958 patch -p0 < Patches/daap.patch
1960 .opendaap: libopendaap
1961 (cd $<; ./configure --prefix=$(PREFIX) CFLAGS="$(CFLAGS) -D_BSD_SOCKLEN_T_=int" && make install)
1965 CLEAN_FILE += .opendaap
1966 CLEAN_PKG += libopendaap
1967 DISTCLEAN_PKG += libopendaap-$(DAAP_VERSION).tar.bz2
1969 # ***************************************************************************
1971 # ***************************************************************************
1973 glib-$(GLIB_VERSION).tar.gz:
1976 glib: glib-$(GLIB_VERSION).tar.gz
1978 patch -p0 < Patches/glib.patch
1981 (cd $<; ./configure --prefix=$(PREFIX) --host=powerpc-apple-macos && make && make install)
1984 CLEAN_FILE += .glibl
1986 DISTCLEAN_PKG += glib-$(GLIB_VERSION).tar.gz
1988 # ***************************************************************************
1990 # ***************************************************************************
1992 libIDL-$(LIBIDL_VERSION).tar.gz:
1993 $(WGET) $(LIBIDL_URL)
1995 libIDL: libIDL-$(LIBIDL_VERSION).tar.gz
1999 (cd $<; ./configure --prefix=$(PREFIX) --host=powerpc-apple-macos && make && make install )
2004 DISTCLEAN_PKG += libIDL-$(LIBIDL_VERSION).tar.gz
2006 # ***************************************************************************
2008 # ***************************************************************************
2010 gecko-sdk-ppc-macosx10.2-1.7.5.tar.gz:
2011 $(WGET) $(GECKO_SDK_MAC_URL)
2013 gecko-sdk: gecko-sdk-ppc-macosx10.2-1.7.5.tar.gz
2019 mkdir gecko-sdk #creating an empty dir is faster than copying the whole dir
2023 CLEAN_FILE += .gecko
2024 CLEAN_PKG += gecko-sdk
2025 DISTCLEAN_PKG += gecko-sdk-ppc-macosx10.2-1.7.5.tar.gz
2027 # ***************************************************************************
2029 # ***************************************************************************
2031 gecko-sdk-i586-pc-msvc-1.8b1.zip:
2032 $(WGET) $(GECKO_SDK_WIN32_URL)
2034 libIDL-0.6.3-win32-bin.zip:
2035 $(WGET) $(LIBIDL_WIN32_BIN_URL)
2038 $(WGET) $(GLIB_WIN32_BIN_URL)
2040 .gecko-win32: gecko-sdk-i586-pc-msvc-1.8b1.zip libIDL-0.6.3-win32-bin.zip glib-19990228.zip
2041 unzip gecko-sdk-i586-pc-msvc-1.8b1.zip
2044 unzip -j libIDL-0.6.3-win32-bin.zip libIDL-0.6.3-win32-bin/libIDL-0.6.dll -d ../gecko-sdk/bin
2045 unzip glib-19990228.zip glib-1.2.dll -d ../gecko-sdk/bin
2046 chmod a+x ../gecko-sdk/bin/*
2049 CLEAN_FILE += .gecko-win32
2050 CLEAN_PKG += gecko-sdk-win32
2051 DISTCLEAN_PKG += gecko-sdk-i586-pc-msvc-1.8b1.zip libIDL-0.6.3-win32-bin.zip glib-19990228.zip
2053 # ***************************************************************************
2055 # ***************************************************************************
2057 mozilla-source-$(MOZILLA_VERSION).tar.bz2:
2058 $(WGET) $(MOZILLA_URL)
2060 mozilla: mozilla-source-$(MOZILLA_VERSION).tar.bz2
2063 .mozilla-macosx: mozilla
2064 (cd $<; ./configure --prefix=$(PREFIX) --enable-default-toolkit=mac --enable-standalone-modules=xpcom,plugin && make && make install)
2067 CLEAN_FILE += .mozilla-macosx
2068 CLEAN_PKG += mozilla-macosx
2069 DISTCLEAN_PKG += mozilla-source-$(MOZILLA_VERSION).tar.bz2
2071 # ***************************************************************************
2073 # ***************************************************************************
2075 jpeg-$(JPEG_VERSION).tar.gz:
2078 jpeg: jpeg-$(JPEG_VERSION).tar.gz
2082 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" $(HOSTCC) && make && make install-lib)
2083 $(RANLIB) $(PREFIX)/lib/libjpeg.a
2088 DISTCLEAN_PKG += jpeg-$(JPEG_VERSION).tar.gz
2090 # ***************************************************************************
2092 # ***************************************************************************
2094 tiff-$(TIFF_VERSION).tar.gz:
2097 tiff: tiff-$(TIFF_VERSION).tar.gz
2102 (cd $<; ./configure --target=i586-mingw32msvc --with-CFLAGS="$(CFLAGS)" --with-JPEG=no --with-ZIP=no --prefix=$(PREFIX) --host=$(HOST) &&make -C port && make -C libtiff && make -C libtiff install)
2104 (cd $<; ./configure --with-CFLAGS="$(CFLAGS)" --with-JPEG=no --with-ZIP=no --prefix=$(PREFIX) && make -C port &&make -C libtiff && make -C libtiff install)
2111 DISTCLEAN_PKG += tiff-$(TIFF_VERSION).tar.gz
2113 # ***************************************************************************
2115 # ***************************************************************************
2117 SDL-$(SDL_VERSION).tar.gz:
2120 SDL: SDL-$(SDL_VERSION).tar.gz
2124 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-audio --disable-video-x11 --disable-video-aalib --disable-video-dga --disable-video-fbcon --disable-video-directfb --disable-video-ggi --disable-video-svga --disable-directx --enable-joystick --disable-cdrom --disable-threads --disable-sdl-dlopen CFLAGS="$(CFLAGS)" && make && make install)
2130 DISTCLEAN_PKG += SDL-$(SDL_VERSION).tar.gz
2132 # ***************************************************************************
2134 # ***************************************************************************
2136 SDL_image-$(SDL_IMAGE_VERSION).tar.gz:
2137 $(WGET) $(SDL_IMAGE_URL)
2139 SDL_image: SDL_image-$(SDL_IMAGE_VERSION).tar.gz
2141 patch -p0 < Patches/SDL_image.patch
2142 patch -p0 < Patches/SDL_image-CVE-2006-4484.patch
2144 .SDL_image: SDL_image .SDL .png .jpeg .tiff
2145 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --enable-tif --disable-sdltest && make && make install)
2149 CLEAN_FILE += .SDL_image
2150 CLEAN_PKG += SDL_image
2151 DISTCLEAN_PKG += SDL_image-$(SDL_IMAGE_VERSION).tar.gz
2153 # ***************************************************************************
2154 # Musepack decoder library (libmpcdec)
2155 # ***************************************************************************
2157 libmpcdec-$(MUSE_VERSION).tar.bz2:
2160 mpcdec: libmpcdec-$(MUSE_VERSION).tar.bz2
2162 patch -p0 < Patches/mpcdec.patch
2167 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS=-D_PTRDIFF_T=mpc_int32_t && make && make install)
2169 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
2171 ifdef HAVE_DARWIN_OS
2176 CLEAN_FILE += .mpcdec
2178 DISTCLEAN_PKG += libmpcdec-$(MUSE_VERSION).tar.bz2
2180 # ***************************************************************************
2182 # ***************************************************************************
2184 dirac-$(DIRAC_VERSION).tar.gz:
2185 $(WGET) $(DIRAC_URL)
2187 dirac: dirac-$(DIRAC_VERSION).tar.gz
2189 patch -p1 -d dirac <Patches/dirac-cross.patch
2191 # incorrect compile warning with cygwin compiler 3.4.4
2192 patch -p0 <Patches/dirac-cygwin.patch
2194 (cd $@; aclocal -I m4 && autoconf && automake)
2196 DIRAC_SUBDIRS = libdirac_byteio libdirac_common libdirac_motionest libdirac_encoder libdirac_decoder
2199 DIRAC_SUBDIRS += win32
2203 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && DOC_DIR="" make $(DIRAC_SUBDIRS) && DOC_DIR="" make install)
2206 # for MacOS X, dirac is split into two libraries, which needs be installed using two targets
2207 .dirac_encoder: .dirac
2211 .dirac_decoder: .dirac
2215 CLEAN_FILE += .dirac
2217 DISTCLEAN_PKG += dirac-$(DIRAC_VERSION).tar.gz
2219 # *************************************************************************
2221 # *************************************************************************
2222 win32-dx7headers.tgz:
2223 $(WGET) $(DX_HEADERS_URL)
2224 .dx_headers: win32-dx7headers.tgz
2225 (cd ../include ; tar xzf ../src/$<)
2227 CLEAN_FILE += .dx_headers
2228 DISTCLEAN_PKG += win32-dx7headers.tgz
2230 # *************************************************************************
2231 # DirectShow headers
2232 # *************************************************************************
2234 $(WGET) $(DSHOW_HEADERS_URL)
2235 .dshow_headers: dshow-headers.tgz
2236 (cd ../include ; tar xzf ../src/$<)
2238 CLEAN_FILE += .dshow_headers
2239 DISTCLEAN_PKG += dshow-headers.tgz
2241 # ***************************************************************************
2243 # ***************************************************************************
2245 expat-$(EXPAT_VERSION).tar.gz:
2246 $(WGET) $(EXPAT_URL)
2248 expat: expat-$(EXPAT_VERSION).tar.gz
2252 ifdef HAVE_DARWIN_OS
2253 (cd $< aclocal --force && libtoolize --force && autoconf --force && autoheader --force )
2255 (cd $<; ./configure --prefix=$(PREFIX) && make && make install)
2258 CLEAN_FILE += .expat
2260 DISTCLEAN_PKG += expat-$(EXPAT_VERSION).tar.gz
2262 # ***************************************************************************
2263 # CyberLink C++ UPnP library
2264 # ***************************************************************************
2266 clinkcc$(CLINKCC_VERSION).tar.gz:
2267 $(WGET) $(CLINKCC_URL)
2269 clinkcc: clinkcc$(CLINKCC_VERSION).tar.gz
2271 mv $(patsubst %.tar.gz,Cyberlink,$(patsubst %.tgz,Cyberlink,$(notdir $<))) $@ || true
2273 patch -p0 < Patches/clinkcc.patch
2274 ifdef HAVE_DARWIN_OS
2275 patch -p0 < Patches/clinkcc_osx.patch
2279 (cd $<; ./bootstrap && ./configure --prefix=$(PREFIX) --enable-expat && make && chmod 755 config/install-sh && make install )
2282 CLEAN_FILE += .clinkcc
2283 CLEAN_PKG += clinkcc
2284 DISTCLEAN_PKG += clinkcc$(CLINKCC_VERSION).tar.gz
2286 # ***************************************************************************
2288 # ***************************************************************************
2290 yasm-$(YASM_VERSION).tar.gz:
2293 yasm: yasm-$(YASM_VERSION).tar.gz
2297 (cd $< && $(HOSTCC) ./configure --prefix=$(PREFIX) && make && make install)
2302 DISTCLEAN_PKG += yasm-$(YASM_VERSION).tar.bz2
2304 # ***************************************************************************
2305 # Copy aclocal files
2306 # This is necessary for --missing aclocal to succeed after a
2307 # configure.ac/Makefile.am change in the vlc root dir
2308 # **************************************************************************
2311 cp -R $(PREFIX)/share/aclocal/* $(PREFIX)/../../m4/
2314 CLEAN_FILE += .aclocal
2316 # ***************************************************************************
2317 # TagLib read and editing of tags of popular audio formats
2318 # ***************************************************************************
2320 taglib-$(TAGLIB_VERSION).tar.gz:
2321 $(WGET) $(TAGLIB_URL)
2323 taglib: taglib-$(TAGLIB_VERSION).tar.gz
2326 patch -p0 < Patches/taglib.patch
2329 patch -p0 < Patches/taglib-cygwin.patch
2333 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
2339 DISTCLEAN_PKG += taglib-$(TAGLIB_VERSION).tar.gz
2341 # ***************************************************************************
2342 # pthreads for win32
2343 # ***************************************************************************
2345 pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz:
2346 $(WGET) $(PTHREADS_URL)
2348 pthreads: pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz
2352 (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/)
2356 CLEAN_FILE += .pthreads
2357 CLEAN_PKG += pthreads
2358 DISTCLEAN_PKG += pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz
2360 # ***************************************************************************
2361 # ncurses library (with wide chars support)
2362 # ***************************************************************************
2364 ncurses-$(NCURSES_VERSION).tar.gz:
2365 $(WGET) $(NCURSES_URL)
2367 ncurses: ncurses-$(NCURSES_VERSION).tar.gz
2371 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --without-debug --enable-widec --without-develop --without-shared && make && make install)
2374 CLEAN_FILE += .ncurses
2375 CLEAN_PKG += ncurses
2376 DISTCLEAN_PKG += ncurses-$(NCURSES_VERSION).tar.gz
2378 # ***************************************************************************
2379 # asa library (ASS/SSA support)
2380 # ***************************************************************************
2387 patch -p0 < Patches/asa-git.diff
2389 .asa: asa .fontconfig .pcre .iconv
2390 (cd $<; ./bootstrap; $(HOSTCC) CFLAGS="$(CFLAGS) -DPCRE_STATIC" ./configure $(HOSTCONF) --prefix=$(PREFIX))
2391 (cd $</lib/import; make || (echo "Please copy a ./prepare file you built for your host into asa/lib/import"; echo "When you are finished, press enter." ; echo "If you are building natively, press enter." ; read i ; make) )
2392 (cd $<; make && make install)
2398 DISTCLEAN_PKG += asa.git.tar.gz
2400 # ***************************************************************************
2401 # FluidSynth library (Midi)
2402 # ***************************************************************************
2404 fluidsynth-$(FLUID_VERSION).tar.gz:
2405 $(WGET) $(FLUID_URL)
2407 fluidsynth: fluidsynth-$(FLUID_VERSION).tar.gz
2411 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
2414 CLEAN_FILE += .fluid
2415 CLEAN_PKG += fluidsynth
2416 DISTCLEAN_PKG += fluidsynth-$(FLUID_VERSION).tar.gz
2418 # ***************************************************************************
2420 # ***************************************************************************
2422 liboil-$(OIL_VERSION).tar.gz:
2425 liboil: liboil-$(OIL_VERSION).tar.gz
2429 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
2432 CLEAN_FILE += .liboil
2434 DISTCLEAN_PKG += liboil-$(OIL_VERSION).tar.gz
2436 # ***************************************************************************
2437 # Schroedinger library
2438 # ***************************************************************************
2440 schroedinger-$(SCHROED_VERSION).tar.gz:
2441 $(WGET) $(SCHROED_URL)
2443 schroedinger: schroedinger-$(SCHROED_VERSION).tar.gz
2446 .schroedinger: schroedinger .liboil
2447 (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
2450 CLEAN_FILE += .schroedinger
2451 CLEAN_PKG += schroedinger
2452 DISTCLEAN_PKG += schroedinger-$(SCHROED_VERSION).tar.gz
2454 # ***************************************************************************
2456 # ***************************************************************************
2465 rm -rf $(DISTCLEAN_PKG)
2468 rm -rf ffmpeg tremor x264 libdca pa_snapshot_v$(PORTAUDIO_VERSION).tar.gz portaudio live555-$(LIVEDOTCOM_VERSION).tar.gz live
2470 distclean: clean-src
2472 # ***************************************************************************
2473 # Download all the sources and package unversionned copies of subversion trees
2474 # ***************************************************************************
2476 source: $(SOURCE) $(DISTCLEAN_PKG)