# define source files


FILES = BD/DecMPA.cpp BD/DecMPAFileAccess.cpp BD/MPADecoder.cpp \
  BD/MPAFrameFinder.cpp BD/MPAInfo.cpp \
  BD/audioFrame.cpp BD/floatFrame.cpp BD/frame.cpp BD/pcmFrame.cpp BD/rawDataBuffer.cpp \
  BD/mpegAudioHeader.cpp BD/dxHead.cpp

ifeq ($(ENGINE),splay)

#use splay decoding engine

FILES += BD/mpeglayer1.cpp BD/mpeglayer2.cpp BD/mpeglayer3.cpp \
  BD/mpegtable.cpp BD/mpegtoraw.cpp BD/splayDecoder.cpp BD/synthesis.cpp \
  BD/synth_Down.cpp BD/synth_filter.cpp BD/synth_Std.cpp \
  BD/huffmanlookup.cpp BD/huffmantable.cpp \
  BD/mpegAudioBitWindow.cpp BD/dct36_12.cpp BD/dct64.cpp BD/dct64_down.cpp \
  BD/window.cpp BD/DecodeEngine_SPlay.cpp \
  BD/mpegAudioStream.cpp

else

#use hip decoding engine

FILES += BD/common.c BD/dct64_i386.c BD/decode_i386.c \
  BD/interface.c BD/layer1.c BD/layer2.c BD/layer3.c BD/tabinit.c \
  BD/VbrTag.c BD/DecodeEngine_Hip.cpp 

endif

empty:=
SOURCES = $(subst BD/,$(empty),$(FILES))
OBJECTS = $(subst BD/,output/,$(subst .xpp,.cpp,$(subst .c,.c.o,$(FILES:.cpp=.xpp.o))))
DEPENDS = $(subst BD/,depends/,$(subst .xpp,.cpp,$(subst .c,.c.d,$(FILES:.cpp=.xpp.d))))
