#
#                             STB22x Project
#                   ---------------------------------
#
# Copyright (C) 2009 NXP B.V.,
# All Rights Reserved.
#
# Filename: gstStb22xFramedAudio/Makefile
#
#
# Rev Date       Author      Comments
#-------------------------------------------------------------------------------
#   1 20090119   laird       First Version
#   2 20090309   batelaan    Fix include paths.

# File: gstStb22xFramedAudio/Makefile
# Makefile to control building/installing of the STB22x Gstreamer Sink Plugin.

# Always needed at the start:
include $(PRJROOT)/etc/first.mk

include $(_TMTGTBUILDROOT)/project/loc_list.mk

$(eval $(PKG_START))

# Define what the package and version is:
PKG:=gstStb22xFramedAudio
gstStb22xFramedAudio_VERSION:=
#gstStb22xFramedAudio_SKIPBUILD:=true

$(eval $(PKG_BUILD_USING_CONFIG))

# We only need to make the build directory
define gstStb22xFramedAudio.untar_CMDS
	mkdir -p $(gstStb22xFramedAudio_BUILDDIR)
endef

# All the usual config opts + srcdir= to stop
# pollution of source tree.
gstStb22xFramedAudio_DEFCONFIGOPTS+=\
	--srcdir=$(gstStb22xFramedAudio_SRCDIR)/gst-plugin/

# We need to run configure --srcdir=$($(PKG)_SRCDIR)/gst-plugin/
# This means we do not pollute the source dir.
# We also must make sure buildroot.install as been run so that the
# GStreamer libs have been built.
define gstStb22xFramedAudio.config_CMDS
	cd $(gstStb22xFramedAudio_BUILDDIR) && \
	  $(gstStb22xFramedAudio_CONFIGENV) sh $(gstStb22xFramedAudio_SRCDIR)/gst-plugin/configure $(gstStb22xFramedAudio_CONFIGOPTS)
endef
$(call OBJ_TARGET_DEPS, gstStb22xFramedAudio.config, buildroot.install)

# Add the meta data components.
gstStb22xFramedAudio_DEFCFLAGS+=\
	-I$(_IphStbEsMetaData_DIR)/inc \
	-I$(_IphStbSbmSink_DIR)/inc

gstStb22xFramedAudio_DEFLDFLAGS+=-L$(ROOTFS)/usr/lib/gstreamer-0.10/

# Always needed at the end:
$(eval $(PKG_END))
include $(PRJROOT)/etc/last.mk
