#######################################################################
#
# Makefile: SpatialDecoding Library
#
#######################################################################

CXX11=1#  # Removes -ansi and adds std=c++0x to CFLAGS
GENERALROOT=../../../../../
MAKEROOT=../

-include $(GENERALROOT)/general/makefile.all

ifeq "$(MAKELEVEL)" "0"

SRCS = AmbienceSynthesis.cpp ChannelReAssignment.cpp PreliminaryHOAComposition.cpp InverseDynCorrection.cpp SpatialDecoder.cpp DirBasedPreDomSoundSynthesis.cpp \
	PreDomSoundSynthesis.cpp VectorBasedPredomSoundSynthesis.cpp FrameParams.cpp TabulatedValues.cpp \
	DirSubBandHOASynthesis.cpp FinalHOAComposition.cpp PARDecoder.cpp SubBandDirSigsSynthesis.cpp 
# uhd_fft.c TODO: Replace by other FFT implementation

SRCDIRS = ../src ../../common/src ../../../common/src ../../../../binaural/renderer/renderer_TD/binauralRendererLib/src

INCL = -I../include -I../../common/include -I../../../common/include -I../../../bitstream/hoaBitStream/hoaBitStreamCommon/include \
       -I../../../bitstream/bitStreamIO/bitStreamCommon/include -I ../../../bitstream/bitStreamIO/bitStreamReader/include \
       -I../../../../../tools/qmflibCppWrap/include -I../../../../../tools/qmflib/include \
       -I../../../../../tools/parDecorrelator/include -I../../../../binaural/renderer/renderer_TD/binauralRendererLib/include \
       -I../../../../../tools/fftlib/include      
       

OPTIONS = SRCDIRS="$(SRCDIRS)" INCL="$(INCL)" INCLDEP=1 DEFFLAGS="$(DEFFLAGS)"

all: $(GENERALROOT)/general/makefile.all libSpatialDecoding$(LIB_SUFFIX)

libSpatialDecoding$(LIB_SUFFIX):
	@echo DEFFLAGS="$(DEFFLAGS)"
	@$(MAKE) TARGET=$@ $(OPTIONS) SRCS="$(SRCS)" COMLIBS="$(LIB_COMLIBS)" library

clean:
	@$(MAKE) TARGET=libSpatialDecoding$(LIB_SUFFIX) SRCS="$(SRCS)" clean


endif
