openocd: avoid documentation rebuild to fix build issues
[buildroot-gz.git] / package / nvidia-tegra23 / nvidia-tegra23-binaries / nvidia-tegra23-binaries.mk
blob4f7cdcf6d658b23ceb97789caff3e2f369657c84
1 ################################################################################
3 # nvidia-tegra23-binaries
5 ################################################################################
7 NVIDIA_TEGRA23_BINARIES_VERSION = $(NVIDIA_TEGRA23_VERSION)
8 NVIDIA_TEGRA23_BINARIES_SITE = $(NVIDIA_TEGRA23_SITE)
9 NVIDIA_TEGRA23_BINARIES_SOURCE = $(NVIDIA_TEGRA23_BASE)_R$(NVIDIA_TEGRA23_BINARIES_VERSION)_armhf.tbz2
11 NVIDIA_TEGRA23_BINARIES_LICENSE = License For Customer Use of NVIDIA Software
12 NVIDIA_TEGRA23_BINARIES_LICENSE_FILES = nv_tegra/LICENSE
13 ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS),y)
14 NVIDIA_TEGRA23_BINARIES_LICENSE += LGPLv2.1
15 NVIDIA_TEGRA23_BINARIES_LICENSE_FILES += nv_tegra/nv_sample_apps/LICENSE.gst-openmax
16 endif
18 NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES
20 # Those are not really needed to build nvidia-tegra23-binaries, but
21 # will be needed by packages who link against libraries provided by
22 # nvidia-tegra23-binaries.
24 NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = mesa3d-headers \
25 xlib_libX11 xlib_libXext
27 ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS),y)
28 NVIDIA_TEGRA23_BINARIES_DEPENDENCIES += xlib_libXv
29 endif
31 NVIDIA_TEGRA23_BINARIES_PROVIDES = libegl libgles libopenmax
33 NVIDIA_TEGRA23_BINARIES_DRV = \
34 nv_tegra/nvidia_drivers/usr/lib/xorg/modules/drivers/tegra_drv.abi$(BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI).so
36 define NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER
37 $(INSTALL) -d $(@D)/nv_tegra/nvidia_drivers
38 $(call suitable-extractor,$(@D)/nv_tegra/nvidia_drivers.tbz2) \
39 $(@D)/nv_tegra/nvidia_drivers.tbz2 | \
40 $(TAR) --strip-components=0 -C $(@D)/nv_tegra/nvidia_drivers/ $(TAR_OPTIONS) -
41 $(INSTALL) -d $(@D)/nv_tegra/nv_sample_apps/nvgstapps
42 $(call suitable-extractor,$(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2) \
43 $(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2 | \
44 $(TAR) --strip-components=0 -C $(@D)/nv_tegra/nv_sample_apps/nvgstapps/ $(TAR_OPTIONS) -
45 endef
46 NVIDIA_TEGRA23_BINARIES_POST_EXTRACT_HOOKS += NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER
48 define NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS
49 mkdir -p $(1)/usr/lib
50 cp -dpfr $(@D)/nv_tegra/nvidia_drivers/usr/lib/*.so $(1)/usr/lib/
51 (cd $(1)/usr/lib; \
52 ln -sf libGLESv2.so.2 libGLESv2.so; \
53 ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so; \
54 ln -sf libEGL.so.1 libEGL.so \
56 endef
58 ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS),y)
59 define NVIDIA_TEGRA23_BINARIES_INSTALL_GST_PLUGINS
60 mkdir -p $(1)/usr/lib/gstreamer-0.10/
61 cp -dpfr $(@D)/nv_tegra/nv_sample_apps/nvgstapps/usr/lib/gstreamer-0.10/*.so \
62 $(1)/usr/lib/gstreamer-0.10/
63 endef
64 endif
66 ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_NV_SAMPLE_APPS),y)
67 define NVIDIA_TEGRA23_BINARIES_INSTALL_APPS
68 mkdir -p $(TARGET_DIR)/usr/bin/
69 cp -dpfr $(@D)/nv_tegra/nv_sample_apps/nvgstapps/usr/bin/* \
70 $(TARGET_DIR)/usr/bin/
71 endef
72 endif
74 define NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING_CMDS
75 $(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(STAGING_DIR))
76 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig/
77 cp -dpfr package/nvidia-tegra23/nvidia-tegra23-binaries/*.pc \
78 $(STAGING_DIR)/usr/lib/pkgconfig/
79 $(call NVIDIA_TEGRA23_BINARIES_INSTALL_GST_PLUGINS,$(STAGING_DIR))
80 endef
82 define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS
83 $(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(TARGET_DIR))
84 mkdir -p $(TARGET_DIR)/lib/firmware/
85 cp -dpfr $(@D)/nv_tegra/nvidia_drivers/lib/firmware/*.bin \
86 $(TARGET_DIR)/lib/firmware/
87 $(INSTALL) -D -m 0644 $(@D)/nv_tegra/nvidia_drivers/etc/nv_tegra_release \
88 $(TARGET_DIR)/etc/nv_tegra_release
89 $(INSTALL) -D -m 0644 $(@D)/$(NVIDIA_TEGRA23_BINARIES_DRV) \
90 $(TARGET_DIR)/usr/lib/xorg/modules/drivers/tegra_drv.so
91 $(call NVIDIA_TEGRA23_BINARIES_INSTALL_GST_PLUGINS,$(TARGET_DIR))
92 $(NVIDIA_TEGRA23_BINARIES_INSTALL_APPS)
93 endef
95 $(eval $(generic-package))