* Split build into configure, compile, and install tasks
* Install relative to ${D}
* Add missing dependency
* Add files to a package

Signed-off-by: Jacob Stiffler <[email protected]>
---
 .../recipes-ti/ocl-rtos/opencl-rtos_git.bb         | 44 ++++++++++++++--------
 1 file changed, 29 insertions(+), 15 deletions(-)

diff --git a/meta-arago-extras/recipes-ti/ocl-rtos/opencl-rtos_git.bb 
b/meta-arago-extras/recipes-ti/ocl-rtos/opencl-rtos_git.bb
index 26dd596..0c9aca7 100644
--- a/meta-arago-extras/recipes-ti/ocl-rtos/opencl-rtos_git.bb
+++ b/meta-arago-extras/recipes-ti/ocl-rtos/opencl-rtos_git.bb
@@ -22,6 +22,7 @@ DEPENDS = "cmake-native \
            ti-ipc-rtos  \
            opencl-monitor-rtos  \
            clocl-rtos-native  \
+           ti-cgt6x-native \
 "
 
 #RDEPENDS_${PN}-dev += " opencl-monitor-rtos"
@@ -30,6 +31,7 @@ ALLOW_EMPTY_${PN}-runtime = "1"
 
 
 S = "${WORKDIR}/git/host"
+B = "${WORKDIR}/build"
 
 export WANT_LLVM_RELEASE = "3.6-ti"
 
@@ -42,25 +44,21 @@ RELEASE_TARGET_omap-a15 = "am57xx"
 
 export TI_OCL_CGT_INSTALL = "${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x"
 export ARM_LLVM_DIR="${LLVM_RTOS_INSTALL_DIR}"
-export 
DESTDIR="${OCL_RTOS_INSTALL_DIR}/ti-opencl-rtos-${RELEASE_TARGET}-${PV}/packages/ti/opencl"
+export 
DESTDIR="${D}${OCL_RTOS_INSTALL_DIR_RECIPE}/ti-opencl-rtos-${RELEASE_TARGET}-${PV}/packages/ti/opencl"
 
 # Required for eclipse plugin and packages
 export XDC_DIR = "${XDC_INSTALL_DIR}"
 export BIOS_DIR = "${SYSBIOS_INSTALL_DIR}"
 export IPC_DIR = "${IPC_INSTALL_DIR}"
 
-do_compile() {
-
-    echo "LLVM_RTOS_INSTALL_DIR=${LLVM_RTOS_INSTALL_DIR}"
-
+do_configure() {
     unset LDFLAGS
     unset TARGET_LDFLAGS
 
-    cd ${WORKDIR}
-    rm -rf build
+    rm -rf "${B}"
 
-    mkdir -p build
-    cd build; cmake \
+    mkdir -p "${B}"
+    cd "${B}"; cmake \
         -DCMAKE_TOOLCHAIN_FILE=../git/host/cmake/CMakeBiosARMToolChain.txt \
         -DBUILD_TARGET=${OCL_BUILD_TARGET} \
         -DBUILD_OUTPUT=lib \
@@ -71,14 +69,30 @@ do_compile() {
         -DBIOS_INSTALL_PATH=${SYSBIOS_INSTALL_DIR}/packages \
         -DLOKI_INCLUDE_PATH=${STAGING_DIR_HOST}/usr/include/loki \
         -DARM_LLVM_DIR=${ARM_LLVM_DIR} \
-        -DOCL_VERSION=${PV} ../git/host;
-    make install
-    make -C packages install
-    cd ..
+        -DOCL_VERSION=${PV} "${S}";
+}
+
+do_compile() {
+    unset LDFLAGS
+    unset TARGET_LDFLAGS
+
+    oe_runmake
+    oe_runmake -C packages
 }
 
 # Install x86/Linux clocl built by clocl-rtos-native recipe
 do_install() {
-    install -d ${DESTDIR}/usr/share/ti/opencl/bin/x86
-    install -m 755 
${STAGING_DIR_NATIVE}/usr/share/ti/ti-opencl-rtos-tree/bin/x86/clocl 
${DESTDIR}/usr/share/ti/opencl/bin/x86
+    unset LDFLAGS
+    unset TARGET_LDFLAGS
+
+    oe_runmake install
+    oe_runmake -C packages install
+
+    install -d ${D}/usr/share/ti/opencl/bin/x86
+    install -m 755 
${STAGING_DIR_NATIVE}/usr/share/ti/ti-opencl-rtos-tree/bin/x86/clocl 
${D}/usr/share/ti/opencl/bin/x86
 }
+
+FILES_${PN}-dev += "/usr/share/ti/opencl ${OCL_RTOS_INSTALL_DIR_RECIPE}"
+
+INSANE_SKIP_${PN} = "already-stripped"
+INSANE_SKIP_${PN}-dev = "staticdev file-rdeps arch"
-- 
2.7.4

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to