#
#  @(#) Makefile 1.10, last edit: 6/21/94 11:30:23
#  @(#) Copyright (C) 1993, 1994 Tobias Bading (bading@cs.tu-berlin.de)
#  @(#) Berlin University of Technology
#
#  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., 675 Mass Ave, Cambridge, MA 02139, USA.
#

#
#  Changes from 1.1 to 1.2:
#    - dependencies described directly, no more makedepend required
#    - all .c source files rename to .cc files
#    - strip command included after a successful compilation
#    - this makefile is now "Star Trek The Next Generation" compatible!
#


CFLAGS = $(COMPILERFLAGS) # -DLINUX -DDAMN_INTEL_BYTE_ORDER -ffast-math -m486 -m80387 -O3 -ggdb
# -fomit-frame-pointer
# debugging: -ggdb -DDEBUG
# profiling: -pg (gprof) or -p (prof)
# strip command has to be removed for debugging or profiling

#COMPILER = g++

OBJS = ibitstream.o header.o scalefactors.o subband_layer_1.o subband_layer_2.o \
       synthesis_filter.o obuffer.o crc.o ulaw.o layer3.o bit_res.o huffman.o inv_mdct.o maplay.o 

.SUFFIXES:	.cc

#install:
#		@./configuration.sh

all:		maplay

maplay:		$(OBJS)
		$(COMPILER) $(CFLAGS) $(OBJS) -o $@ $(LIBRARIES) -lm
#		-strip $@

.cc.o:
		$(COMPILER) -c $(CFLAGS) $(INCLUDEDIRS) $*.cc -o $@

depend:
		makedepend $(INCLUDEDIRS) -w100 *.cc

clean:
		-rm -f maplay makedepend_done Makefile.bak audio_includes.h
		-rm -f *.o

tags:
		-rm -f TAGS
		etags *.cc *.h Makefile configuration.sh

it:
		@echo >/dev/null
so:
		@echo I\'ll do my very best, Captain.
		@make install
		@echo Further orders, Sir\?

bit_res.o:	bit_res.cc all.h bit_res.h
crc.o:		crc.cc crc.h all.h
header.o:	header.cc header.h all.h ibitstream.h l3type.h crc.h
huffman.o:	huffman.cc all.h bit_res.h huffman.h
ibitstream.o:	ibitstream.cc all.h ibitstream.h l3type.h header.h crc.h
inv_mdct.o:	inv_mdct.cc all.h inv_mdct.h
layer3.o:	layer3.cc all.h l3type.h ibitstream.h obuffer.h header.h \
		crc.h bit_res.h synthesis_filter.h huffman.h \
		layer3.h inv_mdct.h
maplay.o:	maplay.cc all.h crc.h header.h ibitstream.h l3type.h \
		obuffer.h subband.h synthesis_filter.h \
		subband_layer_1.h subband_layer_2.h layer3.h bit_res.h
obuffer.o:	obuffer.cc obuffer.h all.h header.h ibitstream.h l3type.h \
		crc.h
scalefactors.o:	scalefactors.cc scalefactors.h all.h
subband_layer_1.o: subband_layer_1.cc subband_layer_1.h all.h \
		subband.h ibitstream.h l3type.h header.h crc.h synthesis_filter.h \
		obuffer.h scalefactors.h
subband_layer_2.o: subband_layer_2.cc subband_layer_2.h all.h \
		subband.h ibitstream.h l3type.h header.h crc.h synthesis_filter.h \
		obuffer.h scalefactors.h
synthesis_filter.o: synthesis_filter.cc all.h synthesis_filter.h \
		obuffer.h header.h ibitstream.h l3type.h crc.h
ulaw.o:		ulaw.cc ulaw.h all.h


# DO NOT DELETE THIS LINE -- make depend depends on it.
