iptables: bump to version 1.6.1
[buildroot-gz.git] / package / freescale-imx / imx-gpu-viv / imx-gpu-viv.mk
blob961f574c8bc80f195bf229c58979e144e17f8e6d
1 ################################################################################
3 # imx-gpu-viv
5 ################################################################################
7 IMX_GPU_VIV_VERSION = 5.0.11.p8.6-hfp
8 IMX_GPU_VIV_SITE = $(FREESCALE_IMX_SITE)
9 IMX_GPU_VIV_SOURCE = imx-gpu-viv-$(IMX_GPU_VIV_VERSION).bin
11 IMX_GPU_VIV_INSTALL_STAGING = YES
13 IMX_GPU_VIV_LICENSE = NXP Semiconductor Software License Agreement
14 IMX_GPU_VIV_LICENSE_FILES = EULA COPYING
15 IMX_GPU_VIV_REDISTRIBUTE = NO
17 IMX_GPU_VIV_PROVIDES = libegl libgles libopenvg
18 IMX_GPU_VIV_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_IMX_GPU_VIV_OUTPUT))
20 ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11)
21 # The libGAL.so library provided by imx-gpu-viv uses X functions. Packages
22 # may want to link against libGAL.so (QT5 Base with OpenGL and X support
23 # does so). For this to work we need build dependencies to libXdamage,
24 # libXext and libXfixes so that X functions used in libGAL.so are referenced.
25 IMX_GPU_VIV_DEPENDENCIES += xlib_libXdamage xlib_libXext xlib_libXfixes
26 endif
28 define IMX_GPU_VIV_EXTRACT_CMDS
29 $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(IMX_GPU_VIV_SOURCE))
30 endef
32 # Instead of building, we fix up the inconsistencies that exist
33 # in the upstream archive here.
34 # Make sure these commands are idempotent.
35 define IMX_GPU_VIV_BUILD_CMDS
36 $(SED) 's/defined(LINUX)/defined(__linux__)/g' $(@D)/gpu-core/usr/include/*/*.h
37 ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so
38 ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1
39 ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1.2.0
40 ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so
41 ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so.1
42 ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so.1.0
43 ln -sf libGLESv2-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGLESv2.so
44 ln -sf libGLESv2-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGLESv2.so.2
45 ln -sf libGLESv2-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGLESv2.so.2.0.0
46 ln -sf libVIVANTE-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libVIVANTE.so
47 ln -sf libGAL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGAL.so
48 endef
50 ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
51 define IMX_GPU_VIV_FIXUP_FB_HEADERS
52 $(SED) '39i\
53 #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\
54 #define EGL_API_FB \n\
55 #endif' $(STAGING_DIR)/usr/include/EGL/eglvivante.h
56 endef
57 endif
59 ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_G2D),y)
60 define IMX_GPU_VIV_INSTALL_G2D_STAGING
61 cp -dpfr $(@D)/g2d/usr/include/* $(STAGING_DIR)/usr/include/
62 cp -dpfr $(@D)/g2d/usr/lib/* $(STAGING_DIR)/usr/lib/
63 endef
64 endif
66 define IMX_GPU_VIV_INSTALL_STAGING_CMDS
67 cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr
68 $(IMX_GPU_VIV_FIXUP_FB_HEADERS)
69 $(IMX_GPU_VIV_INSTALL_G2D_STAGING)
70 for lib in egl glesv2 vg; do \
71 $(INSTALL) -m 0644 -D \
72 $(@D)/gpu-core/usr/lib/pkgconfig/$${lib}.pc \
73 $(STAGING_DIR)/usr/lib/pkgconfig/$${lib}.pc; \
74 done
75 endef
77 ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_APITRACE),y)
78 IMX_GPU_VIV_DEPENDENCIES += libpng
79 ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11)
80 define IMX_GPU_VIV_INSTALL_APITRACE
81 cp -dpfr $(@D)/apitrace/x11/usr/bin/* $(TARGET_DIR)/usr/bin/
82 cp -dpfr $(@D)/apitrace/x11/usr/lib/* $(TARGET_DIR)/usr/lib/
83 endef
84 else
85 define IMX_GPU_VIV_INSTALL_APITRACE
86 cp -dpfr $(@D)/apitrace/non-x11/usr/bin/* $(TARGET_DIR)/usr/bin/
87 cp -dpfr $(@D)/apitrace/non-x11/usr/lib/* $(TARGET_DIR)/usr/lib/
88 endef
89 endif
90 endif
92 ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES),y)
93 define IMX_GPU_VIV_INSTALL_EXAMPLES
94 mkdir -p $(TARGET_DIR)/usr/share/examples/
95 cp -r $(@D)/gpu-demos/opt/* $(TARGET_DIR)/usr/share/examples/
96 endef
97 endif
99 ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_G2D),y)
100 define IMX_GPU_VIV_INSTALL_G2D
101 cp -dpfr $(@D)/g2d/usr/lib/* $(TARGET_DIR)/usr/lib/
102 endef
103 endif
105 ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_GMEM_INFO),y)
106 define IMX_GPU_VIV_INSTALL_GMEM_INFO
107 cp -dpfr $(@D)/gpu-tools/gmem-info/usr/bin/* $(TARGET_DIR)/usr/bin/
108 endef
109 endif
111 # On the target, remove the unused libraries.
112 # Note that this is _required_, else ldconfig may create symlinks
113 # to the wrong library
114 define IMX_GPU_VIV_INSTALL_TARGET_CMDS
115 $(IMX_GPU_VIV_INSTALL_APITRACE)
116 $(IMX_GPU_VIV_INSTALL_EXAMPLES)
117 $(IMX_GPU_VIV_INSTALL_G2D)
118 $(IMX_GPU_VIV_INSTALL_GMEM_INFO)
119 cp -a $(@D)/gpu-core/usr/lib $(TARGET_DIR)/usr
120 for lib in EGL GAL VIVANTE GLESv2; do \
121 for f in $(TARGET_DIR)/usr/lib/lib$${lib}-*.so; do \
122 case $$f in \
123 *-$(IMX_GPU_VIV_LIB_TARGET).so) : ;; \
124 *) $(RM) $$f ;; \
125 esac; \
126 done; \
127 done
128 endef
130 $(eval $(generic-package))