
### makefile for formatConverter 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"

ifeq "$(STATIC)" "1"
LDFLAGS += -static
endif

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

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

ifneq "$(PLOT)" "0"
DEFFLAGS += -DDEBUG_PLOT
endif

ifeq "$(DUMPOUT)" "1"
DEFFLAGS += -DENABLE_DUMPOUT
endif

DEFFLAGS += -DFORMATCONVERTER_LOWCOMPLEXITY

# source-files
BIN_SRCS = iarFormatConverter_main.c

# compilation flags
SRCDIRS  +=  ../src 

INCL     +=  -I../../iarFormatConverterLib/include

# WAVIO includes
INCL     +=  -I../../../../tools/wavIO/include

# QMF includes
INCL     +=  -I../../../../tools/qmflib/include

# CICP2geometry includes
INCL     +=  -I../../../../tools/cicp2geometry/cicp2geometryLib/include

# gVBAPRenderer includes
INCL     +=  -I../../../../modules/gVBAPRenderer/gVBAPRendererLib/include

# fftlib includes
INCL     +=  -I../../../../tools/fftlib/include

BIN_COMLIBS += -liarFormatConverter -lwavIO -lqmf -lcicp2geometry -lgVBAPRenderer -lfft

# 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 iarFormatConverterCmdl


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

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

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


endif














