
### makefile for hoa matrix Decoder command line application

# include the general makefiles using this directive
GENERALROOT=../../../../../
MAKEROOT=../

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

# the following directive is mandatory in order to get all local stuff into this level
ifeq "$(MAKELEVEL)" "0"


# source-files
BIN_SRCS = main.c

# compilation flags
SRCDIRS  +=  ../src

INCL     +=  -I../../hoaMatrixDecLib/include -I../../../hoaMatrixCommon/include
INCL     += -I../../../../../tools/readonlybitbuf/include

BIN_COMLIBS += -lhoaMatrixDec -lreadonlybitbuf -lcicp2geometry


# needed e.g. for targets 'clobber', 'cvscheckout'
# treat mp4General for the moment as COMLIB (which it is *not*), to guarantee working checkout rules
COMLIBS  = $(LIB_COMLIBS) $(filter-out $(LIB_COMLIBS), $(BIN_COMLIBS))

# summarize all flags in one variable (recommended)
OPTIONS  += SRCDIRS="$(SRCDIRS)" INCL="$(INCL)" LIBPATH="$(LIBPATH)" INCLDEP=1 DEFFLAGS="$(DEFFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" SYSLIBS="$(SYSLIBS)" PLOT="$(PLOT)" GPROF="$(GPROF)" GLOBOPTS="$(GLOBOPTS)"

# the first rule `all' has to depend from makefile.all
all: $(GENERALROOT)/general/makefile.all hoaMatrixDecoderCmdl


hoaMatrixDecoderCmdl:
	@$(MAKE) TARGET=$@ $(OPTIONS) SRCS="$(BIN_SRCS)" COMLIBS="$(COMLIBS)" SYSLIBS="$(SYS_LIBS)" binary

clean:
	@$(MAKE) TARGET="hoaMatrixDecoderCmdl" SRCS="$(BIN_SRCS)" clean

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


endif
