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

📄 makefile

📁 uclinux 下的vlc播放器源代码
💻
📖 第 1 页 / 共 5 页
字号:
#***************************************************************************# src/Makefile : Dearchive and compile all files necessary# ***************************************************************************# Copyright (C) 2003 - 2007 the VideoLAN team# $Id: Makefile 19712 2007-04-06 14:51:26Z fkuehne $## Authors: Christophe Massiot <massiot@via.ecp.fr>#          Derk-Jan Hartman <hartman at videolan dot org>#          Eric Petit <titer@m0k.org>#          Felix Kühne <fkuehne@users.sourceforge.net>#          Christophe Mutricy <xtophe AT xtelevision.com>#          Gildas Bazin <gbazin at videolan dot org>#          Damien Fouilleul <damienf 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.# ***************************************************************************include ../config.makinclude ./packages.mak# ***************************************************************************# Set a clean environment# ***************************************************************************export PATH := $(PREFIX)/bin:$(EXTRA_PATH):$(PATH)export PKG_CONFIG_PATHexport PKG_CONFIG_LIBDIR = $(PREFIX)/lib/pkgconfigexport DYLD_LIBRARY_PATH = $(PREFIX)/lib# following is required for configure scripts that check dyld libraries# by building and running a test app export DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(PREFIX)/vlc-libexport MACOSX_DEPLOYMENT_TARGET = $(SDK_TARGET)export LIBRARY_PATH := $(PREFIX)/lib:$(LIBRARY_PATH)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)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 ($(CC),)HOSTCC+= CC="$(CC)"endififneq ($(CXX),)HOSTCC+= CXX="$(CXX)"endififneq ($(LD),)HOSTCC+= LD="$(LD)"endififneq ($(RANLIB),)HOSTCC+= RANLIB="$(RANLIB)"endififneq ($(AR),)HOSTCC+= AR="$(AR)"endif# Define ranlib on non-cross compilation setupsifeq ($(RANLIB),)RANLIB=ranlibendif# For libebml/libmatroska. Grrr.ifneq ($(AR),)HOSTCC2=$(HOSTCC) AR="$(AR) rcvu"elseHOSTCC2=$(HOSTCC)endif# For ffmpeg if not cross compilingifneq ($(CC),)  FFMPEGCONF=--cc="$(CC)"endif## cross compiling#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    #    HOSTCONF=--host=$(HOST) --build=$(BUILD)    ifeq ($(findstring cygwin,$(BUILD)),)	# We are REALLY cross compiling	FFMPEGCONF=--cross-prefix=$(HOST)-	X264CONF=--crosscompile=$(HOST)    endifendif## Special target-dependant options#ifdef HAVE_WIN32HOSTCONF+= --without-pic --disable-shared --enable-msw --with-included-opencdk --with-included-libtasn1 --disable-dependency-trackingFFMPEGCONF+= --enable-mingw32 --enable-memalign-hack --cpu=x86 --disable-debugendififdef HAVE_WINCEHOSTCONF+= --without-pic --disable-sharedFFMPEGCONF+= --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-protocolselseFFMPEGCONF+= --enable-mp3lame --enable-faacendififdef HAVE_BEOSFFMPEGCONF+= --cpu=x86 --disable-debug --disable-audio-beosendififeq ($(HOST),i686-apple-darwin8)FFMPEGCONF += --enable-memalign-hackX264CONF += --enable-picifneq ($(HOST),i686-apple-darwin8)FFMPEG_CFLAGS += -DHAVE_LRINTFendifendif# ***************************************************************************# Standard rules# ***************************************************************************ifdef HAVE_DARWIN_OS all: .autoconf .automake .libtool .intl .pkgcfg .freetype .fribidi \	.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \	.FLAC .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \	.dvdcss .dvdnav .dvdread .dvbpsi .live .x264 .caca .mod \	.png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager .SDL_image \	.glib .libidl .gecko .mpcdec .dirac_encoder .dirac_decoder .aclocal \        .libdca .goom2k4 .x264# .expat .clinkcc don't work with SDK yet# .glib .libidl .gecko are required to build the mozilla plugin# .mozilla will build an entire mozilla. it can be used if we need to create a new .gecko package# # Things only enabled on PPCifneq ($(HOST),i686-apple-darwin8)all:endifelse ifdef HAVE_BEOS  ifeq ($(HOST),$(BUILD))# Native build: we need perl, autoconf, etc first   all: .perl .autoconf .automake .libtool .iconv .intl .freetype .fribidi \	.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \	.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \	.dvdnav .dvbpsi .aclocal .libdca  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 \	.dvdnav .dvbpsi .aclocal .libdca  endif else  ifdef HAVE_WIN32   all: .iconv .intl .freetype .fribidi .zlib \	.a52 .mpeg2 .id3tag .mad .ogg .vorbis .shout .vorbisenc .theora \	.FLAC .speex .faad .faac .lame .ebml  .matroska .ffmpeg .dvdcss \	.live .goom2k4 .caca .mod .x264  .xml .twolame \	.png .gpg-error .gcrypt .gnutls .mpcdec \	.dvdnav .dvbpsi .wxwidgets .dirac .SDL_image \	.dx_headers .dshow_headers .aclocal .gecko-win32 .unicows .libdca#	.daap .cddb .cdio .vcdimager .portaudio   else   ifdef HAVE_WINCE   all: .dvbpsi .zlib .ffmpeg .ogg .tremor .faad   else# Standard Linux or other UNIX-like systems   all: .iconv .intl .freetype .fribidi .zlib \	.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \	.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \	.live .goom2k4 .caca .mod .x264  .xml .twolame \	.png .gpg-error .gcrypt .gnutls .mpcdec \	.dvdnav .dvbpsi .wxwidgets .dirac \	.aclocal .libdca .libraw1394 .libdc1394#	.png .gpg-error .gcrypt .gnutls .mpcdec\#	.SDL_image  .daap .cddb .cdio .vcdimager    endif  endif endifendifFORCE:# ***************************************************************************# Useful macros# ***************************************************************************define EXTRACT_GZ	rm -rf $@ || true	tar xzf $< --exclude='[*?:<>\|]' 	mv $(patsubst %.tar.gz,%,$(patsubst %.tgz,%,$(notdir $<))) $@ || true	touch $@endefdefine EXTRACT_BZ2	rm -rf $@ || true	bunzip2 -c $< | tar xf - --exclude='[*?:<>\|]' 	mv $(patsubst %.tar.bz2,%,$(notdir $<)) $@ || true	touch $@endefdefine EXTRACT_ZIP	rm -rf $@ || true	unzip $<	mv $(patsubst %.zip,%,$(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_OS# 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 define INSTALL_NAME	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 ; \	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)	sed -i.orig 's%prefix="/boot/home/config"%prefix="$(PREFIX)"%'  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.bz2:	$(WGET) $(AUTOCONF_URL)autoconf: autoconf-$(AUTOCONF_VERSION).tar.bz2	$(EXTRACT_BZ2).autoconf: autoconf	(cd $<; ./configure --prefix=$(PREFIX) && make && make install)	touch $@CLEAN_FILE += .autoconfCLEAN_PKG += autoconfDISTCLEAN_PKG += autoconf-$(AUTOCONF_VERSION).tar.bz2# ***************************************************************************# libtool# ***************************************************************************ifdef HAVE_DARWIN_OS.libtool:	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 $@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)	patch -d pkgconfig/glib-1.2.8 -p 1 < Patches/glib.patch.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)

⌨️ 快捷键说明

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