# Makefile to update and install liboggplay sources from svn.annodex.net # This Makefile assumes a Debian-based host when installing prerequisites. # # Updates at http://snapper.kfish.org/~conrad/tmp/Makefile.oggplay-autobuild # # # Step 0: copy this file into an empty directory, rename it to Makefile # Step 1: type "make help" :-) all: help help: @echo "===== Update and install liboggplay sources from svn.annodex.net =====" @echo "This Makefile assumes a Debian-based host when installing prerequisites," @echo "and attempts to install libraries from svn into /usr/local/lib." @echo @echo "Usage: this Makefile accepts the following targets:" @echo @echo "Three-step installation and demo:" @echo " make update Install prerequisites and checkout sources" @echo " make install Build and install libraries and plugin" @echo " make demo Load a demo page in Firefox" @echo @echo "Alternative breakdown of 'make update':" @echo " make prereqs Install prerequisite packages using apt-get" @echo " make checkout Checkout sources from svn" @echo @echo "Maintenance tasks:" @echo " make uninstall Uninstall libraries and plugin" @echo " make clean Run 'make clean' in each source directory" @echo " make rebuild Rebuild each library without installation" @echo @echo "Please report bugs to kfish on #annodex :-)" SVNROOT=http://svn.annodex.net PROJECTS=liboggz libfishsound liboggplay REVPROJ=liboggplay libfishsound liboggz PKGINSTALL=sudo apt-get install BUILDPKGS=subversion automake1.9 libtool libltdl3-dev DEMOURL=http://media.annodex.net/cmmlwiki/SFD2005-Trailer update: prereqs checkout demo: firefox $(DEMOURL) liboggz.prereqs: $(PKGINSTALL) $(BUILDPKGS) libogg-dev libfishsound.prereqs: $(PKGINSTALL) libvorbis-dev libspeex-dev liboggplay.prereqs: $(PKGINSTALL) g++ libtheora-dev libsndfile1-dev libimlib2-dev libglut-dev firefox-dev libgtk2.0-dev prereqs: $(PROJECTS:%=%.prereqs) install: $(PROJECTS:%=%.install) uninstall: $(REVPROJ:%=%.uninstall) check: $(PROJECTS:%=%.check) rebuild: $(PROJECTS:%=%.make) clean: $(PROJECTS:%=%.clean) checkout: $(PROJECTS:%=%.checkout) %.install: %.make cd $* && sudo make install || sudo ./setup.py install - cd $* && [ -x ./copy-plugin.sh ] && ./copy-plugin.sh %.uninstall: %.make cd $* && sudo make uninstall || sudo ./setup.py uninstall - cd $* && [ -x ./uninstall-plugin.sh ] && ./uninstall-plugin.sh %.check: %.make cd $* && make check %.make: % cd $* && make || ( ./autogen.sh && ./configure && make ) || ./setup.py build %.clean: % cd $* && make clean || ( ./autogen.sh && ./configure && make clean) || ./setup.py clean %.checkout: svn co ${SVNROOT}/$*/trunk $*