libbcmhost-shim: new shim library for r-pi's bcm stuff
[openpandora.oe.git] / recipes / armhf / libbcmhost-shim_0.1.bb
1 DESCRIPTION = "Shim library for libbcm_host.so found in r-pi"
2 SECTION = "libs"
3 PRIORITY = "optional"
4 LICENSE = "BSD-3-Clause"
5 RDEPENDS = "armhflibc6"
6 PR = "r0"
7
8 SRC_URI = " \
9   file://bcm_host_shim.c \
10   file://Makefile \
11 "
12
13 # S = "${WORKDIR}/git"
14
15 # assumes armhf (arm-unknown-linux-gnueabihf) cross-compiler is available in PATH
16 # with all required deps
17 do_compile() {
18   cp ${WORKDIR}/bcm_host_shim.c ${S}/
19   cp ${WORKDIR}/Makefile ${S}/
20
21   unset CPP
22   unset CC
23   unset LD
24   unset CPPFLAGS
25   unset CFLAGS
26   unset LDFLAGS
27   export LDFLAGS="-Wl,--hash-style=gnu"
28   make CROSS_COMPILE=arm-unknown-linux-gnueabihf-
29 }
30
31 do_install() {
32   install -d ${D}/usr/lib/arm-linux-gnueabihf
33   install -m 0755 libbcm_host.so ${D}/usr/lib/arm-linux-gnueabihf/
34 }
35
36 FILES_${PN} = "usr/lib/arm-linux-gnueabihf/*.so"
37 FILES_${PN}-dbg += "usr/lib/arm-linux-gnueabihf/.debug"