#######################################################################
#
# Makefile: oamEncoder
#
#######################################################################

# 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/writeonlybitbuf/include


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

SRCS_COMMON = oam_common.c
SRCS = oam_encode_rapV4.c oam_read.c oam_bitbuf_write.c oam_encode_ld.c


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


# 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) liboamEncoder$(LIB_SUFFIX)


liboamEncoder$(LIB_SUFFIX):
	@$(MAKE) TARGET=$@ $(OPTIONS) COMLIBS="$(COMLIBS)" SYSLIBS="" CFLAGS="$(CFLAGS)" SRCS="$(SRCS) $(SRCS_COMMON)" library

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

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


endif

