Makefile 63.1 KB
Newer Older
1
#***************************************************************************
2 3
# src/Makefile : Dearchive and compile all files necessary
# ***************************************************************************
4
# Copyright (C) 2003 - 2007 the VideoLAN team
5 6 7 8
# $Id$
#
# Authors: Christophe Massiot <massiot@via.ecp.fr>
#          Derk-Jan Hartman <hartman at videolan dot org>
9
#          Eric Petit <titer@m0k.org>
10
#          Felix Kühne <fkuehne@users.sourceforge.net>
Christophe Mutricy's avatar
Christophe Mutricy committed
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>
15 16 17 18 19 20 21 22 23 24 25 26 27
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
Antoine Cellerier's avatar
Antoine Cellerier committed
28
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
29 30 31 32 33 34 35 36 37
# ***************************************************************************

include ../config.mak
include ./packages.mak

# ***************************************************************************
# Set a clean environment
# ***************************************************************************

38 39
export PATH := $(PREFIX)/bin:$(EXTRA_PATH):$(PATH)
export PKG_CONFIG_PATH
40
export PKG_CONFIG_LIBDIR = $(PREFIX)/lib/pkgconfig
41
export DYLD_LIBRARY_PATH = $(PREFIX)/lib
42 43
# following is required for configure scripts that check dyld libraries
# by building and running a test app 
44
export DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(PREFIX)/vlc-lib
45
export MACOSX_DEPLOYMENT_TARGET = $(SDK_TARGET)
46
export LIBRARY_PATH := $(PREFIX)/lib:$(LIBRARY_PATH)
47 48 49
export CFLAGS = -I$(PREFIX)/include $(EXTRA_CFLAGS) $(EXTRA_CPPFLAGS)
export CPPFLAGS = -I$(PREFIX)/include $(EXTRA_CFLAGS) $(EXTRA_CPPFLAGS)
export CXXFLAGS = -I$(PREFIX)/include $(EXTRA_CFLAGS) $(EXTRA_CPPFLAGS)
50 51 52 53 54 55 56 57 58
export LDFLAGS = -L$(PREFIX)/lib $(EXTRA_LDFLAGS)

# ***************************************************************************
# Cross compilation variables
# We'll usually use --host=<platform>, except for a few libraries which
# don't handle it (gotta set CC/CXX/etc), and obviously FFmpeg has its own
# way of doing it... ;)
# ***************************************************************************

59 60 61 62 63 64
ifneq ($(CC),)
HOSTCC+= CC="$(CC)"
endif
ifneq ($(CXX),)
HOSTCC+= CXX="$(CXX)"
endif
65 66 67
ifneq ($(LD),)
HOSTCC+= LD="$(LD)"
endif
68 69 70 71 72 73 74
ifneq ($(RANLIB),)
HOSTCC+= RANLIB="$(RANLIB)"
endif
ifneq ($(AR),)
HOSTCC+= AR="$(AR)"
endif

75 76 77 78 79
# Define ranlib on non-cross compilation setups
ifeq ($(RANLIB),)
RANLIB=ranlib
endif

80 81 82
# For libebml/libmatroska. Grrr.
ifneq ($(AR),)
HOSTCC2=$(HOSTCC) AR="$(AR) rcvu"
83 84
else
HOSTCC2=$(HOSTCC)
85 86
endif

87 88 89 90 91
# For ffmpeg if not cross compiling
ifneq ($(CC),)
  FFMPEGCONF=--cc="$(CC)"
endif

92
#
93
# cross compiling
94
#
95 96
#This should be inside the if block but some config scripts are buggy
HOSTCONF=--target=$(HOST) --host=$(HOST) --build=$(BUILD) --program-prefix=""
97 98 99 100 101
ifneq ($(BUILD),$(HOST))
    #
    # Compiling for MinGW under Cygwin could be deemed as cross compiling
    # unfortunately there isn't a complete separate GCC toolchain for MinGW under Cygwin
    #
102
    ifndef HAVE_CYGWIN
103 104 105
        # We are REALLY cross compiling
        FFMPEGCONF=--cross-prefix=$(HOST)-
        X264CONF=--crosscompile=$(HOST)
106
	    PTHREADSCONF="CROSS=$(HOST)-"
107 108
    else
        # We are compiling for MinGW on Cygwin
109
	    PTHREADSCONF=$(HOSTCC)
110
    endif
111
endif
112 113

#
114
# Special target-dependant options
115
#
116
ifdef HAVE_WIN32
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 --disable-debug
119 120 121 122
endif

ifdef HAVE_WINCE
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
124
else
125
FFMPEGCONF+= --enable-libmp3lame --enable-libfaac
126 127
endif

128
ifdef HAVE_BEOS
129
FFMPEGCONF+= --cpu=x86 --disable-debug --disable-audio-beos
130 131
endif

132
ifdef HAVE_DARWIN_OS_ON_INTEL
133
FFMPEGCONF += --enable-memalign-hack
134 135 136
endif

ifdef HAVE_DARWIN_OS
137
X264CONF += --enable-pic
138
ifdef HAVE_DARWIN_OS_ON_INTEL
139 140
FFMPEG_CFLAGS += -DHAVE_LRINTF
endif
141 142
endif

143 144
DATE=`date +%Y-%m-%d`

145 146 147
# ***************************************************************************
# Standard rules
# ***************************************************************************
148 149 150
# Generated by ./bootstrap from default configuration in src/Distributions
# 
include ../distro.mak
151 152 153 154 155 156 157 158

FORCE:

# ***************************************************************************
# Useful macros
# ***************************************************************************

define EXTRACT_GZ
159 160 161 162
	rm -rf $@ || true
	tar xzf $< --exclude='[*?:<>\|]' 
	mv $(patsubst %.tar.gz,%,$(patsubst %.tgz,%,$(notdir $<))) $@ || true
	touch $@
163 164 165
endef

define EXTRACT_BZ2
166 167 168 169
	rm -rf $@ || true
	bunzip2 -c $< | tar xf - --exclude='[*?:<>\|]' 
	mv $(patsubst %.tar.bz2,%,$(notdir $<)) $@ || true
	touch $@
170 171
endef

172
define EXTRACT_ZIP
173 174 175 176
	rm -rf $@ || true
	unzip $<
	mv $(patsubst %.zip,%,$(notdir $<)) $@ || true
	touch $@
177 178
endef

179 180 181 182 183 184
### Darwin-specific ###
# These macros prepare the dynamic libraries for inclusion in the Mac OS X
# bundle. For instance if you're building a library named libtoto.dylib,
# which depends on the contrib library libtata.dylib, you should have the
# following entry :
# .toto: toto_directory .tata
185 186 187 188 189
#	cd $< ; ./configure --prefix=$(PREFIX)
#	$(MAKE) -C $<
#	$(MAKE) -C $< install
#	$(INSTALL_NAME)
#	touch $@
190 191

ifdef HAVE_DARWIN_OS
192 193 194 195 196 197
# the original libtoto.dylib is copied from contrib/lib to vlc-lib as
# vlc_libtoto.dylib. a soft link to this library is created in contrib/lib
# using the orginal dylib name. if libtoto.la also exists, the library named
# in dlname is also changed to a soft-link to vlc-lib in order to support
# libtool. to satisfy VLC.app dyld search, vlc_libtoto.dylib dyld id is changed
# to @executable_path/lib/vlc_libtoto.dylib 
198 199

define INSTALL_NAME
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
	if which install_name_tool >/dev/null; then \
		mkdir -p $(PREFIX)/vlc-lib ; \
		libname='lib$(patsubst .%,%,$@)' ; \
		dlname="$$libname.dylib" ; \
		cp $(PREFIX)/lib/$$dlname \
			$(PREFIX)/vlc-lib/vlc_$$dlname ; \
		rm $(PREFIX)/lib/$$dlname ; \
		ln -s $(PREFIX)/vlc-lib/vlc_$$dlname \
			$(PREFIX)/lib/$$dlname ; \
		if [ -f $(PREFIX)/lib/$$libname.la ]; then \
			eval ltname=`sed -n 's/dlname=//p' $(PREFIX)/lib/$$libname.la`; \
			rm $(PREFIX)/lib/$$ltname ; \
			ln -s $(PREFIX)/vlc-lib/vlc_$$dlname \
				$(PREFIX)/lib/$$ltname ; \
		fi ; \
		install_name_tool \
			-id @executable_path/lib/vlc_$$dlname \
			$(PREFIX)/vlc-lib/vlc_$$dlname ; \
	fi
219
endef
220

221 222 223 224 225 226
endif

ifeq ($(HOST),i586-pc-beos)
# We test if the file actually exists, as sometimes (but not always)
# libtool won't accept to build the shared library
define INSTALL_NAME
227 228 229 230 231
	if test -f $(PREFIX)/lib/lib$(patsubst .%,%,$@).so ; then \
		mkdir -p $(PREFIX)/vlc-lib ; \
		cp $(PREFIX)/lib/lib$(patsubst .%,%,$@).so \
		  $(PREFIX)/vlc-lib/ ; \
	fi
232 233 234 235 236 237 238 239 240
endef
endif

# ***************************************************************************
# perl
# ***************************************************************************

ifeq ($(BUILD),i586-pc-beos)
perl-$(PERL_VERSION).tar.gz:
241
	$(WGET) $(PERL_URL)
242 243

perl: perl-$(PERL_VERSION).tar.gz
244 245
	$(EXTRACT_GZ)
	sed -i.orig 's%prefix="/boot/home/config"%prefix="$(PREFIX)"%'  perl/hints/beos.sh
246 247

.perl: perl
248 249
	(cd $<; ./Configure -d -e && make && make install && ln -sf perl5/$(PERL_VERSION)/BePC-beos/CORE/libperl.so $(PREFIX)/lib/libperl.so)
	touch $@
250 251 252 253 254 255 256 257 258 259

CLEAN_FILE += .perl
CLEAN_PKG += perl
DISTCLEAN_PKG += perl-$(PERL_VERSION).tar.gz
endif

# ***************************************************************************
# autoconf
# ***************************************************************************

260
autoconf-$(AUTOCONF_VERSION).tar.bz2:
261
	$(WGET) $(AUTOCONF_URL)
262

263
autoconf: autoconf-$(AUTOCONF_VERSION).tar.bz2
264
	$(EXTRACT_BZ2)
265 266

.autoconf: autoconf
267 268
	(cd $<; ./configure --prefix=$(PREFIX) && make && make install)
	touch $@
269 270 271

CLEAN_FILE += .autoconf
CLEAN_PKG += autoconf
272
DISTCLEAN_PKG += autoconf-$(AUTOCONF_VERSION).tar.bz2
273 274 275 276 277 278 279

# ***************************************************************************
# libtool
# ***************************************************************************

ifdef HAVE_DARWIN_OS
.libtool:
280 281 282 283 284 285 286 287 288
	if test -x /usr/bin/glibtoolize; then \
		mkdir -p $(PREFIX)/bin ; \
		ln -sf /usr/bin/glibtoolize $(PREFIX)/bin/libtoolize ; \
	fi
	if test -f /usr/share/aclocal/libtool.m4; then \
		mkdir -p $(PREFIX)/share/aclocal ; \
		ln -sf /usr/share/aclocal/libtool.m4 $(PREFIX)/share/aclocal ; \
	fi
	touch $@
289 290 291 292
endif

ifeq ($(BUILD),i586-pc-beos)
libtool-$(LIBTOOL_VERSION).tar.gz:
293
	$(WGET) $(LIBTOOL_URL)
294 295

libtool: libtool-$(LIBTOOL_VERSION).tar.gz
296
	$(EXTRACT_GZ)
297 298

.libtool: libtool
299 300
	(cd $<; ./configure --prefix=$(PREFIX) && make && make install)
	touch $@
301 302 303 304 305 306 307 308 309 310 311 312

CLEAN_PKG += libtool
DISTCLEAN_PKG += libtool-$(LIBTOOL_VERSION).tar.gz
endif

CLEAN_FILE += .libtool

# ***************************************************************************
# automake
# ***************************************************************************

automake-$(AUTOMAKE_VERSION).tar.gz:
313
	$(WGET) $(AUTOMAKE_URL)
314 315

automake: automake-$(AUTOMAKE_VERSION).tar.gz
316
	$(EXTRACT_GZ)
317 318

.automake: automake
319 320
	(cd $<; ./configure --prefix=$(PREFIX) && make && make install)
	touch $@
321 322 323 324 325 326 327 328 329

CLEAN_FILE += .automake
CLEAN_PKG += automake
DISTCLEAN_PKG += automake-$(AUTOMAKE_VERSION).tar.gz

# ***************************************************************************
# pkgconfig
# ***************************************************************************

330
pkg-config-$(PKGCFG_VERSION).tar.gz:
331
	$(WGET) $(PKGCFG_URL)
332

333
pkgconfig: pkg-config-$(PKGCFG_VERSION).tar.gz
334 335 336
	$(EXTRACT_GZ)
	patch -d pkgconfig/glib-1.2.8 -p 1 < Patches/glib.patch
	patch -d pkgconfig -p0 < Patches/pkgcfg.patch
337 338

.pkgcfg: pkgconfig
339 340
	(cd pkgconfig; autoconf && ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
	touch $@
341 342 343

CLEAN_FILE += .pkgcfg
CLEAN_PKG += pkgconfig
344
DISTCLEAN_PKG += pkg-config-$(PKGCFG_VERSION).tar.gz
345 346 347 348 349 350

# ***************************************************************************
# gettext
# ***************************************************************************

gettext-$(GETTEXT_VERSION).tar.gz:
351
	$(WGET) $(GETTEXT_URL)
352 353

gettext: gettext-$(GETTEXT_VERSION).tar.gz
354
	$(EXTRACT_GZ)
355
ifdef HAVE_DARWIN_OS
Rafaël Carré's avatar
Rafaël Carré committed
356
	patch -p0 < Patches/gettext-macosx.patch 
357
endif
358
ifdef HAVE_WIN32
Rafaël Carré's avatar
Rafaël Carré committed
359
	patch -p0 < Patches/gettext-win32.patch
360
endif
361

362
.intl: gettext .iconv
363
ifdef HAVE_WIN32
364
	( cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-relocatable --with-iconv-prefix=$(PREFIX) --disable-java --disable-native-java)
365
else
366
	( cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-java --disable-native-java)
367
endif
368 369 370
ifeq ($(BUILD),i586-pc-beos)
# The ugliest kludge ever - so libtool correctly links shared libraries
# on BeOS. Sorry, I just can't figure out how libtool works
371
	( 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 )
372 373
endif
ifneq ($(HOST),$(BUILD))
374
# We'll use the installed gettext and only need to cross-compile libintl, also build autopoint and gettextsize tools need for VLC bootstrap
375
	( cd $< && make -C gettext-runtime/intl && patch -p1 < ../Patches/libintl.patch && make -C gettext-runtime/intl install && make -C gettext-tools/misc install )
376 377
else
# Build and install the whole gettext
378
	( cd $< && make && patch -p1 < ../Patches/libintl.patch && make install )
379 380 381
endif
# Work around another non-sense of autoconf.
ifdef HAVE_WIN32
382
	(cd ../include; sed -i.orig '311 c #if 0' libintl.h)
383
endif
384 385
	$(INSTALL_NAME)
	touch $@
386 387 388 389 390 391 392 393 394 395

CLEAN_FILE += .intl
CLEAN_PKG += gettext
DISTCLEAN_PKG += gettext-$(GETTEXT_VERSION).tar.gz

# ***************************************************************************
# libiconv
# ***************************************************************************

libiconv-$(LIBICONV_VERSION).tar.gz:
396
	$(WGET) $(LIBICONV_URL)
397 398

libiconv: libiconv-$(LIBICONV_VERSION).tar.gz
399
	$(EXTRACT_GZ)
400
ifdef HAVE_DARWIN_OS
Rafaël Carré's avatar
Rafaël Carré committed
401
	patch -p0 < Patches/libiconv.patch
402
endif
403

404
ifdef HAVE_DARWIN_OS
405
.iconv:
406
	touch $@
407
else
408
.iconv: libiconv
409 410 411
	(cd libiconv; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls && make && make install)
	$(INSTALL_NAME)
	touch $@
412
endif
413 414 415 416 417 418 419 420 421 422

CLEAN_FILE += .iconv
CLEAN_PKG += libiconv
DISTCLEAN_PKG += libiconv-$(LIBICONV_VERSION).tar.gz

# ***************************************************************************
# freetype2
# ***************************************************************************

freetype-$(FREETYPE2_VERSION).tar.gz:
423
	$(WGET) $(FREETYPE2_URL)
424 425

freetype2: freetype-$(FREETYPE2_VERSION).tar.gz
426
	$(EXTRACT_GZ)
427 428

.freetype: freetype2
429
ifdef HAVE_CYGWIN
430
	(cd $<; ./configure --target=$(HOST) --disable-pic --disable-shared --prefix=$(PREFIX) && make && make install)
431
else
432
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
433
endif
434 435
	$(INSTALL_NAME)
	touch $@
436 437 438 439 440 441 442 443 444 445

CLEAN_FILE += .freetype
CLEAN_PKG += freetype2
DISTCLEAN_PKG += freetype-$(FREETYPE2_VERSION).tar.gz

# ***************************************************************************
# fribidi
# ***************************************************************************

fribidi-$(FRIBIDI_VERSION).tar.gz:
446
	$(WGET) $(FRIBIDI_URL)
447 448

fribidi: fribidi-$(FRIBIDI_VERSION).tar.gz
449
	$(EXTRACT_GZ)
Rafaël Carré's avatar
Rafaël Carré committed
450
	patch -p0 < Patches/fribidi.patch.real
451
ifdef HAVE_WIN32
Rafaël Carré's avatar
Rafaël Carré committed
452
	patch -p0 <Patches/fribidi-win32.patch
453 454
endif
.fribidi: fribidi .iconv
455 456 457
	(cd $<; rm -f configure; ./bootstrap && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX)  && make && make install)
	$(INSTALL_NAME)
	touch $@
458 459 460 461 462 463 464 465 466 467

CLEAN_FILE += .fribidi
CLEAN_PKG += fribidi
DISTCLEAN_PKG += fribidi-$(FRIBIDI_VERSION).tar.gz

# ***************************************************************************
# liba52
# ***************************************************************************

a52dec-$(A52DEC_VERSION).tar.gz:
468
	$(WGET) $(A52DEC_URL)
469 470

a52dec: a52dec-$(A52DEC_VERSION).tar.gz
471
	$(EXTRACT_GZ)
472 473

.a52: a52dec
474 475
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd liba52 && make && make install && cd ../include && make && make install)
	touch $@
476 477 478 479 480 481 482 483 484 485

CLEAN_FILE += .a52
CLEAN_PKG += a52dec
DISTCLEAN_PKG += a52dec-$(A52DEC_VERSION).tar.gz

# ***************************************************************************
# mpeg2dec
# ***************************************************************************

#mpeg2dec:
486 487 488 489
#	@echo "*** Please press return here : ***"
#	cvs -d $(MPEG2DEC_CVSROOT) login
#	cvs -d $(MPEG2DEC_CVSROOT) co mpeg2dec
#	(cd $@; ./bootstrap)
490

Derk-Jan Hartman's avatar
Derk-Jan Hartman committed
491
mpeg2dec-$(MPEG2DEC_VERSION).tar.gz:
492
	$(WGET) $(MPEG2DEC_URL)
493 494

# It is easier to use bootstrapped versions...
Derk-Jan Hartman's avatar
Derk-Jan Hartman committed
495
#mpeg2dec-$(MPEG2DEC_VERSION).tar.gz:
496 497
#	$(WGET) $(MPEG2DEC_SNAPSHOT)
#	mv mpeg2dec-$(MPEG2DEC_DATE).tar.gz $@
498 499

mpeg2dec: mpeg2dec-$(MPEG2DEC_VERSION).tar.gz
500
	$(EXTRACT_GZ)
501 502

.mpeg2: mpeg2dec
503 504
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --without-x --disable-sdl && cd libmpeg2 && make && make install && cd ../include && make && make install)
	touch $@
505 506 507 508 509 510 511 512 513 514 515

CLEAN_FILE += .mpeg2
CLEAN_PKG += mpeg2dec
#DISTCLEAN_PKG += mpeg2dec-$(MPEG2DEC_VERSION)-cvs.tar.gz
DISTCLEAN_PKG += mpeg2dec-$(MPEG2DEC_VERSION).tar.gz

# ***************************************************************************
# libid3tag
# ***************************************************************************

libid3tag-$(LIBID3TAG_VERSION).tar.gz:
516
	$(WGET) $(LIBID3TAG_URL)
517 518

libid3tag: libid3tag-$(LIBID3TAG_VERSION).tar.gz
519
	$(EXTRACT_GZ)
520 521

.id3tag: libid3tag
522 523 524
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
	$(INSTALL_NAME)
	touch $@
525 526 527 528 529 530 531 532 533 534

CLEAN_FILE += .id3tag
CLEAN_PKG += libid3tag
DISTCLEAN_PKG += libid3tag-$(LIBID3TAG_VERSION).tar.gz

# ***************************************************************************
# libmad
# ***************************************************************************

libmad-$(LIBMAD_VERSION).tar.gz:
535
	$(WGET) $(LIBMAD_URL)
536 537

libmad: libmad-$(LIBMAD_VERSION).tar.gz
538
	$(EXTRACT_GZ)
539 540

.mad: libmad
541 542 543
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="-O3" && make && make install)
	$(INSTALL_NAME)
	touch $@
544 545 546 547 548 549 550 551 552 553

CLEAN_FILE += .mad
CLEAN_PKG += libmad
DISTCLEAN_PKG += libmad-$(LIBMAD_VERSION).tar.gz

# ***************************************************************************
# ogg
# ***************************************************************************

#ogg:
554 555 556 557
#	@echo "*** Please type \"anoncvs\" here : ***"
#	cvs -d $(OGG_CVSROOT) login
#	cvs -d $(OGG_CVSROOT) co ogg
#	(cd $@; ./autogen.sh)
558 559

libogg-$(OGG_VERSION).tar.gz:
560
	$(WGET) $(OGG_URL)
561 562

libogg: libogg-$(OGG_VERSION).tar.gz
563
	$(EXTRACT_GZ)
Rafaël Carré's avatar
Rafaël Carré committed
564 565
	patch -p0 < Patches/ogg.patch
	patch -p0 < Patches/libogg-1.1.patch
566
ifdef HAVE_WINCE
Rafaël Carré's avatar
Rafaël Carré committed
567
	patch -p0 < Patches/libogg-wince.patch
568
endif
569
	(cd $@; autoconf)
570 571

.ogg: libogg
572 573 574
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make install)
	$(INSTALL_NAME)
	touch $@
575 576 577 578 579 580 581 582 583 584

CLEAN_FILE += .ogg
CLEAN_PKG += libogg
DISTCLEAN_PKG += libogg-$(OGG_VERSION).tar.gz

# ***************************************************************************
# vorbis
# ***************************************************************************

#vorbis:
585 586 587 588
#	@echo "*** Please type \"anoncvs\" here : ***"
#	cvs -d $(OGG_CVSROOT) login
#	cvs -d $(OGG_CVSROOT) co vorbis
#	(cd $@; ./autogen.sh)
Rafaël Carré's avatar
Rafaël Carré committed
589
#	patch -p0 < Patches/vorbis.patch
590 591

libvorbis-$(VORBIS_VERSION).tar.gz:
592
	$(WGET) $(VORBIS_URL)
593 594

libvorbis: libvorbis-$(VORBIS_VERSION).tar.gz
595
	$(EXTRACT_GZ)
Rafaël Carré's avatar
Rafaël Carré committed
596
	patch -p0 < Patches/libvorbis-1.1.patch
597
	(cd $@; autoconf)
598 599

.vorbis: libvorbis .ogg
600 601
# FIXME: shared libs disabled for now because of linking errors
#   -- titer 2005/09/16
602 603 604
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared && make && make install)
#	$(INSTALL_NAME)
	touch $@
605 606

.vorbisenc: .vorbis .ogg
607 608
#	$(INSTALL_NAME)
	touch $@
609 610 611 612 613

CLEAN_FILE += .vorbis .vorbisenc
CLEAN_PKG += libvorbis
DISTCLEAN_PKG += libvorbis-$(VORBIS_VERSION).tar.gz

614 615 616 617 618 619
# ***************************************************************************
# tremor
# ***************************************************************************

ifdef SVN
tremor: 
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
620
	$(SVN) export http://svn.xiph.org/trunk/Tremor tremor
621 622
	(cd $@ && patch -p0 < ../Patches/tremor.patch)
	(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)
623 624
else
tremor-$(TREMOR_VERSION).tar.bz2:
625
	$(WGET) $(TREMOR_URL)
626 627

tremor: tremor-$(TREMOR_VERSION).tar.bz2
628
	$(EXTRACT_BZ2)
629 630 631
endif

.tremor: tremor .ogg
632 633 634
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared && make && make install)
	$(INSTALL_NAME)
	touch $@
635

636 637
ifdef SVN
tremor-source: tremor
638 639
	cd tremor;   find . -depth -iname ".svn" -exec rm -rf {} \;
	cd ..;
640
	tar cfvz tremor-$(DATE).tar.gz tremor
641 642 643 644

SOURCE += tremor-source
endif

645 646
CLEAN_FILE += .tremor
CLEAN_PKG += tremor
647
#DISTCLEAN_PKG += tremor-$(TREMOR_VERSION).tar.gz
648

649 650 651 652 653
# ***************************************************************************
# theora
# ***************************************************************************

libtheora-$(THEORA_VERSION).tar.bz2:
654
	$(WGET) $(THEORA_URL)
655 656

libtheora: libtheora-$(THEORA_VERSION).tar.bz2
657 658 659 660
	$(EXTRACT_BZ2)
	patch -p0 < Patches/theora.patch
	patch -p0 < Patches/theora-1.0a7.patch
	(cd $@; autoconf)
661

662
.theora: libtheora .ogg
663
ifdef HAVE_BEOS
664
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest --disable-asm && make && make install)
665
else
666
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest && make && make install)
667 668

endif
669 670
	$(INSTALL_NAME)
	touch $@
671 672 673 674 675

CLEAN_FILE += .theora
CLEAN_PKG += libtheora
DISTCLEAN_PKG += libtheora-$(THEORA_VERSION).tar.bz2

Derk-Jan Hartman's avatar
Derk-Jan Hartman committed
676 677 678 679 680
# ***************************************************************************
# shout
# ***************************************************************************

libshout-$(SHOUT_VERSION).tar.gz:
681
	$(WGET) $(SHOUT_URL)
Derk-Jan Hartman's avatar
Derk-Jan Hartman committed
682 683

libshout: libshout-$(SHOUT_VERSION).tar.gz
684
	$(EXTRACT_GZ)
Christophe Mutricy's avatar
Christophe Mutricy committed
685
ifdef HAVE_WIN32
686 687
	patch -p0 < Patches/libshout-win32.patch
	(cd $@; aclocal && automake)
Christophe Mutricy's avatar
Christophe Mutricy committed
688 689
endif
  
690
.shout: libshout .theora .ogg .speex
691 692 693
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) &&  make && make install )
	$(INSTALL_NAME)
	touch $@
Derk-Jan Hartman's avatar
Derk-Jan Hartman committed
694 695 696 697 698

CLEAN_FILE += .shout
CLEAN_PKG += libshout
DISTCLEAN_PKG += libshout-$(SHOUT_VERSION).tar.gz

699 700 701 702 703
# ***************************************************************************
# flac
# ***************************************************************************

flac-$(FLAC_VERSION).tar.gz:
704
	$(WGET) $(FLAC_URL)
705 706

flac: flac-$(FLAC_VERSION).tar.gz
707
	$(EXTRACT_GZ)
708 709 710
ifdef HAVE_WIN32
	patch -p0 < Patches/flac-mingw32.patch
endif
711
ifneq ($(HOST),$(BUILD))
Rafaël Carré's avatar
Rafaël Carré committed
712
	(patch -p0 < Patches/flac-cross.patch && cd $@ && autoconf)
713
endif
714

Damien Fouilleul's avatar
Damien Fouilleul committed
715
.flac: flac .ogg 
716
ifdef HAVE_WIN32
Christophe Mutricy's avatar
Christophe Mutricy committed
717
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-oggtest && cd src&& make -C libFLAC&& make -C libFLAC install  && cd .. && make -C include install)
718
else
719
ifdef HAVE_DARWIN_OS
720
ifdef HAVE_DARWIN_OS_ON_INTEL
721 722
	(cd $<; autoconf && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-asm-optimizations&& cd src && make -C libFLAC && make -C libFLAC install  && cd .. && make -C include install)
else
723
	(cd $<; autoconf && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd src && make -C libFLAC && make -C libFLAC install  && cd .. && make -C include install)
724
endif
725
else
726
	(cd $<; autoconf && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-oggtest && cd src && make -C libFLAC && make -C libFLAC install  && cd .. && make -C include install)
727
endif
728
endif
729 730
	$(INSTALL_NAME)
	touch $@
731

Damien Fouilleul's avatar
Damien Fouilleul committed
732
CLEAN_FILE += .flac
733 734 735 736 737 738 739 740
CLEAN_PKG += flac
DISTCLEAN_PKG += flac-$(FLAC_VERSION).tar.gz

# ***************************************************************************
# speex
# ***************************************************************************

speex-$(SPEEX_VERSION).tar.gz:
741
	$(WGET) $(SPEEX_URL)
742 743

speex: speex-$(SPEEX_VERSION).tar.gz
744 745
	$(EXTRACT_GZ)
	patch -p0 < Patches/speex.patch
746
ifdef HAVE_BEOS
747
	patch -p0 < Patches/speex-BeOS.patch
748
endif
749 750

.speex: speex
751 752 753
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --enable-ogg=no && make && make install)
	$(INSTALL_NAME)
	touch $@
754 755 756 757 758 759 760 761 762 763

CLEAN_FILE += .speex
CLEAN_PKG += speex
DISTCLEAN_PKG += speex-$(SPEEX_VERSION).tar.gz

# ***************************************************************************
# faad2
# ***************************************************************************

#faad2:
764 765 766
#	@echo "*** Please type return here : ***"
#	cvs -d $(FAAD2_CVSROOT) login
#	cvs -d $(FAAD2_CVSROOT) co faad2
767
#	(cd $@; patch -p1 < ../Patches/faad2.patch)
768
#	(cd $@; sh ./bootstrap)
769 770

faad2-$(FAAD2_VERSION).tar.bz2:
771
	$(WGET) $(FAAD2_URL)
772

773
faad: faad2-$(FAAD2_VERSION).tar.bz2
774
	$(EXTRACT_BZ2)
775
	(cd $@; patch -p1 < ../Patches/faad2.patch && ./bootstrap)
776

777
.faad: faad
778 779 780
	(cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="-O3" && sed -i.orig "s/shrext_cmds/shrext/g" libtool && make -C libfaad && make -C libfaad install)
	$(INSTALL_NAME)
	touch $@
781 782

CLEAN_FILE += .faad
783
CLEAN_PKG += faad
784 785 786 787 788 789 790
DISTCLEAN_PKG += faad2-$(FAAD2_VERSION).tar.bz2

# ***************************************************************************
# faac
# ***************************************************************************

faac-$(FAAC_VERSION).tar.bz2:
791
	$(WGET) $(FAAC_URL)
792 793

faac: faac-$(FAAC_VERSION).tar.bz2
794
	$(EXTRACT_BZ2)
Rafaël Carré's avatar
Rafaël Carré committed
795
	patch -p0 < Patches/faac.patch
796 797

.faac: faac
798 799
	(cd $<; rm -f install-sh mkinstalldirs missing && ./bootstrap && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared && make && make install)
	touch $@
800 801 802 803 804 805 806 807 808 809

CLEAN_FILE += .faac
CLEAN_PKG += faac
DISTCLEAN_PKG += faac-$(FAAC_VERSION).tar.bz2

# ***************************************************************************
# lame
# ***************************************************************************

lame-$(LAME_VERSION).tar.gz:
810
	$(WGET) $(LAME_URL)
811 812

lame: lame-$(LAME_VERSION).tar.gz
813 814
	$(EXTRACT_GZ)
	rm -rf lame;  mv lame-3.97 lame; touch lame
815 816

.lame: lame
817 818
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-analyser-hooks --disable-decoder --disable-shared --disable-gtktest --disable-frontend && make && make install)
	touch $@
819 820 821 822 823 824 825 826 827 828

CLEAN_FILE += .lame
CLEAN_PKG += lame
DISTCLEAN_PKG += lame-$(LAME_VERSION).tar.gz

# ***************************************************************************
# libebml
# ***************************************************************************

libebml-$(LIBEBML_VERSION).tar.bz2:
829
	$(WGET) $(LIBEBML_URL)
830

831 832
ifdef SVN
libebml:
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
833
	$(SVN) export http://svn.matroska.org/svn/matroska/trunk/libebml libebml
834
else
835
libebml: libebml-$(LIBEBML_VERSION).tar.bz2
836
	$(EXTRACT_BZ2)
837
endif
838
ifdef HAVE_WIN32
Rafaël Carré's avatar
Rafaël Carré committed
839
	(cd $@; patch -p0 < ../Patches/libebml-svn-win32.patch)
840
endif
841 842

.ebml: libebml
843
ifdef HAVE_WIN32
844
	(cd $<; make -C make/mingw32 prefix=$(PREFIX) $(HOSTCC2) CFLAGS="$(CFLAGS) -DWIN32" SHARED=no && make -C make/linux install_staticlib install_headers prefix=$(PREFIX) $(HOSTCC2))
845
else
846 847 848 849
	(cd $<; make -C make/linux prefix=$(PREFIX) $(HOSTCC2) staticlib && make -C make/linux install_staticlib install_headers prefix=$(PREFIX))
	$(RANLIB) $(PREFIX)/lib/libebml.a
endif	
	touch $@
850

851 852
ifdef SVN
libebml-source: libebml
853 854
	cd libebml;   find . -depth -iname ".svn" -exec rm -rf {} \;
	cd ..;
855 856 857 858
	tar cfvz  libebml-$(DATE).tar.gz libebml
SOURCE += libebml-source	
endif

859 860 861 862 863 864 865 866
CLEAN_FILE += .ebml
CLEAN_PKG += libebml
DISTCLEAN_PKG += libebml-$(LIBEBML_VERSION).tar.bz2

# ***************************************************************************
# libmatroska
# ***************************************************************************

867 868 869
libmatroska-$(LIBMATROSKA_VERSION).tar.bz2:
	$(WGET) $(LIBMATROSKA_URL)

870 871
ifdef SVN
libmatroska:
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
872
	$(SVN) export http://svn.matroska.org/svn/matroska/trunk/libmatroska libmatroska
873
else
874
libmatroska: libmatroska-$(LIBMATROSKA_VERSION).tar.bz2
875
	$(EXTRACT_BZ2)
876
endif
877
ifdef HAVE_WIN32
Rafaël Carré's avatar
Rafaël Carré committed
878
	(cd $@; patch -p0 < ../Patches/libmatroska-win32.patch)
879
endif
880

881 882
.matroska: libmatroska .ebml
ifdef HAVE_WIN32
883
	(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))
884
else
885 886
	(cd $<; make -C make/linux prefix=$(PREFIX) $(HOSTCC2) staticlib && make -C make/linux install_staticlib install_headers prefix=$(PREFIX))
	$(RANLIB) $(PREFIX)/lib/libmatroska.a
887
endif
888
	touch $@
889

890 891
ifdef SVN
libmatroska-source: libmatroska
892 893
	cd libmatroska;    find . -depth -iname ".svn" -exec rm -rf {} \;
	cd ..;
894 895 896 897 898 899
	tar cfvz libmatroska-$(DATE).tar.gz libmatroska

SOURCE += libmatroska-source
endif


900 901 902 903 904 905 906 907 908
CLEAN_FILE += .matroska
CLEAN_PKG += libmatroska
DISTCLEAN_PKG += libmatroska-$(LIBMATROSKA_VERSION).tar.bz2

# ***************************************************************************
# ffmpeg
# ***************************************************************************

ffmpeg:
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
909
	$(SVN) export $(FFMPEG_SVN)  ffmpeg
910
	(cd "$@" && patch -p1 < ../Patches/ffmpeg-svn-nofile.patch)
911
	(cd "$@" && patch -p0 < ../Patches/ffmpeg-svn-swscale-pc.patch)
912
ifeq ($(HOST),i586-pc-beos)
Rafaël Carré's avatar
Rafaël Carré committed
913
	(cd $@; patch -p0 < ../Patches/ffmpeg-svn-beos.patch)
914
endif
915
ifdef HAVE_WINCE
Rafaël Carré's avatar
Rafaël Carré committed
916
	patch -p1 < Patches/ffmpeg-svn-wince.patch
917
endif
918 919 920
ifdef HAVE_BEOS
	(cd $@; patch -p0 < ../Patches/ffmpeg-alignment.patch)
endif
921 922

ffmpeg-$(FFMPEG_VERSION).tar.gz:
923
	$(WGET) $(FFMPEG_URL)
924 925

#ffmpeg: ffmpeg-$(FFMPEG_VERSION).tar.gz
926
#	$(EXTRACT_GZ)
Rafaël Carré's avatar
Rafaël Carré committed
927
#	patch -p0 < Patches/ffmpeg.patch
928

929
ifdef HAVE_WINCE
930
.ffmpeg: ffmpeg .zlib
931 932 933
else
.ffmpeg: ffmpeg .faac .lame
endif
934
	(cd $<; $(HOSTCC) ./configure $(FFMPEGCONF) --prefix=$(PREFIX) --extra-cflags="$(CFLAGS) $(FFMPEG_CFLAGS) -DRUNTIME_CPUDETECT" --extra-ldflags="$(LDFLAGS)" --enable-gpl --enable-pp --disable-vhook --disable-ffserver --disable-network --enable-liba52 --disable-ffplay && make && make install-libs install-headers)
935
	touch $@
936

937 938
ifdef SVN
ffmpeg-source: ffmpeg
939 940
	cd ffmpeg;   find . -depth -iname ".svn" -exec rm -rf {} \;
	cd ..;
941
	tar cfvz ffmpeg-$(DATE).tar.gz ffmpeg
942 943 944 945

SOURCE += ffmpeg-source
endif

946
CLEAN_FILE += .ffmpeg
947
CLEAN_PKG += ffmpeg ffmpeg.cvs
948 949 950 951 952 953
DISTCLEAN_PKG += ffmpeg-$(FFMPEG_VERSION).tar.gz

# ***************************************************************************
# libdvdcss
# ***************************************************************************

954 955 956
libdvdcss-$(LIBDVDCSS_VERSION).tar.gz:
	$(WGET) $(LIBDVDCSS_URL)

957 958
ifdef SVN
libdvdcss: 
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
959
	$(SVN) export svn://svn.videolan.org/libdvdcss/trunk libdvdcss
960
	cd $@ && sh bootstrap
961
else
962
libdvdcss: libdvdcss-$(LIBDVDCSS_VERSION).tar.gz
963
	$(EXTRACT_GZ)
964
endif
965 966

.dvdcss: libdvdcss
967 968 969
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --disable-doc --prefix=$(PREFIX) && make && make install)
	$(INSTALL_NAME)
	touch $@
970

971 972
ifdef SVN
libdvdcss-source: libdvdcss
973 974
	cd libmatroska;   find . -depth -iname ".svn" -exec rm -rf {} \;
	cd ..;
975
	tar cfvz libdvdcss-$(DATE).tar.gz libdvdcss
976 977 978 979 980

SOURCE += libdvdcss-source
endif


981 982 983 984 985
CLEAN_FILE += .dvdcss
CLEAN_PKG += libdvdcss
DISTCLEAN_PKG += libdvdcss-$(LIBDVDCSS_VERSION).tar.gz

# ***************************************************************************
986
# libdvdread: We use dvdnav's dvdread
987 988
# ***************************************************************************

989
#libdvdread-$(LIBDVDREAD_VERSION).tar.bz2:
990
#	$(WGET) $(LIBDVDREAD_URL)
991

992
#libdvdread: libdvdread-$(LIBDVDREAD_VERSION).tar.bz2
993 994
#	$(EXTRACT_BZ2)
#	patch  -p 0 < Patches/libdvdread.patch
995
#ifdef HAVE_WIN32
996 997 998 999 1000
#	if automake-1.4 --version >/dev/null 2>&1; then \
#		echo "Please get rid of your automake 1.4"; \
#		rm -rf $@ \
#		exit 1; \
#	fi
Rafaël Carré's avatar
Rafaël Carré committed
1001
#	(cd libdvdread; patch -p0 < ../Patches/libdvdread-20041028-win32.patch; ./bootstrap)
1002 1003 1004
#endif

#.dvdread: libdvdread .dvdcss
1005 1006 1007
#	(cd libdvdread; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) && make && make install)
#	$(INSTALL_NAME)
#	touch $@
1008 1009 1010 1011

#CLEAN_FILE += .dvdread
#CLEAN_PKG += libdvdread
#DISTCLEAN_PKG += libdvdread-$(LIBDVDREAD_VERSION).tar.bz2
1012

1013 1014 1015 1016
# ***************************************************************************
# dummy dvdread to trigger the INSTALL_NAME script
# ***************************************************************************
.dvdread: .dvdnav
1017 1018 1019
	$(INSTALL_NAME)
	(install_name_tool -change $(PREFIX)/lib/libdvdread.0.dylib @executable_path/lib/vlc_libdvdread.dylib $(PREFIX)/vlc-lib/vlc_libdvdnav.dylib)
	touch $@
1020 1021 1022 1023 1024 1025 1026

CLEAN_FILE += .dvdread

# ***************************************************************************
# libdvdnav
# ***************************************************************************

1027
libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2:
1028
	$(WGET) $(LIBDVDNAV_URL)
1029

1030
libdvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2
1031
	$(EXTRACT_BZ2)
Rafaël Carré's avatar
Rafaël Carré committed
1032 1033
	patch -p0 < Patches/dvdnav.patch
	patch -p0 < Patches/libdvdnav-mactel.patch
1034
	(cd $@; ./autogen.sh noconfig)
1035

1036
.dvdnav: libdvdnav .dvdcss
1037 1038
ifdef HAVE_WIN32	
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -Dssize_t=long" && make && make install)
1039
else
1040
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --enable-static --prefix=$(PREFIX) --with-libdvdcss=$(PREFIX) CFLAGS="$(CFLAGS) -Dlseek64=lseek -Doff64_t=off_t" && make && make install)
1041
endif
1042 1043
	$(INSTALL_NAME)
	touch $@
1044 1045 1046

CLEAN_FILE += .dvdnav
CLEAN_PKG += libdvdnav
1047
DISTCLEAN_PKG += libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2
1048 1049 1050 1051 1052 1053

# ***************************************************************************
# libdvbpsi
# ***************************************************************************

libdvbpsi3-$(LIBDVBPSI_VERSION).tar.gz:
1054
	$(WGET) $(LIBDVBPSI_URL)
1055 1056

libdvbpsi: libdvbpsi3-$(LIBDVBPSI_VERSION).tar.gz
1057
	$(EXTRACT_GZ)
1058 1059

.dvbpsi: libdvbpsi
1060 1061 1062
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd src && make && make install)
	$(INSTALL_NAME)
	touch $@
1063 1064 1065

CLEAN_FILE += .dvbpsi
CLEAN_PKG += libdvbpsi
1066
DISTCLEAN_PKG += libdvbpsi3-$(LIBDVBPSI_VERSION).tar.gz
1067 1068 1069 1070 1071

# ***************************************************************************
# live
# ***************************************************************************

1072
live555-$(LIVEDOTCOM_VERSION).tar.gz:
1073
	$(WGET) $(LIVEDOTCOM_URL)
1074

1075
live: live555-$(LIVEDOTCOM_VERSION).tar.gz
1076
	$(EXTRACT_GZ)
Rafaël Carré's avatar
Rafaël Carré committed
1077
	patch -p0 < Patches/live.patch
1078
ifdef HAVE_WIN32 
Rafaël Carré's avatar
Rafaël Carré committed
1079
	patch -p0 < Patches/livedotcom-win32.patch
1080 1081
endif
ifdef HAVE_DARWIN_OS
Rafaël Carré's avatar
Rafaël Carré committed
1082
	patch -p0 < Patches/live-osx.patch
1083
endif
1084
	patch -p0 < Patches/live-starttime.patch
1085
	patch -p0 < Patches/live-config.patch
1086 1087

.live: live
1088
ifdef HAVE_WIN32 
1089
	(cd $<;./genMakefiles mingw && make $(HOSTCC))
1090
else
1091
ifeq ($(HOST),ppc-darwin)
1092
	(cd $<; ./genMakefiles macosx-before-version-10.4 && make )
1093
else
1094
ifdef HAVE_DARWIN_OS
1095 1096
	(cd $<; sed -e 's%EXTRA_CFLAGS%$(EXTRA_CFLAGS)%' -e 's%EXTRA_LDFLAGS%$(EXTRA_LDFLAGS)%' -i.orig  config.macosx)
	(cd $<; ./genMakefiles macosx && make)
1097
else
1098 1099
	(cd $<; sed -e 's/=/= EXTRA_CPPFLAGS/' -e 's%EXTRA_CPPFLAGS%-I/include%' -i.orig groupsock/Makefile.head)
	(cd $<; ./genMakefiles linux && make $(HOSTCC))
1100
endif
1101
endif
1102
endif
1103
	touch $@
1104 1105 1106

CLEAN_FILE += .live
CLEAN_PKG += live
1107
DISTCLEAN_PKG += live555-$(LIVEDOTCOM_VERSION).tar.gz
1108 1109 1110 1111 1112 1113

# ***************************************************************************
# goom
# ***************************************************************************

#goom-macosx-altivec-bin.tar.gz:
1114
#	$(WGET) $(GOOM_URL)
1115 1116

#goom: goom-macosx-altivec-bin.tar.gz
1117
#	$(EXTRACT_GZ)
1118 1119

#.goom: goom
1120 1121
#	(cd $<;)
#	touch $@
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131

#CLEAN_FILE += .goom
#CLEAN_PKG += goom
#DISTCLEAN_PKG += goom-macosx-altivec-bin.tar.gz

# ***************************************************************************
# goom2k4
# ***************************************************************************

goom$(GOOM2k4_VERSION).tar.gz:
1132 1133
	$(WGET) $(GOOM2k4_URL)
	mv goom-$(GOOM2k4_VERSION)-src.tar.gz goom$(GOOM2k4_VERSION).tar.gz
1134 1135

goom: goom$(GOOM2k4_VERSION).tar.gz
1136
	$(EXTRACT_GZ)
1137
ifdef HAVE_DARWIN_OS
Rafaël Carré's avatar
Rafaël Carré committed
1138
	patch -p0 < Patches/goom.patch
1139 1140
endif
ifdef HAVE_WIN32
1141
	(cd $@; dos2unix configure.in)
Rafaël Carré's avatar
Rafaël Carré committed
1142
	patch -p0 < Patches/goom2k4-0-win32.patch
1143
else
Rafaël Carré's avatar
Rafaël Carré committed
1144
	patch -p0 < Patches/goom2k4-0-mmx.patch
1145
endif
1146 1147

.goom2k4: goom
1148
ifdef HAVE_DARWIN_OS
1149
	(cd $<; ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
1150
else
1151
	(cd $< && rm -f configure; autoconf configure.in > configure && $(HOSTCC) sh ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static --disable-glibtest --disable-gtktest && make && make install)
1152
endif
1153
	touch $@
1154 1155 1156

CLEAN_FILE += .goom2k4
CLEAN_PKG += goom
1157
DISTCLEAN_PKG += goom$(GOOM2k4_VERSION).tar.gz
1158 1159 1160 1161 1162 1163

# ***************************************************************************
# libcaca
# ***************************************************************************

libcaca-$(LIBCACA_VERSION).tar.gz:
1164
	$(WGET) $(LIBCACA_URL)
1165 1166

libcaca: libcaca-$(LIBCACA_VERSION).tar.gz
1167
	$(EXTRACT_GZ)
1168 1169

.caca: libcaca
1170
ifdef HAVE_WIN32
1171
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --enable-win32 --disable-x11 --disable-imlib2 --disable-doc && make && make install)
1172
else
1173
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-imlib2 --disable-doc && make && make install)
1174
endif
1175
	touch $@
1176 1177 1178 1179 1180 1181

CLEAN_FILE += .caca
CLEAN_PKG += libcaca
DISTCLEAN_PKG += libcaca-$(LIBCACA_VERSION).tar.gz

# ***************************************************************************
Antoine Cellerier's avatar
Antoine Cellerier committed
1182
# libdca
1183 1184
# ***************************************************************************

1185 1186 1187 1188 1189
libdca-$(LIBDCA_VERSION).tar.bz2:
	$(WGET) $(LIBDCA_URL)

libdca: libdca-$(LIBDCA_VERSION).tar.bz2
	$(EXTRACT_BZ2)
1190

1191
.dca: libdca
1192 1193
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
	touch $@
1194

1195
CLEAN_FILE += .dca
Antoine Cellerier's avatar
Antoine Cellerier committed
1196
CLEAN_PKG += libdca
1197
DISTCLEAN_PKG += libdca-$(LIBDCA_VERSION).tar.bz2
1198

1199
# ***************************************************************************
1200
# libx264
1201 1202
# ***************************************************************************

1203 1204 1205
x264-$(X264_VERSION).tar.gz:
	$(WGET) $(X264_URL)

1206 1207
ifdef SVN
x264: 
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
1208
	$(SVN) export svn://svn.videolan.org/x264/trunk/ x264
1209
ifdef HAVE_WIN32
Rafaël Carré's avatar
Rafaël Carré committed
1210
	(cd x264; patch -p0 < ../Patches/x264-svn-win32.patch )
1211
endif
1212
else
1213 1214

x264: x264-$(X264_VERSION).tar.gz
1215
	$(EXTRACT_GZ)
1216
ifdef HAVE_WIN32
Rafaël Carré's avatar
Rafaël Carré committed
1217
	(cd x264;patch -p0 <../Patches/x264-20050624-win32.patch)
1218
else
Rafaël Carré's avatar
Rafaël Carré committed
1219
	patch -p0 < Patches/x264.patch
1220
	rm x264/x264.c
1221
endif
1222
endif
1223

1224 1225
ifdef HAVE_WIN32
.x264: x264 .pthreads
1226
	(cd $<; ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
1227
else
1228
.x264: x264
1229
	(cd $<; ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
1230
endif
1231
	touch $@
1232

1233
ifdef SVN
1234 1235 1236 1237
x264-source: x264
	cd x264;   find . -depth -iname ".svn" -exec rm -rf {} \;
	cd ..;
	tar cfvz x264-$(DATE).tar.gz x264
1238

1239
SOURCE += x264-source
1240 1241
endif

1242 1243 1244 1245
CLEAN_FILE += .x264
CLEAN_PKG += x264
DISTCLEAN_PKG += x264-$(X264_VERSION).tar.gz

1246 1247 1248 1249 1250
# ***************************************************************************
# libmodplug
# ***************************************************************************

libmodplug-$(MODPLUG_VERSION).tar.gz:
1251
	$(WGET) $(MODPLUG_URL)
1252 1253

libmodplug: libmodplug-$(MODPLUG_VERSION).tar.gz
1254
	$(EXTRACT_GZ)
1255 1256

.mod: libmodplug
1257 1258
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
	touch $@
1259 1260 1261 1262 1263 1264 1265 1266 1267

CLEAN_FILE += .mod
CLEAN_PKG += libmodplug
DISTCLEAN_PKG += libmodplug-$(MODPLUG_VERSION).tar.gz

# ***************************************************************************
# libcddb
# ***************************************************************************

1268
libcddb-$(CDDB_VERSION).tar.bz2:
1269
	$(WGET) $(CDDB_URL)
1270

1271
libcddb: libcddb-$(CDDB_VERSION).tar.bz2
1272
	$(EXTRACT_BZ2)
1273 1274

.cddb: libcddb
1275 1276
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static CFLAGS="$(CFLAGS) -D_BSD_SOCKLEN_T_=int" LDFLAGS="$(LDFLAGS) -liconv" && make && make install)
	touch $@
1277 1278 1279

CLEAN_FILE += .cddb
CLEAN_PKG += libcddb
1280
DISTCLEAN_PKG += libcddb-$(CDDB_VERSION).tar.bz2
1281 1282 1283 1284 1285 1286

# ***************************************************************************
# vcdimager
# ***************************************************************************

vcdimager-$(VCDIMAGER_VERSION).tar.gz:
1287
	$(WGET) $(VCDIMAGER_URL)
1288 1289

vcdimager: vcdimager-$(VCDIMAGER_VERSION).tar.gz
1290
	$(EXTRACT_GZ)
1291 1292 1293

ifdef HAVE_DARWIN_OS
.vcdimager: vcdimager
1294 1295
	(cd $<; ./configure --prefix=$(PREFIX) --disable-shared --enable-static LDFLAGS="$(LDFLAGS) -framework CoreFoundation -framework IOKit" && make && make install)
	touch $@
1296 1297
else
.vcdimager: vcdimager
1298 1299
	(cd $<; ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
	touch $@
1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310
endif

CLEAN_FILE += .vcdimager
CLEAN_PKG += vcdimager
DISTCLEAN_PKG += vcdimager-$(VCDIMAGER_VERSION).tar.gz

# ***************************************************************************
# libcdio
# ***************************************************************************

libcdio-$(CDIO_VERSION).tar.gz:
1311
	$(WGET) $(CDIO_URL)
1312 1313

libcdio: libcdio-$(CDIO_VERSION).tar.gz
1314
	$(EXTRACT_GZ)
1315 1316

.cdio: libcdio
1317 1318
	(cd $<; sed -e 's%@ENABLE_CPP_TRUE@SUBDIRS = C++%@ENABLE_CPP_TRUE@SUBDIRS = %' -i.orig example/Makefile.in && ./configure --prefix=$(PREFIX) --without-vcdinfo --disable-shared && make && make install)
	touch $@
1319 1320 1321 1322 1323 1324 1325 1326

CLEAN_FILE += .cdio
CLEAN_PKG += libcdio
DISTCLEAN_PKG += libcdio-$(CDIO_VERSION).tar.gz

# ***************************************************************************
# OpenMash
# ***************************************************************************
1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340
#
#mash-src-$(MASH_VERSION).tar.gz:
#	$(WGET) $(MASH_URL)
#
#mash-code: mash-src-$(MASH_VERSION).tar.gz
#	$(EXTRACT_GZ)
#
#.mash: mash-code
#	(cd $<; ./configure && make)
#	touch $@
#
#CLEAN_FILE += .mash
#CLEAN_PKG += mash-code
#DISTCLEAN_PKG += mash-src-$(MASH_VERSION).tar.gz
1341

1342 1343 1344 1345 1346
# ***************************************************************************
# wxWidgets
# ***************************************************************************

wxWidgets-$(WXWIDGETS_VERSION).tar.gz:
1347
	$(WGET) $(WXWIDGETS_URL)
1348 1349

wxwidgets: wxWidgets-$(WXWIDGETS_VERSION).tar.gz
1350 1351 1352
	$(EXTRACT_GZ)
	(cd wxwidgets; patch -p0 < ../Patches/wxwidgets_uri.patch)
#	(cd wxwidgets; patch -p1 <../Patches/wxMSW-win32.patch)
1353 1354

.wxwidgets: wxwidgets
1355 1356 1357
	(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)
	$(INSTALL_NAME)
	touch $@
1358 1359 1360 1361 1362

CLEAN_FILE += .wxwidgets
CLEAN_PKG += wxwidgets
DISTCLEAN_PKG += wxWidgets-$(WXWIDGETS_VERSION).tar.gz

1363 1364 1365 1366
# ***************************************************************************
# qt4 (win32 binary)
# ***************************************************************************

Clément Stenac's avatar
Clément Stenac committed
1367
qt4-$(QT4_VERSION)-win32-bin.tar.gz:
1368
	$(WGET) $(QT4_URL)
Clément Stenac's avatar
Clément Stenac committed
1369

Clément Stenac's avatar
Clément Stenac committed
1370
qt4: qt4-$(QT4_VERSION)-win32-bin.tar.gz
1371
	$(EXTRACT_GZ)
Clément Stenac's avatar
Clément Stenac committed
1372 1373


1374
.qt4: qt4
1375
	(cd qt4;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)
1376
ifeq ($(BUILD),i686-pc-cygwin)
1377 1378 1379 1380
	(cd qt4;cp bin/rcc.exe bin/uic.exe bin/moc.exe $(PREFIX)/bin)
else
	(cd qt4;cp bin/rcc bin/uic bin/moc $(PREFIX)/bin)
endif
1381
	touch $@
Clément Stenac's avatar
Clément Stenac committed
1382 1383 1384

CLEAN_FILE += .qt4
CLEAN_PKG += qt4
1385
#DISTCLEAN_PKG += qt4-$(QT4_VERSION).tar.gz
Clément Stenac's avatar
Clément Stenac committed
1386

1387 1388 1389 1390 1391
# ***************************************************************************
# zlib
# ***************************************************************************

zlib-$(ZLIB_VERSION).tar.gz:
1392
	$(WGET) $(ZLIB_URL)
1393 1394

zlib: zlib-$(ZLIB_VERSION).tar.gz
1395
	$(EXTRACT_GZ)
Rafaël Carré's avatar
Rafaël Carré committed
1396
	patch -p0 < Patches/zlib.patch
1397 1398

.zlib: zlib
1399 1400 1401
	(cd zlib; $(HOSTCC2) ./configure --prefix=$(PREFIX) && make install)
	$(INSTALL_NAME)
	touch $@
1402 1403 1404 1405 1406 1407

CLEAN_FILE += .zlib
CLEAN_PKG += zlib
DISTCLEAN_PKG += zlib-$(ZLIB_VERSION).tar.gz


1408 1409 1410 1411 1412
# ***************************************************************************
# PortAudio 
# ***************************************************************************

pa_snapshot_v$(PORTAUDIO_VERSION).tar.gz:
1413
	$(WGET) $(PORTAUDIO_URL)
1414 1415

portaudio: pa_snapshot_v$(PORTAUDIO_VERSION).tar.gz
1416
	$(EXTRACT_GZ)
1417
ifneq ($(HOST),$(BUILD))
Rafaël Carré's avatar
Rafaël Carré committed
1418
	(patch -p0 < Patches/portaudio-cross.patch;cd $@;  autoconf)
1419
endif
1420 1421

.portaudio: portaudio 
1422 1423 1424
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make  install)
	$(INSTALL_NAME)
	touch $@
1425 1426 1427

CLEAN_FILE += .portaudio
CLEAN_PKG += portaudio
1428
DISTCLEAN_PKG += pa_snapshot_v$(PORTAUDIO_VERSION).tar.gz
1429 1430


1431 1432 1433 1434 1435
# ***************************************************************************
# xml
# ***************************************************************************

libxml2-$(XML_VERSION).tar.gz:
1436
	$(WGET) $(XML_URL)
1437 1438

xml: libxml2-$(XML_VERSION).tar.gz
1439
	$(EXTRACT_GZ)
1440
ifdef HAVE_WIN32
Rafaël Carré's avatar
Rafaël Carré committed
1441
	patch -p0 < Patches/xml2-win32.patch
1442
	rm -f xml/aclocal.m4
1443 1444 1445
endif

.xml: xml
1446
	(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 && make && make install)
1447
ifndef HAVE_DARWIN_OS
1448
	$(INSTALL_NAME)
1449
endif
1450
	touch $@
1451 1452 1453 1454 1455 1456

CLEAN_FILE += .xml
CLEAN_PKG += xml
DISTCLEAN_PKG += libxml2-$(XML_VERSION).tar.gz


1457 1458 1459 1460 1461
# ***************************************************************************
# twolame
# ***************************************************************************

twolame-$(TWOLAME_VERSION).tar.gz:
1462
	$(WGET) $(TWOLAME_URL)
1463 1464

twolame: twolame-$(TWOLAME_VERSION).tar.gz
1465
	$(EXTRACT_GZ)
1466
ifdef HAVE_BEOS
Rafaël Carré's avatar
Rafaël Carré committed
1467
	patch -p0 < Patches/twolame-BeOS.patch
1468
endif
1469 1470

.twolame: twolame
Christophe Mutricy's avatar
Christophe Mutricy committed
1471
ifdef HAVE_WIN32
1472
	(cd twolame/win32; $(WGET) "http://twolame.svn.sourceforge.net/viewvc/*checkout*/twolame/trunk/win32/winutil.h")
Christophe Mutricy's avatar
Christophe Mutricy committed
1473
endif	
1474
	(cd twolame; $(HOSTCC) CFLAGS="${CFLAGS}  -DLIBTWOLAME_STATIC" ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd libtwolame &&  make && make install)
1475 1476
	$(INSTALL_NAME)
	touch $@
1477 1478 1479

CLEAN_FILE += .twolame
CLEAN_PKG += twolame
1480
DISTCLEAN_PKG += twolame-$(TWOLAME_VERSION).tar.gz
1481 1482 1483 1484 1485 1486

# ***************************************************************************
# libpng
# ***************************************************************************

libpng-$(PNG_VERSION).tar.bz2:
1487
	$(WGET) $(PNG_URL)
1488 1489

libpng: libpng-$(PNG_VERSION).tar.bz2
1490
	$(EXTRACT_BZ2)
1491
ifdef HAVE_WIN32
1492
	(cd $@; cat ../Patches/libpng-win32.patch | sed s,??PREFIX??,$(PREFIX), | patch -p0)
1493
else
1494
	(cat Patches/libpng-osx.patch | sed -e 's%??PREFIX??%$(PREFIX)%' -e 's%??EXTRA_CFLAGS??%$(EXTRA_CFLAGS)%' -e 's%??EXTRA_LDFLAGS??%$(EXTRA_LDFLAGS)%' | patch -p0)
1495
endif
Rafaël Carré's avatar
Rafaël Carré committed
1496
	(patch -p0 < Patches/libpng-makefile.patch)
1497
ifdef HAVE_DARWIN_OS_ON_INTEL
Rafaël Carré's avatar
Rafaël Carré committed
1498
	(patch -p0 < Patches/libpng-darwin-mactel.patch)
1499
endif
1500

1501
.png: libpng 
1502
ifdef HAVE_DARWIN_OS
1503
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
1504 1505
else
ifdef HAVE_WIN32
1506
	(cd $<; rm -f INSTALL; cp scripts/makefile.cygwin Makefile && make $(HOSTCC) && make install-static)
1507 1508
else
ifeq ($(PNG_VERSION),1.2.8)
1509
	(cd $<; PREFIX=$(PREFIX) DESTDIR=$(PREFIX) cp scripts/makefile.linux Makefile && make && make install)
1510
else
1511
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
1512
endif
1513
endif
1514
	$(INSTALL_NAME)
1515
endif 
1516
	touch $@
1517 1518 1519

CLEAN_FILE += .png
CLEAN_PKG += libpng
1520
DISTCLEAN_PKG += libpng-$(PNG_VERSION).tar.bz2
1521 1522 1523 1524 1525 1526

# ***************************************************************************
# libzvbi
# ***************************************************************************

zvbi-$(ZVBI_VERSION).tar.bz2:
1527
	$(WGET) $(ZVBI_URL)
1528 1529

zvbi: zvbi-$(ZVBI_VERSION).tar.bz2
1530
	$(EXTRACT_BZ2)
1531 1532

.zvbi: zvbi
1533 1534
	(cd $<; ./configure --prefix=$(PREFIX) && make)
	touch $@
1535 1536 1537

CLEAN_FILE += .zvbi
CLEAN_PKG += zvbi
1538
DISTCLEAN_PKG += zvbi-$(ZVBI_VERSION).tar.bz2
1539 1540 1541 1542 1543

# ***************************************************************************
# gpg-error 
# ***************************************************************************

1544 1545 1546 1547 1548
# libraw1394
# ***************************************************************************

#ifdef SVN
#libraw1394:
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
1549
#	$(SVN) export -r 325 $(LIBDC1394_SVN)/libraw1394/trunk/libraw1394  libraw1394
1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564
#        (cd $<; libtoolize --copy --force; \
#                autopoint -f; \
#                aclocal -I extras/contrib/share/aclocal; \
#                autoconf; \
#                autoheader; \
#                automake --add-missing --copy -Wall)
#
#else
libraw1394-$(LIBRAW1394_VERSION).tar.gz:
	$(WGET) $(LIBRAW1394_URL)

libraw1394: libraw1394-$(LIBRAW1394_VERSION).tar.gz
	$(EXTRACT_GZ)
#endif

1565
.raw1394: libraw1394
1566
	(cd $<; ./configure --prefix=$(PREFIX) && make && make DESTDIR=$(PRFIX) install)
1567
#	sed 's/^typedef u_int8_t  byte_t;/\/* typedef u_int8_t  byte_t;\*\//'
1568 1569
	touch $@
	
1570
CLEAN_file += .raw1394
1571
CLEAN_PKG += libraw1394
1572
DISTCLEAN_PKG += libraw1394-$(LIBRAW1394_VERSION).tar.gz
1573 1574 1575 1576 1577 1578 1579

# ***************************************************************************
# libdc1394
# ***************************************************************************

#ifdef SVN
#libdc1394:
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
1580
#	$(SVN) export -r 325 $(LIBDC1394_SVN)/libdc1394/trunk/libdc1394  libdc1394
1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595
#        (cd $<; libtoolize --copy --force; \
#                autopoint -f; \
#                aclocal -I extras/contrib/share/aclocal; \
#                autoconf; \
#                autoheader; \
#                automake --add-missing --copy -Wall)
#
#else
libdc1394-$(LIBDC1394_VERSION).tar.gz:
	$(WGET) $(LIBDC1394_URL)

libdc1394: libdc1394-$(LIBDC1394_VERSION).tar.gz
	$(EXTRACT_GZ)
#endif

1596
.dc1394: libdc1394
1597 1598 1599 1600 1601
	(cd $<; ./configure --prefix=$(PREFIX) && \
	 patch -p1 < ../Patches/libdc1394-noexamples.patch && \
	 make && make DESTDIR=$(PRFIX) install)
	touch $@
	
1602
CLEAN_file += .dc1394
1603
CLEAN_PKG += libdc1394
1604
DISTCLEAN_PKG += libdc1394-$(LIBDC1394_VERSION).tar.gz
1605 1606

# ***************************************************************************
1607
libgpg-error-$(GPGERROR_VERSION).tar.gz:
1608
	$(WGET) $(GPGERROR_URL)
1609 1610

libgpg-error: libgpg-error-$(GPGERROR_VERSION).tar.gz
1611
	$(EXTRACT_GZ)
Rafaël Carré's avatar
Rafaël Carré committed
1612
	patch -p0 < Patches/libgpg-error.patch
1613
ifdef HAVE_WIN32
Rafaël Carré's avatar
Rafaël Carré committed
1614
	patch -p0 < Patches/libgpg-error-win32.patch
1615
endif
1616

1617
.gpg-error: libgpg-error
1618
ifdef HAVE_DARWIN_OS_ON_INTEL
1619
	(cd $<; ./autogen.sh)
1620
endif
1621 1622 1623
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls --disable-shared && make && make install)
#	$(INSTALL_NAME)
	touch $@
1624

1625
CLEAN_FILE += .gpg-error
1626
CLEAN_PKG += libgpg-error
1627
DISTCLEAN_PKG += libgpg-error-$(GPGERROR_VERSION).tar.gz
1628 1629 1630 1631 1632

# ***************************************************************************
# libgcrypt
# ***************************************************************************

1633
libgcrypt-$(GCRYPT_VERSION).tar.bz2:
1634
	$(WGET) $(GCRYPT_URL)
1635

1636
libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2
1637
	$(EXTRACT_BZ2)
Rafaël Carré's avatar
Rafaël Carré committed
1638
	patch -p0 < Patches/gcrypt.patch
1639

1640
.gcrypt: libgcrypt .gpg-error
1641
ifdef HAVE_WIN32
1642
	(cd $<; ./autogen.sh && $(HOSTCC) ./configure $(HOSTCONF) --target=i586-mingw32msvc --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && sed -i 46s@sys/times.h@sys/time.h@ cipher/random.c && make && make install)
1643
else
1644
ifdef HAVE_DARWIN_OS_ON_INTEL
1645
	(cd $<; $(HOSTCC) ./configure --host=$(HOST) --build=$(BUILD) --prefix=$(PREFIX) --disable-asm CFLAGS="$(CFLAGS)" && make && make install)
1646
endif
1647
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" && make && make install)
1648
endif
1649 1650
	$(INSTALL_NAME)
	touch $@
1651 1652 1653

CLEAN_FILE += .gcrypt
CLEAN_PKG += libgcrypt
1654
DISTCLEAN_PKG += libgcrypt-$(GCRYPT_VERSION).tar.bz2
1655 1656 1657 1658 1659 1660

# ***************************************************************************
# gnutls
# ***************************************************************************

gnutls-$(GNUTLS_VERSION).tar.bz2:
1661
	$(WGET) $(GNUTLS_URL)
1662 1663

gnutls: gnutls-$(GNUTLS_VERSION).tar.bz2
1664
	$(EXTRACT_BZ2)
1665
ifdef HAVE_WIN32
1666
	patch -p0 < Patches/gnutls-win32.patch
1667
	(cd $@; cd lgl; ln -sf alloca_.h alloca.h) 
1668
endif
1669

1670
.gnutls: gnutls .gcrypt .gpg-error
1671
ifdef HAVE_WIN32
1672
	(cd $<; autoconf && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --target=i586-mingw32msvc && cd gl && make && cd ../lgl && make &&  cd ../lib &&make && make install && cd ../includes && make install)
1673
else
1674
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --disable-cxx && cd gl && make && cd ../lgl && make &&  cd ../lib &&make && make install && cd ../includes && make install)
1675
endif
1676 1677
	$(INSTALL_NAME)
	touch $@
1678 1679 1680

CLEAN_FILE += .gnutls
CLEAN_PKG += gnutls
1681
DISTCLEAN_PKG += gnutls-$(GNUTLS_VERSION).tar.bz2
1682 1683 1684 1685 1686 1687

# ***************************************************************************
# libopendaap
# ***************************************************************************

libopendaap-$(DAAP_VERSION).tar.bz2:
1688
	$(WGET) $(DAAP_URL)
1689 1690

libopendaap: libopendaap-$(DAAP_VERSION).tar.bz2
1691
	$(EXTRACT_BZ2)
Rafaël Carré's avatar
Rafaël Carré committed
1692
	patch -p0 < Patches/daap.patch
1693

1694
.opendaap: libopendaap
1695 1696 1697
	(cd $<; ./configure --prefix=$(PREFIX) CFLAGS="$(CFLAGS) -D_BSD_SOCKLEN_T_=int" && make install)
	$(INSTALL_NAME)
	touch $@
1698

1699
CLEAN_FILE += .opendaap
1700
CLEAN_PKG += libopendaap
1701
DISTCLEAN_PKG += libopendaap-$(DAAP_VERSION).tar.bz2
1702 1703 1704 1705 1706 1707

# ***************************************************************************
# glib
# ***************************************************************************

glib-$(GLIB_VERSION).tar.gz:
1708
	$(WGET) $(GLIB_URL)
1709 1710

glib: glib-$(GLIB_VERSION).tar.gz
1711
	$(EXTRACT_GZ)
Rafaël Carré's avatar
Rafaël Carré committed
1712
	patch -p0 < Patches/glib.patch
1713 1714

.glib: glib
1715 1716
	(cd $<; ./configure --prefix=$(PREFIX) --host=powerpc-apple-macos && make && make install)
	touch $@
1717 1718 1719

CLEAN_FILE += .glibl
CLEAN_PKG += glib
1720
DISTCLEAN_PKG += glib-$(GLIB_VERSION).tar.gz
1721 1722 1723 1724 1725 1726

# ***************************************************************************
# libIDL
# ***************************************************************************

libIDL-$(LIBIDL_VERSION).tar.gz:
1727
	$(WGET) $(LIBIDL_URL)
1728 1729

libIDL: libIDL-$(LIBIDL_VERSION).tar.gz
1730
	$(EXTRACT_GZ)
1731

1732
.IDL: libIDL
1733 1734
	(cd $<; ./configure --prefix=$(PREFIX) --host=powerpc-apple-macos && make && make install )
	touch $@
1735

1736
CLEAN_FILE += .IDL
1737
CLEAN_PKG += libIDL
1738
DISTCLEAN_PKG += libIDL-$(LIBIDL_VERSION).tar.gz
1739

1740 1741 1742 1743 1744
# ***************************************************************************
# Gecko SDK
# ***************************************************************************

gecko-sdk-ppc-macosx10.2-1.7.5.tar.gz:
1745
	$(WGET) $(GECKO_SDK_MAC_URL)
1746 1747

gecko-sdk: gecko-sdk-ppc-macosx10.2-1.7.5.tar.gz
1748
	$(EXTRACT_GZ)
1749 1750

.gecko: gecko-sdk
1751 1752
	(cd $<)
	touch $@
1753 1754 1755 1756 1757

CLEAN_FILE += .gecko
CLEAN_PKG += gecko-sdk
DISTCLEAN_PKG += gecko-sdk-ppc-macosx10.2-1.7.5.tar.gz

1758 1759 1760 1761
# ***************************************************************************
# Gecko SDK win32
# ***************************************************************************

1762
gecko-sdk-i586-pc-msvc-1.8b1.zip:
1763
	$(WGET) $(GECKO_SDK_WIN32_URL)
1764 1765

libIDL-0.6.3-win32-bin.zip:
1766
	$(WGET) $(LIBIDL_WIN32_BIN_URL)
1767

1768
glib-19990228.zip:
1769
	$(WGET) $(GLIB_WIN32_BIN_URL)
1770

1771
.gecko-win32: gecko-sdk-i586-pc-msvc-1.8b1.zip libIDL-0.6.3-win32-bin.zip glib-19990228.zip
1772 1773 1774 1775 1776 1777 1778
	unzip gecko-sdk-i586-pc-msvc-1.8b1.zip
	rm -rf ../gecko-sdk
	mv gecko-sdk ..
	unzip -j libIDL-0.6.3-win32-bin.zip libIDL-0.6.3-win32-bin/libIDL-0.6.dll -d ../gecko-sdk/bin
	unzip glib-19990228.zip glib-1.2.dll -d ../gecko-sdk/bin
	chmod a+x ../gecko-sdk/bin/*
	touch $@
1779 1780 1781

CLEAN_FILE += .gecko-win32
CLEAN_PKG += gecko-sdk-win32
1782
DISTCLEAN_PKG += gecko-sdk-i586-pc-msvc-1.8b1.zip libIDL-0.6.3-win32-bin.zip glib-19990228.zip
1783

1784 1785 1786 1787 1788
# ***************************************************************************
# mozilla
# ***************************************************************************

mozilla-source-$(MOZILLA_VERSION).tar.bz2:
1789
	$(WGET) $(MOZILLA_URL)
1790 1791

mozilla: mozilla-source-$(MOZILLA_VERSION).tar.bz2
1792
	$(EXTRACT_BZ2)
1793 1794

.mozilla: mozilla
1795 1796
	(cd $<; ./configure --prefix=$(PREFIX) --enable-default-toolkit=mac --enable-standalone-modules=xpcom,plugin && make && make install)
	touch $@
1797 1798 1799

CLEAN_FILE += .mozilla
CLEAN_PKG += mozilla
1800
DISTCLEAN_PKG += mozilla-source-$(MOZILLA_VERSION).tar.bz2
1801

1802 1803 1804 1805 1806
# ***************************************************************************
# libjpeg
# ***************************************************************************

jpeg-$(JPEG_VERSION).tar.gz:
1807
	$(WGET) $(JPEG_URL)
1808 1809

jpeg: jpeg-$(JPEG_VERSION).tar.gz 
1810
	$(EXTRACT_GZ)
1811 1812

.jpeg: jpeg
1813 1814 1815
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" $(HOSTCC) && make && make install-lib)
	$(RANLIB) $(PREFIX)/lib/libjpeg.a
	touch $@
1816 1817 1818 1819 1820 1821 1822 1823 1824 1825

CLEAN_FILE += .jpeg
CLEAN_PKG += jpeg
DISTCLEAN_PKG += jpeg-$(JPEG_VERSION).tar.gz

# ***************************************************************************
# tiff
# ***************************************************************************

tiff-$(TIFF_VERSION).tar.gz:
1826
	$(WGET) $(TIFF_URL)
1827 1828

tiff: tiff-$(TIFF_VERSION).tar.gz 
1829
	$(EXTRACT_GZ)
1830 1831

.tiff: tiff
1832
ifdef HAVE_WIN32
1833
	(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)
1834
else
1835
	(cd $<; ./configure --with-CFLAGS="$(CFLAGS)" --with-JPEG=no --with-ZIP=no --prefix=$(PREFIX) && make -C port &&make -C libtiff && make -C libtiff install)
1836
endif
1837
	$(INSTALL_NAME)
1838
	touch $@
1839 1840 1841 1842 1843 1844 1845 1846 1847 1848

CLEAN_FILE += .tiff
CLEAN_PKG += tiff
DISTCLEAN_PKG += tiff-$(TIFF_VERSION).tar.gz

# ***************************************************************************
# SDL
# ***************************************************************************

SDL-$(SDL_VERSION).tar.gz:
1849
	$(WGET) $(SDL_URL)
1850 1851

SDL: SDL-$(SDL_VERSION).tar.gz 
1852
	$(EXTRACT_GZ)
1853 1854

.SDL: SDL
1855 1856 1857
	(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)
	$(INSTALL_NAME)
	touch $@
1858 1859 1860 1861 1862 1863 1864 1865 1866 1867

CLEAN_FILE += .SDL
CLEAN_PKG += SDL
DISTCLEAN_PKG += SDL-$(SDL_VERSION).tar.gz

# ***************************************************************************
# SDL_image
# ***************************************************************************

SDL_image-$(SDL_IMAGE_VERSION).tar.gz:
1868
	$(WGET) $(SDL_IMAGE_URL)
1869 1870

SDL_image: SDL_image-$(SDL_IMAGE_VERSION).tar.gz 
1871
	$(EXTRACT_GZ)
Rafaël Carré's avatar
Rafaël Carré committed
1872
	patch -p0 < Patches/SDL_image.patch
1873 1874

.SDL_image: SDL_image .SDL .png .jpeg .tiff
1875 1876 1877
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="$(CFLAGS)" --enable-tif --disable-sdltest && make && make install)
	$(INSTALL_NAME)
	touch $@
1878 1879 1880 1881 1882

CLEAN_FILE += .SDL_image
CLEAN_PKG += SDL_image
DISTCLEAN_PKG += SDL_image-$(SDL_IMAGE_VERSION).tar.gz

1883 1884 1885 1886 1887
# ***************************************************************************
# Musepack decoder library (libmpcdec)
# ***************************************************************************

libmpcdec-$(MUSE_VERSION).tar.bz2:
1888
	$(WGET) $(MUSE_URL)
1889

1890
mpcdec: libmpcdec-$(MUSE_VERSION).tar.bz2 
1891
	$(EXTRACT_BZ2)
Rafaël Carré's avatar
Rafaël Carré committed
1892
	patch -p0 < Patches/mpcdec.patch
1893
	(cd $@; autoreconf -vif)
1894

1895
.mpcdec: mpcdec
1896
ifdef HAVE_WIN32 
1897
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS=-D_PTRDIFF_T=mpc_int32_t && make && make install)
1898
else
1899
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
1900 1901
endif
ifdef HAVE_DARWIN_OS
1902
	$(INSTALL_NAME)
1903
endif
1904
	touch $@
1905

1906 1907
CLEAN_FILE += .mpcdec
CLEAN_PKG += mpcdec
1908 1909
DISTCLEAN_PKG += libmpcdec-$(MUSE_VERSION).tar.bz2

1910
# ***************************************************************************
1911 1912
# Dirac
# ***************************************************************************
1913 1914

dirac-$(DIRAC_VERSION).tar.gz:
1915
	$(WGET) $(DIRAC_URL)
1916 1917

dirac: dirac-$(DIRAC_VERSION).tar.gz
1918
	$(EXTRACT_GZ)
1919
ifdef HAVE_DARWIN_OS
1920
#	patch -p0 <Patches/dirac-osx.patch
Antoine Cellerier's avatar
Antoine Cellerier committed
1921
	echo ""
1922
else
Rafaël Carré's avatar
Rafaël Carré committed
1923
	patch -p0 <Patches/dirac-cross.patch
1924
	(cd $@; aclocal && autoconf && automake)
1925 1926
endif

1927 1928 1929 1930
DIRAC_SUBDIRS = libdirac_byteio libdirac_common libdirac_motionest libdirac_encoder libdirac_decoder

ifdef HAVE_WIN32
DIRAC_SUBDIRS += win32
1931
endif
1932

1933
.dirac: dirac
1934
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX)  CFLAGS="$(CFLAGS)" && DOC_DIR="" make $(DIRAC_SUBDIRS) && DOC_DIR="" make install)
1935
	touch $@
1936 1937 1938

# for MacOS X, dirac is split into two libraries, which needs be installed using two targets
.dirac_encoder: .dirac
1939 1940
	$(INSTALL_NAME)
	touch $@
1941 1942

.dirac_decoder: .dirac
1943 1944
	$(INSTALL_NAME)
	touch $@
1945 1946 1947 1948 1949 1950 1951 1952 1953

CLEAN_FILE += .dirac
CLEAN_PKG += dirac
DISTCLEAN_PKG += dirac-$(DIRAC_VERSION).tar.gz

# *************************************************************************
# DirectX headers
# *************************************************************************
win32-dx7headers.tgz:
1954
	$(WGET) $(DX_HEADERS_URL)
1955
.dx_headers: win32-dx7headers.tgz
1956 1957
	(cd ../include ; tar xzf ../src/$<)
	touch $@
1958 1959 1960 1961 1962 1963 1964
CLEAN_FILE += .dx_headers
DISTCLEAN_PKG += win32-dx7headers.tgz
 
# *************************************************************************
# DirectShow headers
# *************************************************************************
dshow-headers.tgz:
1965
	$(WGET) $(DSHOW_HEADERS_URL)
1966
.dshow_headers: dshow-headers.tgz
1967 1968
	(cd ../include ; tar xzf ../src/$<)
	touch $@
1969 1970
CLEAN_FILE += .dshow_headers
DISTCLEAN_PKG += dshow-headers.tgz
1971 1972 1973 1974 1975 1976

# ***************************************************************************
# libexpat
# ***************************************************************************

expat-$(EXPAT_VERSION).tar.gz:
1977
	$(WGET) $(EXPAT_URL)
1978 1979

expat: expat-$(EXPAT_VERSION).tar.gz
1980
	$(EXTRACT_GZ)
1981 1982

.expat: expat
1983
ifdef HAVE_DARWIN_OS
1984
	(cd $< aclocal --force && libtoolize --force && autoconf --force && autoheader --force )
1985
endif
1986 1987
	(cd $<; ./configure --prefix=$(PREFIX) && make && make install)
	touch $@
1988 1989 1990 1991 1992 1993 1994 1995 1996 1997

CLEAN_FILE += .expat
CLEAN_PKG += expat
DISTCLEAN_PKG += expat-$(EXPAT_VERSION).tar.gz

# ***************************************************************************
# CyberLink C++ UPnP library
# ***************************************************************************

clinkcc$(CLINKCC_VERSION).tar.gz:
1998
	$(WGET) $(CLINKCC_URL)
1999 2000

clinkcc: clinkcc$(CLINKCC_VERSION).tar.gz
2001 2002 2003
	tar xzf $<
	mv $(patsubst %.tar.gz,Cyberlink,$(patsubst %.tgz,Cyberlink,$(notdir $<))) $@ || true
	touch $@
Rafaël Carré's avatar
Rafaël Carré committed
2004
	patch -p0 < Patches/clinkcc.patch
2005
ifdef HAVE_DARWIN_OS
Rafaël Carré's avatar
Rafaël Carré committed
2006
	patch -p0 < Patches/clinkcc_osx.patch
2007 2008 2009
endif

.clinkcc: clinkcc
2010 2011
	(cd $<; ./bootstrap && ./configure --prefix=$(PREFIX) --enable-expat && make && chmod 755 config/install-sh && make install )
	touch $@
2012 2013 2014

CLEAN_FILE += .clinkcc
CLEAN_PKG += clinkcc
2015
DISTCLEAN_PKG += clinkcc$(CLINKCC_VERSION).tar.gz
2016

2017 2018 2019 2020
# ***************************************************************************
# NASM assembler
# ***************************************************************************

2021
nasm-$(NASM_VERSION).tar.bz2:
2022
	$(WGET) $(NASM_URL)
2023 2024

nasm: nasm-$(NASM_VERSION).tar.bz2
2025
	$(EXTRACT_BZ2)
2026 2027

#nasm:
2028 2029 2030
#	echo $(NASM_CVSROOT) A > ./nasm.cvs
#	CVS_PASSFILE=./nasm.cvs cvs -z3 -d $(NASM_CVSROOT) co nasm
#	(cd $@ && autoconf && autoheader)
2031 2032

.nasm: nasm
2033 2034
	(cd $< && $(HOSTCC) ./configure --prefix=$(PREFIX) && make && make install)
	touch $@
2035 2036 2037

CLEAN_FILE += .nasm
CLEAN_PKG += nasm nasm.cvs
2038
DISTCLEAN_PKG += nasm-$(NASM_VERSION).tar.bz2
2039

2040 2041 2042 2043 2044 2045 2046
# ***************************************************************************
# Copy aclocal files
# This is necessary for --missing aclocal to succeed after a
# configure.ac/Makefile.am change in the vlc root dir
# **************************************************************************

.aclocal:
2047 2048
	cp -R $(PREFIX)/share/aclocal/* $(PREFIX)/../../m4/
	touch $@
2049

Felix Paul Kühne's avatar
Felix Paul Kühne committed
2050
CLEAN_FILE += .aclocal
2051

2052 2053 2054 2055 2056
# ***************************************************************************
# UNICOWS (Unicode support for WINME/98/95)
# ***************************************************************************

libunicows-$(UNICOWS_VERSION).tar.gz:
2057 2058
	$(WGET) $(UNICOWS_URL)
	mv libunicows-$(UNICOWS_VERSION)-src.tar.gz $@ || true
2059 2060

libunicows: libunicows-$(UNICOWS_VERSION).tar.gz
2061
	$(EXTRACT_GZ)
2062 2063

.unicows: libunicows
2064 2065
	(cd $</src; make -f makefile.mingw32 PATHSEP='/' $(HOSTCC) && cp -f ../lib/mingw32/libunicows.a $(PREFIX)/lib)
	touch $@
2066 2067 2068

CLEAN_FILE += .unicows
CLEAN_PKG += libunicows
2069
DISTCLEAN_PKG += libunicows-$(UNICOWS_VERSION).tar.gz
2070

2071 2072 2073 2074 2075
# ***************************************************************************
# TagLib read and editing of tags of popular audio formats
# ***************************************************************************

taglib-$(TAGLIB_VERSION).tar.gz:
2076
	$(WGET) $(TAGLIB_URL)
2077 2078

taglib: taglib-$(TAGLIB_VERSION).tar.gz
2079
	$(EXTRACT_GZ)
2080 2081

.tag: taglib
2082 2083 2084
	(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
	$(INSTALL_NAME)
	touch $@
2085

Christophe Mutricy's avatar
Christophe Mutricy committed
2086 2087 2088 2089 2090 2091 2092 2093

pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz:
	$(WGET) $(PTHREADS_URL)

pthreads: pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz
	$(EXTRACT_GZ)

.pthreads: pthreads
2094
	(cd $<; $(HOSTCC) make $(PTHREADSCONF) GC-inlined; cp pthread.h ../../include/; cp *.dll *.a ../../lib/)
Christophe Mutricy's avatar
Christophe Mutricy committed
2095 2096 2097 2098
	$(INSTALL_NAME)
	touch $@


2099 2100 2101 2102 2103
# ***************************************************************************
# Some cleansing
# ***************************************************************************

clean-dots: FORCE
2104
	rm -f $(CLEAN_FILE)
2105 2106

clean: clean-dots
2107
	rm -rf $(CLEAN_PKG)
2108 2109

clean-src: clean
2110
	rm -rf $(DISTCLEAN_PKG)
2111

2112 2113 2114
clean-svn:
	rm -rf ffmpeg tremor libebml libmatroska x264 libdca

2115
distclean: clean-src
2116

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
2117
source: $(SOURCE) $(DISTCLEAN_PKG)