diff options
-rw-r--r-- | Makefile | 19 | ||||
-rw-r--r-- | Makefile.music | 240 |
2 files changed, 256 insertions, 3 deletions
@@ -89,6 +89,19 @@ OBJS = $(PLUGIN).o mg_valmap.o mg_thread_sync.o \ vdr_decoder_mp3.o vdr_stream.o vdr_decoder.o vdr_player.o \ vdr_setup.o mg_setup.o mg_incremental_search.o mg_image_provider.o +#ifdef HAVE_MP3NG_OSD +MOBJS = i18n.o data.o menu.o \ + vars.o bitmap.o imagecache.o quantize.o \ + commands.o options.o lyrics.o cover.o skin.o visual.o \ + search.o mp3id3.o mp3id3tag.o rating.o menubrowse.o mp3control.o \ + data-mp3.o setup-mp3.o player-mp3.o stream.o network.o \ + decoder.o decoder-mp3.o decoder-mp3-stream.o decoder-snd.o \ + decoder-ogg.o + +$(MOBJS): + make -f Makefile.music all +#endif + PLAYLIBS = -lmad $(shell taglib-config --libs) MILIBS = $(shell taglib-config --libs) @@ -193,8 +206,8 @@ i18n: $(I18Nmsgs) $(I18Npot) ### Targets: -libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) $(PLAYLIBS) $(SQLLIBS) -o $@ +libvdr-$(PLUGIN).so: $(OBJS) $(MOBJS) + $(CXX) $(CXXFLAGS) -shared $(OBJS) $(MOBJS) $(PLAYLIBS) $(SQLLIBS) -o $@ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) mugglei: mg_tools.o mugglei.o $(DB_OBJ) mg_listitem.o mg_item.o mg_item_gd.o mg_valmap.o mg_setup.o @@ -215,7 +228,7 @@ dist: distclean mg_tables.h @echo Distribution package created as $(PACKAGE).tgz clean: - @-rm -f $(OBJS) $(BINOBJS) $(DEPFILE) *.so *.tgz core* *~ mugglei.o mugglei mg_db_gd_*.o + @-rm -f $(OBJS) $(MOBJS) $(BINOBJS) $(DEPFILE) *.so *.tgz core* *~ mugglei.o mugglei mg_db_gd_*.o distclean: clean @-rm -f mg_tables.h diff --git a/Makefile.music b/Makefile.music new file mode 100644 index 0000000..03fcd95 --- /dev/null +++ b/Makefile.music @@ -0,0 +1,240 @@ +# +# MP3/MPlayer plugin to VDR +# +# (C) 2001-2005 Stefan Huelswitt <s.huelswitt@gmx.de> +# +# This code 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 code 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-1307, USA. +# Or, point your browser to http://www.gnu.org/copyleft/gpl.html + +# You can change the compile options here or create a Make.config +# in the VDR directory an set them there. + +# Uncomment if you own a FF-Card , otherwise scrollmode is disabled . +# If you have problems with scrolling oder hang-ups , dont use it. +HAVE_FFCARD=1 + +# Uncomment if you own enough ram for OSD (e.g modded FF-Card to 4MB ram or softdecoder) +#HAVE_OSDMOD=1 + +# Default: Imlib2, otherwise uncomment +#HAVE_MAGICK=1 + +# Uncomment, if you patched VDR with Wareagle-iconpatch +#HAVE_ICONPATCH=1 + +# Uncomment one of these lines, if you don't want one of the plugins +#WITHOUT_MP3=1 +WITHOUT_MPLAYER=1 + +# Uncomment the following line, if you don't have libsndfile installed +#WITHOUT_LIBSNDFILE=1 + +# Uncomment the following line, if you don't have libvorbisfile installed +#WITHOUT_LIBVORBISFILE=1 + +# Uncomment the following line, if you want OSS sound output +#WITH_OSS_OUTPUT=1 + +# Uncomment the following line, if you want to include debug symbols +#DBG=1 + +# INTERNAL USE , DONT UNCOMMENT OR PLUGIN WILL NOT COMPILE +#IM_A_MORON=1 +#HAVE_TUNED_GTFT=1 + +### The C++ compiler and options: +CXX ?= g++ +CXXFLAGS ?= -g -O2 -fPIC -Wall -Woverloaded-virtual +##CXXFLAGS ?= -ggdb -fPIC -Wall -Woverloaded-virtual + +############################################### +############################################### +# +# no user configurable options below this point +# +############################################### +############################################### + +### The directory environment: + +VDRDIR = ../../.. +LIBDIR = ../../lib +TMPDIR = /tmp + +### Allow user defined options to overwrite defaults: + +-include $(VDRDIR)/Make.config + +# The official name of this plugin. +# This name will be used in the '-P...' option of VDR to load the plugin. +# By default the main source file also carries this name. +# +PLUGIN = music +PLUGIN2 = mplayer + +ifndef WITHOUT_MP3 + ALL += libvdr-$(PLUGIN).so +endif +ifndef WITHOUT_MPLAYER + ALL += libvdr-$(PLUGIN2).so +endif + +DOXYGEN = /usr/bin/doxygen +DOXYFILE = Doxyfile + +### The version number of this plugin (taken from the main source file): + +VERSION = $(shell grep 'define PLUGIN_VERSION' version.h | awk '{ print $$3 }' | sed -e 's/[";]//g') + +### The version number of VDR (taken from VDR's "config.h"): + +VDRVERSION = $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) +APIVERSION = $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) +ifeq ($(strip $(APIVERSION)),) + APIVERSION = $(VDRVERSION) +endif +VDRVERSNUM = $(shell sed -ne '/define VDRVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/config.h) +APIVERSNUM = $(shell sed -ne '/define APIVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/config.h) +ifeq ($(strip $(APIVERSNUM)),) + APIVERSNUM = $(VDRVERSNUM) +endif + +### The name of the distribution archive: + +ARCHIVE = $(PLUGIN)-$(VERSION) +PACKAGE = vdr-$(ARCHIVE) + +### Includes and Defines (add further entries here): + +INCLUDES += -I$(VDRDIR)/include +DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DAPIVERSNUM=$(APIVERSNUM) + +### The object files (add further files here): + +COM_OBJS = i18n.o data.o menu.o + +OBJS = vars.o bitmap.o imagecache.o quantize.o \ + commands.o options.o lyrics.o cover.o skin.o visual.o \ + search.o mp3id3.o mp3id3tag.o rating.o menubrowse.o mp3control.o \ + $(PLUGIN).o $(COM_OBJS)\ + data-mp3.o setup-mp3.o player-mp3.o stream.o network.o \ + decoder.o decoder-mp3.o decoder-mp3-stream.o decoder-snd.o \ + decoder-ogg.o +LIBS = -lmad -lid3tag + + +ifdef HAVE_FFCARD + DEFINES += -DHAVE_FFCARD +endif + +ifdef HAVE_MAGICK + DEFINES += -DHAVE_MAGICK + LIBS += -lMagick -lMagick++ +else + DEFINES += -DHAVE_IMLIB2 + LIBS += -lImlib2 +endif + +ifdef HAVE_ICONPATCH + DEFINES += -DHAVE_ICONPATCH +endif + +ifdef HAVE_OSDMOD + DEFINES += -DHAVE_OSDMOD +endif + +ifdef IM_A_MORON + DEFINES += -DIM_A_MORON +endif + +ifdef HAVE_TUNED_GTFT + DEFINES += -DHAVE_TUNED_GTFT +endif + +ifndef WITHOUT_LIBSNDFILE + LIBS += -lsndfile + DEFINES += -DHAVE_SNDFILE +endif + +ifndef WITHOUT_LIBVORBISFILE + LIBS += -lvorbisfile -lvorbis + DEFINES += -DHAVE_VORBISFILE +endif + +ifdef WITH_OSS_OUTPUT + DEFINES += -DWITH_OSS +endif + +ifdef BROKEN_PCM + DEFINES += -DBROKEN_PCM +endif + +OBJS2 = $(PLUGIN2).o $(COM_OBJS)\ + setup-mplayer.o player-mplayer.o +LIBS2 = + +ifeq ($(shell test -f $(VDRDIR)/fontsym.h ; echo $$?),0) + DEFINES += -DHAVE_BEAUTYPATCH +endif + +ifdef DBG + CXXFLAGS += -g +endif + +### Implicit rules: + +%.o: %.c + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< + +# Dependencies: + +MAKEDEP = g++ -MM -MG +DEPFILE = .dependencies +$(DEPFILE): Makefile + @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) $(OBJS2:%.o=%.c) > $@ + +-include $(DEPFILE) + +### Targets: + +all: $(ALL) + +libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@ + @cp $@ $(LIBDIR)/$@.$(APIVERSION) + +libvdr-$(PLUGIN2).so: $(OBJS2) + $(CXX) $(CXXFLAGS) -shared $(OBJS2) $(LIBS2) -o $@ + @cp $@ $(LIBDIR)/$@.$(APIVERSION) + +i18ntest: i18ntest.c i18n.c i18n.h + $(CXX) $(CXXFLAGS) $(INCLUDES) $< -o $@ + +dist: clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) + @mkdir $(TMPDIR)/$(ARCHIVE) + @cp -a * $(TMPDIR)/$(ARCHIVE) + @tar czf $(PACKAGE).tar.gz -C $(TMPDIR) $(ARCHIVE) + @-rm -rf $(TMPDIR)/$(ARCHIVE) + @echo Distribution package created as $(PACKAGE).tar.gz + +srcdoc: + @cp $(DOXYFILE) $(DOXYFILE).tmp + @echo PROJECT_NUMBER = $(VERSION) >> $(DOXYFILE).tmp + $(DOXYGEN) $(DOXYFILE).tmp + @rm $(DOXYFILE).tmp + +clean: + @-rm -f $(OBJS) $(OBJS2) $(DEPFILE) i18ntest libvdr-*.so $(PACKAGE).tar.gz core* *~ |