1 ################################################################################
5 ################################################################################
7 # last sha1 character dropped to ensure unique filename
8 SUNXI_MALI_VERSION
= d343311efc8db166d8371b28494f0f27b6a5872
9 SUNXI_MALI_SITE
= https
://github.com
/linux-sunxi
/sunxi-mali
10 SUNXI_MALI_SITE_METHOD
= git
12 # Get the sunxi-mali-proprietary libraries
13 SUNXI_MALI_GIT_SUBMODULES
= YES
15 SUNXI_MALI_INSTALL_STAGING
= YES
16 SUNXI_MALI_DEPENDENCIES
= libump
17 SUNXI_MALI_PROVIDES
= libegl libgles
19 # The options below must be provided in the environment. Providing these
20 # through options overrides the value and prevents the makefiles from
21 # appending to these variables. This is used throughout the sunxi-mali build
24 # Furthermore, the -lm -dl -lpthread options are included due to a possible bug
25 # in the way the linaro 2013.06 toolchain handles shared libraries.
26 SUNXI_MALI_MAKE_ENV
= \
28 CFLAGS
="$(TARGET_CFLAGS) -lm -ldl -lpthread" \
31 ifeq ($(BR2_ARM_EABIHF
),y
)
32 SUNXI_MALI_MAKE_OPTS
+= ABI
=armhf
34 SUNXI_MALI_MAKE_OPTS
+= ABI
=armel
37 SUNXI_MALI_MAKE_OPTS
+= EGL_TYPE
=framebuffer
39 ifeq ($(BR2_PACKAGE_SUNXI_MALI_R2P4
),y
)
40 SUNXI_MALI_MAKE_OPTS
+= VERSION
=r2p4
42 ifeq ($(BR2_PACKAGE_SUNXI_MALI_R3P0
),y
)
43 SUNXI_MALI_MAKE_OPTS
+= VERSION
=r3p0
45 ifeq ($(BR2_PACKAGE_SUNXI_MALI_R3P1
),y
)
46 SUNXI_MALI_MAKE_OPTS
+= VERSION
=r3p1
49 define SUNXI_MALI_BUILD_CMDS
50 $(SUNXI_MALI_MAKE_ENV
) $(MAKE
) -C
$(@D
) $(SUNXI_MALI_MAKE_OPTS
) all
51 $(TARGET_CC
) $(TARGET_CFLAGS
) -o
$(@D
)/version
/version \
52 $(@D
)/version
/version.c
55 define SUNXI_MALI_INSTALL_STAGING_CMDS
56 $(SUNXI_MALI_MAKE_ENV
) $(MAKE
) -C
$(@D
) \
57 $(SUNXI_MALI_MAKE_OPTS
) DESTDIR
=$(STAGING_DIR
) install
58 # test must be built after install because it depends on headers that are
59 # generated during the install above.
60 $(SUNXI_MALI_MAKE_ENV
) $(MAKE
) -C
$(@D
) $(SUNXI_MALI_MAKE_OPTS
) test
61 $(INSTALL
) -D
-m
0644 package
/sunxi-mali
/egl.
pc \
62 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/egl.
pc
63 $(INSTALL
) -D
-m
0644 package
/sunxi-mali
/glesv2.
pc \
64 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/glesv2.
pc
67 define SUNXI_MALI_INSTALL_TARGET_CMDS
68 $(SUNXI_MALI_MAKE_ENV
) $(MAKE
) -C
$(@D
)/lib \
69 $(SUNXI_MALI_MAKE_OPTS
) DESTDIR
=$(TARGET_DIR
) install
70 $(if
$(BR2_PACKAGE_SUNXI_MALI_DBG
),
71 $(INSTALL
) -m
755 $(@D
)/version
/version
$(TARGET_DIR
)/usr
/bin
/maliver
; \
72 $(INSTALL
) -m
755 $(@D
)/test/test $(TARGET_DIR
)/usr
/bin
/malitest
76 define SUNXI_MALI_INSTALL_INIT_SYSV
77 $(INSTALL
) -D
-m
0755 package
/sunxi-mali
/S80mali \
78 $(TARGET_DIR
)/etc
/init.d
/S80mali
81 $(eval
$(generic-package
))