#**************************************************************************
#  Makefile for stb layer
#**************************************************************************

MODULE_ROOT ?= ../..

ifneq ($(DTVKIT_HUFFMAN_INCLUDE_PATH),)
# If the include path for the Huffman tables has been set, then check if the default file with empty
# tables are used instead
DEFINES += CHECK_HUFFMAN_TABLES_INCLUSION
endif

ifeq ($(DTVKIT_EIT_REPORT_SEGMENTS),1)
DEFINES += EIT_REPORT_SEGMENTS
endif

INCLUDES = $(DTVKIT_HUFFMAN_INCLUDE_PATH) \
            ./src \
            ./inc \
            ../../platform/inc \
            ../CA/inc

ifeq ($(DTVKIT_INTEGRATE_CI),1)
INCLUDES+= $(MODULE_ROOT)/externals/CIPlus/inc \
           $(DTVKIT_CIPLUS_INCLUDE_PATH)
endif

SRCDIR = src
SRCS = stbdpc.c     \
       stbdsc.c     \
       stbdsdis.c   \
       stbdsfn.c    \
       stbebutt.c   \
       fn12x10.c    \
       stberc.c     \
       stbgc.c      \
       stbheap.c    \
       stbinit.c    \
       stbllist.c   \
       stbpes.c     \
       stbresmgr.c  \
       stbpvr.c     \
       stbpvrmsg.c  \
       stbsitab.c   \
       stbuni.c     \
       stbvbi.c     \
       stbhuffman.c \
       stbvtc.c     \
       vtc.c        \
       stbsiflt.c

ifeq ($(DTVKIT_INTEGRATE_CI),1)
SRCS += stbcica.c stbcicc.c stbcikeys.c

 ifeq ($(DTVKIT_BUILD_FOR_TEE),1)
  ifneq ($(DTVKIT_CIPLUS_EXPOSE_CCK),1)
    DEFINES += CI_TA_HANDLES_KEYS
  endif
 endif

endif

COMP=stb

include ../../common.mak

clean: common_clean

module_clean:

