xref: /OK3568_Linux_fs/buildroot/package/freescale-imx/imx-parser/imx-parser.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# imx-parser
4#
5################################################################################
6
7IMX_PARSER_VERSION = 4.3.5
8IMX_PARSER_SITE = $(FREESCALE_IMX_SITE)
9IMX_PARSER_SOURCE = imx-parser-$(IMX_PARSER_VERSION).bin
10IMX_PARSER_INSTALL_STAGING = YES
11
12IMX_PARSER_LICENSE = NXP Semiconductor Software License Agreement
13IMX_PARSER_LICENSE_FILES = EULA COPYING
14IMX_PARSER_REDISTRIBUTE = NO
15
16ifeq ($(BR2_aarch64),y)
17IMX_PARSER_CONF_OPTS += --enable-armv8
18endif
19
20ifeq ($(BR2_ARM_EABIHF),y)
21IMX_PARSER_CONF_OPTS += --enable-fhw
22else
23IMX_PARSER_CONF_OPTS += --enable-fsw
24endif
25
26define IMX_PARSER_EXTRACT_CMDS
27	$(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_PARSER_DL_DIR)/$(IMX_PARSER_SOURCE))
28endef
29
30# The Makefile installs several versions of the libraries, but we only
31# need one of them, depending on the platform.
32
33# Upstream installs libraries into usr/lib/imx-mm, but the dynamic
34# loader only looks in usr/lib, so move the libraries there
35define IMX_PARSER_FIXUP_TARGET_PATH
36	find $(TARGET_DIR)/usr/lib/imx-mm -not -type d \
37		-exec mv {} $(TARGET_DIR)/usr/lib \;
38	rm -rf $(TARGET_DIR)/usr/lib/imx-mm
39endef
40IMX_PARSER_POST_INSTALL_TARGET_HOOKS += IMX_PARSER_FIXUP_TARGET_PATH
41
42$(eval $(autotools-package))
43