Skip to content

Instantly share code, notes, and snippets.

@Flow86

Flow86/test.bb Secret

Last active July 11, 2016 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Flow86/150dfbd30f002c39ebdf619142af9a00 to your computer and use it in GitHub Desktop.
Save Flow86/150dfbd30f002c39ebdf619142af9a00 to your computer and use it in GitHub Desktop.
SRCREV_0 = "r140330"
LICENSE = "CLOSED"
ALLOW_EMPTY_${PN} = "1"
SECTION = "custom"
FILES_${PN}-dev += "/opt/test/include/* /opt/test/lib/*.a /opt/test/lib/lib*.so"
RDEPENDS_${PN} = "boost-system"
S = "${WORKDIR}/trunk"
SRC_URI = "svn://$$secret$$/libtest;protocol=http;module=trunk;rev=${SRCREV_0} "
PACKAGES = "${PN} ${PN}-dbg ${PN}-dev"
PR = "r10750"
PV = "2.0.5"
DESCRIPTION = "blablalba"
RPROVIDES_${PN} = "libtest"
DEPENDS = "boost"
PROVIDES = "libtest"
FILES_${PN}-dbg += "/opt/test/bin/.debug/* /opt/test/lib/.debug/*"
FILES_${PN} += "/opt/test/bin/* /opt/test/lib/lib*.so.*"
do_install() {
install -d -m 0755 ${D}/opt/test/lib
install -m 0755 ${S}/build/./libtest.so.2.0.5 ${D}/opt/test/lib/libtest.so.2.0.5
ln -s libtest.so.2.0.5 ${D}/opt/test/lib/libtest.so
ln -s libtest.so.2.0.5 ${D}/opt/test/lib/libtest.so.2
ln -s libtest.so.2.0.5 ${D}/opt/test/lib/libtest.so.2.0
install -d -m 0755 ${D}/opt/test/include/libtest
test -f ${S}/filea.hpp && install -m 0755 ${S}/filea.hpp ${D}/opt/test/include/libtest/filea.hpp || install -m 0755 ${S}/build/filea.hpp ${D}/opt/test/include/libtest/filea.hpp
test -f ${S}/fileb.hpp && install -m 0755 ${S}/fileb.hpp ${D}/opt/test/include/libtest/fileb.hpp || install -m 0755 ${S}/build/fileb.hpp ${D}/opt/test/include/libtest/fileb.hpp
}
do_compile() {
mkdir -p ${S}/build
arm-poky-linux-gnueabi-g++ -o ${S}/build/filea.os -c -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -pipe -feliminate-unused-debug-types -fPIC --sysroot=$$strip$$/armv7a-vfp-neon-poky-linux-gnueabi -fPIC $CXXFLAGS -I${STAGING_DIR_TARGET}/opt/test/include ${S}/filea.cpp
arm-poky-linux-gnueabi-g++ -o ${S}/build/fileb.os -c -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -pipe -feliminate-unused-debug-types -fPIC --sysroot=$$strip$$/armv7a-vfp-neon-poky-linux-gnueabi -fPIC $CXXFLAGS -I${STAGING_DIR_TARGET}/opt/test/include ${S}/fileb.cpp
arm-poky-linux-gnueabi-g++ -o ${S}/build/libtest.so.2.0.5 -shared -Wl,-Bsymbolic -Wl,-soname=libtest.so.2 ${S}/build/fileb.os ${S}/build/filea.os -lpthread -lboost_system
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment