
### makefile for binary binauralRendererCmdl
### fueg@iis.fraunhofer.de , 2014/03/10

GENERALROOT=../../../../../../
MAKEROOT=../

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

ifeq "$(MAKELEVEL)" "0"
SRCS = BinauralRendererCmdl.c

SRCDIRS = ../src
INCL    = -I../include
INCL   += -I$(GENERALROOT)/tools/AFsp/include
INCL   += -I$(GENERALROOT)/tools/AFsp/include/libtsp
INCL   += -I../../binauralRendererLib/include
INCL   += -I../../../../interface/binauralInterfaceLib/include
INCL   += -I../../../../../../tools/wavIO/include
INCL   += -I../../../../../../tools/qmflib/include
INCL   += -I../../../../../../tools/fftlib/include
INCL   += -I../../../../../../tools/cicp2geometry/cicp2geometryLib/include
INCL   += -I../../../../../../tools/writeonlybitbuf/include
INCL   += -I../../../../../../tools/readonlybitbuf/include

ifeq "$(DEBUG)" "1"
DEFFLAGS += -DDEBUG
endif

ifeq "$(DEBUG)" "0"
DEFFLAGS += -DNDEBUG
endif

# AFSP FILE PATH
ifeq "$(TARGET_SYSTEM)" "Linux"
ifeq "$(TARGET_PLATFORM)" "x86_64"
 AFSP_LIB =  $(GENERALROOT)/tools/AFsp/lib/libtsplite_x86_64.a
else
 AFSP_LIB =  $(GENERALROOT)/tools/AFsp/lib/libtsplite.a
endif
endif

ifeq "$(TARGET_SYSTEM)" "Darwin"
 AFSP_LIB = $(GENERALROOT)/tools/AFsp/lib/libtsplite_Mac.a
endif


COMLIBS += -lwavIO -lbinauralRenderer -lbinauralInterface -lqmf -lfft -lcicp2geometry -lwriteonlybitbuf -lreadonlybitbuf

OPTIONS = SRCDIRS="$(SRCDIRS)" INCL="$(INCL)" SYSLIBS="$(AFSP_LIB)" INCLDEP=1 DEFFLAGS="$(DEFFLAGS)"
#OPTIONS  = SRCDIRS="$(SRCDIRS)" INCL="$(INCL)" LIBPATH="$(LIBPATH)" INCLDEP=1 DEFFLAGS="$(DEFFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" SYSLIBS="$(SYSLIBS)" PLOT="$(PLOT)" GPROF="$(GPROF)" GLOBOPTS="$(GLOBOPTS)"

all: $(GENERALROOT)/general/makefile.all binauralRendererFdCmdl

# Copy the following rule identically for the first time checkout


binauralRendererFdCmdl:
	@$(MAKE) TARGET=$@ $(OPTIONS) SRCS="$(SRCS)" COMLIBS="$(COMLIBS)" binary

clean:
	@$(MAKE) TARGET=binauralRendererFdCmdl SRCS="$(SRCS)" clean

clean_all:
	@$(MAKE) TARGET=binauralRendererFdCmdl SRCS="$(SRCS)" COMLIBS="$(COMLIBS)" clean

endif

