⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 video linux conference
💻
📖 第 1 页 / 共 3 页
字号:
# ***************************************************************************# src/Makefile : Dearchive and compile all files necessary# ***************************************************************************# Copyright (C) 2003, 2004, 2005 VideoLAN# $Id: Makefile 11372 2005-06-09 22:44:02Z hartman $## Authors: Christophe Massiot <massiot@via.ecp.fr>#          Derk-Jan Hartman <hartman at videolan dot org>## 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# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.# ***************************************************************************include ../config.makinclude ./packages.mak# ***************************************************************************# Set a clean environment# ***************************************************************************ifeq ($(HOST),ppc-darwin)HAVE_DARWIN_OS=1endififeq ($(HOST),powerpc-apple-darwin8)HAVE_DARWIN_OS=1endififdef HAVE_DARWIN_OSexport PATH = $(PREFIX)/bin:/bin:/usr/binexport DYLD_LIBRARY_PATH = $(PREFIX)/libendififeq ($(HOST),i586-pc-beos)ifeq ($(HOST),$(BUILD))# Compiling on BeOSexport PATH = $(PREFIX)/bin:.:/boot/home/config/bin:/bin:/boot/apps:/boot/preferences:/boot/beos/apps:/boot/beos/preferences:/boot/develop/tools/gnupro/binexport LIBRARY_PATH = $(PREFIX)/lib:%A/lib:/boot/home/config/lib:/boot/beos/system/libelse# Cross compiling from Linuxexport PATH = $(PREFIX)/bin:/opt/cross-tools/bin:/usr/bin:/binendifendifexport CPPFLAGS = -I$(PREFIX)/include $(EXTRA_CPPFLAGS)export CFLAGS = -I$(PREFIX)/include $(EXTRA_CPPFLAGS)export CXXFLAGS = -I$(PREFIX)/include $(EXTRA_CPPFLAGS)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... ;)# ***************************************************************************ifneq ($(BUILD),$(HOST))# We are cross compilingHOSTCONF=--host=$(HOST)HOSTCC=CC=$(HOST)-gcc CXX=$(HOST)-g++ AR=$(HOST)-ar RANLIB=$(HOST)-ranlib# For libebml/libmatroska. Grrr.HOSTCC2=CC=$(HOST)-gcc CXX=$(HOST)-g++ "AR=$(HOST)-ar rcvu" RANLIB=$(HOST)-ranlibFFMPEGCONF=--cross-prefix=$(HOST)-RANLIB=$(HOST)-ranlibelse# Building nativelyRANLIB=ranlibendif# ***************************************************************************# Standard rules# ***************************************************************************ifdef HAVE_DARWIN_OS all: .autoconf .libtool .automake .iconv .intl .pkgcfg .freetype .fribidi \	.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .x264 .theora \	.FLAC .speex .faad .faac .lame .twolame .ebml .matroska .ffmpeg .openslp \	.dvdcss .dvdread .dvdnav .dvbpsi .live .goom2k4 .caca .mod \	.png .gpg-error .gcrypt .gnutls .daap .cddb .cdio .vcdimager .aclocal# mozilla support? add before .aclocal:  .glib .libidl .mozillaelse ifeq ($(HOST),i586-pc-beos)  ifeq ($(HOST),$(BUILD))# Native build: we need perl, autoconf, etc first   all: .perl .autoconf .libtool .automake .iconv .intl .freetype .fribidi \	.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \	.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \	.dvdread .dvdnav .dvbpsi .aclocal  else# Cross compiling: we already have the Linux tools, only build the# libraries now   all: .iconv .intl .freetype .fribidi \	.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \	.FLAC .speex .faad .faac .lame .twolame .ebml .matroska .ffmpeg .dvdcss \	.dvdread .dvdnav .dvbpsi .aclocal  endif else# Standard Linux or other UNIX-like systems   all: .iconv .intl .freetype .fribidi \	.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \	.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \	.dvdread .dvdnav .dvbpsi .aclocal endifendifFORCE:# ***************************************************************************# Useful macros# ***************************************************************************define EXTRACT_GZ	tar xzf $<	mv $(patsubst %.tar.gz,%,$(patsubst %.tgz,%,$(notdir $<))) $@ || true	touch $@endefdefine EXTRACT_BZ2	bunzip2 -c $< | tar xf -	mv $(patsubst %.tar.bz2,%,$(notdir $<)) $@ || true	touch $@endef### 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#	cd $< ; ./configure --prefix=$(PREFIX)#	$(MAKE) -C $<#	$(MAKE) -C $< install#	$(INSTALL_NAME)#	touch $@ifdef HAVE_DARWIN_OSdefine INSTALL_NAME_LIB	install_name_tool \		-change $(PREFIX)/lib/$(shell cd $(PREFIX)/lib; ls | grep "lib$(INSTALL_LIB).[0-9]*.dylib") \		@executable_path/lib/vlc_lib$(INSTALL_LIB).dylib \		$(PREFIX)/vlc-lib/lib$(patsubst .%,%,$@).dylib ;endefdefine INSTALL_NAME	if which install_name_tool >/dev/null; then \		mkdir -p $(PREFIX)/vlc-lib ; \		cp $(PREFIX)/lib/lib$(patsubst .%,%,$@).dylib \			$(PREFIX)/vlc-lib/lib$(patsubst .%,%,$@).dylib ; \		install_name_tool \			-id @executable_path/lib/vlc_lib$(patsubst .%,%,$@).dylib \			$(PREFIX)/vlc-lib/lib$(patsubst .%,%,$@).dylib ; \		$(foreach INSTALL_LIB,$(patsubst .%,%,$(filter .%,$^)), \			$(INSTALL_NAME_LIB)) \	fiendefendififeq ($(HOST),i586-pc-beos)# We test if the file actually exists, as sometimes (but not always)# libtool won't accept to build the shared librarydefine INSTALL_NAME	if test -f $(PREFIX)/lib/lib$(patsubst .%,%,$@).so ; then \		mkdir -p $(PREFIX)/vlc-lib ; \		cp $(PREFIX)/lib/lib$(patsubst .%,%,$@).so \		  $(PREFIX)/vlc-lib/ ; \	fiendefendif# ***************************************************************************# perl# ***************************************************************************ifeq ($(BUILD),i586-pc-beos)perl-$(PERL_VERSION).tar.gz:	$(WGET) $(PERL_URL)perl: perl-$(PERL_VERSION).tar.gz	$(EXTRACT_GZ)	mv perl/hints/beos.sh perl/hints/beos.sh.orig	sed 's%prefix="/boot/home/config"%prefix="$(PREFIX)"%' < perl/hints/beos.sh.orig > perl/hints/beos.sh.perl: perl	(cd $<; ./Configure -d -e && make && make install && ln -sf perl5/$(PERL_VERSION)/BePC-beos/CORE/libperl.so $(PREFIX)/lib/libperl.so)	touch $@CLEAN_FILE += .perlCLEAN_PKG += perlDISTCLEAN_PKG += perl-$(PERL_VERSION).tar.gzendif# ***************************************************************************# autoconf# ***************************************************************************autoconf-$(AUTOCONF_VERSION).tar.gz:	$(WGET) $(AUTOCONF_URL)autoconf: autoconf-$(AUTOCONF_VERSION).tar.gz	$(EXTRACT_GZ).autoconf: autoconf	(cd $<; ./configure --prefix=$(PREFIX) && make && make install)	touch $@CLEAN_FILE += .autoconfCLEAN_PKG += autoconfDISTCLEAN_PKG += autoconf-$(AUTOCONF_VERSION).tar.gz# ***************************************************************************# libtool# ***************************************************************************ifdef HAVE_DARWIN_OS.libtool:	if test -x /usr/bin/glibtoolize; then \		ln -sf /usr/bin/glibtoolize $(PREFIX)/bin/libtoolize ; \	fi	touch $@endififeq ($(BUILD),i586-pc-beos)libtool-$(LIBTOOL_VERSION).tar.gz:	$(WGET) $(LIBTOOL_URL)libtool: libtool-$(LIBTOOL_VERSION).tar.gz	$(EXTRACT_GZ).libtool: libtool	(cd $<; ./configure --prefix=$(PREFIX) && make && make install)	touch $@CLEAN_PKG += libtoolDISTCLEAN_PKG += libtool-$(LIBTOOL_VERSION).tar.gzendifCLEAN_FILE += .libtool# ***************************************************************************# automake# ***************************************************************************automake-$(AUTOMAKE_VERSION).tar.gz:	$(WGET) $(AUTOMAKE_URL)automake: automake-$(AUTOMAKE_VERSION).tar.gz	$(EXTRACT_GZ).automake: automake	(cd $<; ./configure --prefix=$(PREFIX) && make && make install)	touch $@CLEAN_FILE += .automakeCLEAN_PKG += automakeDISTCLEAN_PKG += automake-$(AUTOMAKE_VERSION).tar.gz# ***************************************************************************# pkgconfig# ***************************************************************************pkgconfig-$(PKGCFG_VERSION).tar.gz:	$(WGET) $(PKGCFG_URL)pkgconfig: pkgconfig-$(PKGCFG_VERSION).tar.gz	$(EXTRACT_GZ).pkgcfg: pkgconfig	(cd pkgconfig; ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)	touch $@CLEAN_FILE += .pkgcfgCLEAN_PKG += pkgconfigDISTCLEAN_PKG += pkgconfig-$(PKGCFG_VERSION).tar.gz# ***************************************************************************# gettext# ***************************************************************************gettext-$(GETTEXT_VERSION).tar.gz:	$(WGET) $(GETTEXT_URL)gettext: gettext-$(GETTEXT_VERSION).tar.gz	$(EXTRACT_GZ)	patch -p 0 < Patches/gettext.patch.intl: gettext .iconv	( cd $< && ./configure $(HOSTCONF) --prefix=$(PREFIX) )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	( cd $< && for f in `find . -name libtool`; do mv $$f $$f.orig; sed -e 's/ -shared / -nostart /' -e 's/^predep_objects.*/predep_objects=""/' < $$f.orig > $$f; chmod +x $$f; rm $$f.orig; done )endififneq ($(HOST),$(BUILD))# We'll use the installed gettext and only need to cross-compile libintl	( cd $< && make -C gettext-runtime/intl && make -C gettext-runtime/intl install )else# Build and install the whole gettext	( cd $< && make && make install )endif	$(INSTALL_NAME)	touch $@CLEAN_FILE += .intlCLEAN_PKG += gettextDISTCLEAN_PKG += gettext-$(GETTEXT_VERSION).tar.gz# ***************************************************************************# libiconv# ***************************************************************************libiconv-$(LIBICONV_VERSION).tar.gz:	$(WGET) $(LIBICONV_URL)libiconv: libiconv-$(LIBICONV_VERSION).tar.gz	$(EXTRACT_GZ).iconv: libiconv	(cd libiconv; ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls && make && make install)	$(INSTALL_NAME)	touch $@CLEAN_FILE += .iconvCLEAN_PKG += libiconvDISTCLEAN_PKG += libiconv-$(LIBICONV_VERSION).tar.gz# ***************************************************************************# freetype2# ***************************************************************************freetype-$(FREETYPE2_VERSION).tar.gz:	$(WGET) $(FREETYPE2_URL)freetype2: freetype-$(FREETYPE2_VERSION).tar.gz	$(EXTRACT_GZ).freetype: freetype2	(cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)	$(INSTALL_NAME)	touch $@CLEAN_FILE += .freetypeCLEAN_PKG += freetype2DISTCLEAN_PKG += freetype-$(FREETYPE2_VERSION).tar.gz# ***************************************************************************# fribidi# ***************************************************************************fribidi-$(FRIBIDI_VERSION).tar.gz:	$(WGET) $(FRIBIDI_URL)fribidi: fribidi-$(FRIBIDI_VERSION).tar.gz	$(EXTRACT_GZ)	patch -p 0 < Patches/fribidi.patch.real.fribidi: fribidi	(cd $<; ./bootstrap && ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)	$(INSTALL_NAME)	touch $@CLEAN_FILE += .fribidiCLEAN_PKG += fribidiDISTCLEAN_PKG += fribidi-$(FRIBIDI_VERSION).tar.gz# ***************************************************************************# liba52# ***************************************************************************a52dec-$(A52DEC_VERSION).tar.gz:	$(WGET) $(A52DEC_URL)a52dec: a52dec-$(A52DEC_VERSION).tar.gz	$(EXTRACT_GZ).a52: a52dec	(cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)	touch $@CLEAN_FILE += .a52CLEAN_PKG += a52decDISTCLEAN_PKG += a52dec-$(A52DEC_VERSION).tar.gz# ***************************************************************************# mpeg2dec# ***************************************************************************#mpeg2dec:#	@echo "*** Please press return here : ***"#	cvs -d $(MPEG2DEC_CVSROOT) login#	cvs -d $(MPEG2DEC_CVSROOT) co mpeg2dec#	(cd $@; ./bootstrap)#mpeg2dec-$(MPEG2DEC_VERSION).tar.gz:#	$(WGET) $(MPEG2DEC_URL)# It is easier to use bootstrapped versions...mpeg2dec-$(MPEG2DEC_VERSION).tar.gz:	$(WGET) $(MPEG2DEC_SNAPSHOT)	mv mpeg2dec-snapshot.tar.gz $@mpeg2dec: mpeg2dec-$(MPEG2DEC_VERSION).tar.gz	$(EXTRACT_GZ)	patch -p 0 < Patches/mpeg2dec.patch.mpeg2: mpeg2dec	(cd $<; ./configure $(HOSTCONF) --prefix=$(PREFIX) --without-x --disable-sdl && make && make install)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -