Change-Id: I18f41c1cd3a0b1158e96e6d2d4455268700d3496
Signed-off-by: Andrei Gherzan <and...@gherzan.ro>
---
 recipes-bcm/bcm2835/bcm2835_1.36.bb | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/recipes-bcm/bcm2835/bcm2835_1.36.bb 
b/recipes-bcm/bcm2835/bcm2835_1.36.bb
index b5d9992..6997565 100644
--- a/recipes-bcm/bcm2835/bcm2835_1.36.bb
+++ b/recipes-bcm/bcm2835/bcm2835_1.36.bb
@@ -8,7 +8,6 @@ AUTHOR = "Mike McCauley (mi...@open.com.au)"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-
 COMPATIBLE_MACHINE = "raspberrypi"
 
 SRC_URI = "http://www.open.com.au/mikem/bcm2835/bcm2835-${PV}.tar.gz";
@@ -16,26 +15,26 @@ SRC_URI = 
"http://www.open.com.au/mikem/bcm2835/bcm2835-${PV}.tar.gz";
 SRC_URI[md5sum] = "3299ddaef60f80b7f85de3318f08dee7"
 SRC_URI[sha256sum] = 
"b4dfcdb453d44ba9ff55634ce7e0ddca21b96355ab61e40b4c3afb9406d4b8d2"
 
-PACKAGES += "${PN}-tests"
-
-FILES_${PN} = ""
-FILES_${PN}-tests = "${libdir}/${BPN}"
-FILES_${PN}-dbg += "${libdir}/${BPN}/.debug"
-
 inherit autotools
 
 do_compile_append() {
-    #Now compiling the examples provided by the package
-    for file in examples/*
-    do
-        ${CC} ${file}/${file##*/}.c -o ${file}/${file##*/} -Bstatic -L${S}/src 
-lbcm2835 -I${S}/src
+    # Now compiling the examples provided by the package
+    mkdir -p ${B}/examples
+    for file in `ls ${S}/examples`; do
+        ${CC} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} 
-Bstatic -L${B}/src -lbcm2835 -I${S}/src
     done
 }
 
 do_install_append() {
     install -d ${D}/${libdir}/${BPN}
-    for file in examples/*
+    for file in ${B}/examples/*
     do
-        install -m 0755 ${file}/${file##*/} ${D}/${libdir}/${BPN}
+        install -m 0755 ${file} ${D}/${libdir}/${BPN}
     done
 }
+
+PACKAGES += "${PN}-tests"
+
+FILES_${PN} = ""
+FILES_${PN}-tests = "${libdir}/${BPN}"
+FILES_${PN}-dbg += "${libdir}/${BPN}/.debug"
-- 
1.8.5.3

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to