# Project specific variables and commands AUTHOR = "safemode@comcast.net (Ed Sweetman)" WEBPAGE = "https://signal-lost.homeip.net/projects" TARGET = mp3stat VER = 2.6.01 SRC = statistics.cpp ui.cpp plugit.cpp base.cpp HEADS = "statistics.h plugit.h gui.h input.h ui.h" PLUGINP = $(INSTALLDIR)/lib/mp3stat CPPFLAGS += -DPLUGINP=\"$(PLUGINP)\" LBUILD = -lmagic -lz BUILD = -I$(PWD) TDIR = $(PWD) all : ${TARGET} ifeq ($(GTK),build) @$(MAKE) -C $(TDIR)/ui/gtk endif ifeq ($(TEXT),build) @$(MAKE) -C $(TDIR)/ui/console endif ifeq ($(MP3),build) @$(MAKE) -C $(TDIR)/input/mp3 endif ifeq ($(VORBIS),build) @$(MAKE) -C $(TDIR)/input/vorbis endif OBJ = ${SRC:.cpp=.o} ${TARGET} : ${OBJ} @echo "Building $@" ${CXX} $(BFLAGS) $(CPPFLAGS) -rdynamic -Wl,-rpath,$(PLUGINP) -o $@ ${OBJ} $(LBUILD) .SUFFIXES : .o .cpp install: all strip -g $(TARGET) @cp $(TARGET) $(INSTALLDIR)/bin @mkdir -p $(INSTALLDIR)/include/mp3stat @for p in $(HEADS); do \ cp $$p $(INSTALLDIR)/include/mp3stat;\ done @echo "run mp3stat to start program" ifeq ($(GTK),build) @$(MAKE) -C $(TDIR)/ui/gtk install endif ifeq ($(TEXT),build) @$(MAKE) -C $(TDIR)/ui/console install endif ifeq ($(MP3),build) @$(MAKE) -C $(TDIR)/input/mp3 install endif ifeq ($(VORBIS),build) @$(MAKE) -C $(TDIR)/input/vorbis install endif .cpp.o : @echo "Compiling $<" ${CXX} $(BFLAGS) $(CPPFLAGS) $(BUILD) -DGUI=\"$(GTK)\" -o $@ -c $< clean : rm -f ${OBJ} ${TARGET} Depends ifeq ($(GTK),build) @$(MAKE) -C $(TDIR)/ui/gtk clean endif ifeq ($(TEXT),build) @$(MAKE) -C $(TDIR)/ui/console clean endif ifeq ($(MP3),build) @$(MAKE) -C $(TDIR)/input/mp3 clean endif ifeq ($(VORBIS),build) @$(MAKE) -C $(TDIR)/input/vorbis clean endif Depends depend: @echo "Generating dependency information...." ${CXX} -E -MM ${BUILD} ${SRC} > Depends @echo " " @if test -n "$(VORBIS)"; then \ echo "Enabled: Compiling Vorbis plugin" ;\ else \ echo "Not compiling Vorbis plugin"; \ fi @if test -n "$(MP3)"; then \ echo "Enabled: Compiling mp3 plugin" ;\ else \ echo "Not compiling mp3 plugin"; \ fi @if test -n "$(GTK)"; then \ echo "Enabled: Compiling GTK+2.0 plugin" ;\ else \ echo "Not compiling GTK+2.0 plugin"; \ fi @if test -n "$(TEXT)"; then \ echo "Enabled: Compiling console UI plugin" ;\ else \ echo "Not compiling console UI plugin"; \ fi @echo " " @echo " " @echo "installing to $(INSTALLDIR) " include Depends