#######################################################################
#
# Makefile: oamDecoder
#
#######################################################################

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


# DEFFLAGS #############################################################


# DIRECTORIES ##########################################################

SRCDIRS +=  ../src ../../oamCommon/

INCL += -I../include -I../../oamCommon
INCL += -I../../../../tools/readonlybitbuf/include


# SOURCES ##############################################################

SRCS_COMMON = oam_common.c
SRCS = oam_bitbuf_read.c oam_decode_rapV4.c oam_decoder.c oam_decode_ldV1.c


# COMLIBS ##############################################################

COMLIBS += -lreadonlybitbuf


# SUMMARIZE VARIABLES ##################################################

OPTIONS  += SRCDIRS="$(SRCDIRS)" INCL="$(INCL)" LIBPATH="$(LIBPATH)" INCLDEP=1 DEFFLAGS="$(DEFFLAGS)" PLOT="$(PLOT)" GPROF="$(GPROF)"


# MAKEFILE RULES AND DEPENDENCIES ######################################
# the first rule `all' has to depend from makefile.all
all: $(GENERALROOT)/general/makefile.all $(ISOMEDIA_LIB) oamDecoder 


oamDecoder:
	@$(MAKE) TARGET=$@ $(OPTIONS) COMLIBS="$(COMLIBS)" SYSLIBS="" CFLAGS="$(CFLAGS)" SRCS="$(SRCS) $(SRCS_COMMON)" binary

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

clean_all:
	@$(MAKE) TARGET="oamDecoder" OBJS="$(OBJS)" COMLIBS="$(COMLIBS)" clean


endif

