# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(ADK_TOPDIR)/rules.mk

PKG_NAME:=		imx-vpu
PKG_VERSION:=		3.10.31-1.1.0-beta
PKG_RELEASE:=		1
PKG_HASH:=		22d0542bd4d7beb88084575c834bf9045c8e2acc43acdd2ec4e0e5534b4b9c5e
PKG_DESCR:=		IMX VPU library (Freescale)
PKG_DEPENDS:=		firmware-imx
PKG_SECTION:=		libs/video
PKG_URL:=		http://www.freescale.com/
PKG_SITES:=		http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/

PKG_SYSTEM_DEPENDS:=	solidrun-imx6

DISTFILES:=             ${PKG_NAME}-${PKG_VERSION}.bin

include $(ADK_TOPDIR)/mk/package.mk

$(eval $(call PKG_template,IMX_VPU,imx-vpu,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

TARGET_CPPFLAGS+=	-I${LINUX_DIR}/drivers/mxc/security/rng/include \
			-I$(LINUX_DIR)/drivers/mxc/security/sahara2/include \
			-idirafter $(LINUX_DIR)/include/uapi
MAKE_ENV+=		PLATFORM=IMX6Q
CONFIG_STYLE:=		manual

imx-vpu-install:
	$(INSTALL_DIR) $(IDIR_IMX_VPU)/usr/lib
	$(CP) $(WRKINST)/usr/lib/libvpu.so* \
		$(IDIR_IMX_VPU)/usr/lib

include ${ADK_TOPDIR}/mk/pkg-bottom.mk
