summaryrefslogtreecommitdiffstats
path: root/bindings/samples/HelloWorld.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-02-27 14:52:35 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2018-02-27 14:52:35 +0100
commit24d000c2290126abf88204089d132229d63f9a05 (patch)
tree9c4d84f92d7c89320d754d1aa837954afe73ec87 /bindings/samples/HelloWorld.c
parentbd10bc4405f3777fe495cb9f62818d67ab584854 (diff)
Update date of copyright notices
Change-Id: If9d7e7728df086fbb7214f1de5cbec35cd2f1d9b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'bindings/samples/HelloWorld.c')
-rw-r--r--bindings/samples/HelloWorld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bindings/samples/HelloWorld.c b/bindings/samples/HelloWorld.c
index 134ea620..fef87d2d 100644
--- a/bindings/samples/HelloWorld.c
+++ b/bindings/samples/HelloWorld.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015, 2016, 2017 "IoT.bzh"
+ * Copyright (C) 2015-2018 "IoT.bzh"
* Author "Fulup Ar Foll"
*
* Licensed under the Apache License, Version 2.0 (the "License");
ight .n { color: #f8f8f2 } /* Name */ .highlight .o { color: #f92672 } /* Operator */ .highlight .p { color: #f8f8f2 } /* Punctuation */ .highlight .ch { color: #75715e } /* Comment.Hashbang */ .highlight .cm { color: #75715e } /* Comment.Multiline */ .highlight .cp { color: #75715e } /* Comment.Preproc */ .highlight .cpf { color: #75715e } /* Comment.PreprocFile */ .highlight .c1 { color: #75715e } /* Comment.Single */ .highlight .cs { color: #75715e } /* Comment.Special */ .highlight .gd { color: #f92672 } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gi { color: #a6e22e } /* Generic.Inserted */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #75715e } /* Generic.Subheading */ .highlight .kc { color: #66d9ef } /* Keyword.Constant */ .highlight .kd { color: #66d9ef } /* Keyword.Declaration */ .highlight .kn { color: #f92672 } /* Keyword.Namespace */ .highlight .kp { color: #66d9ef } /* Keyword.Pseudo */ .highlight .kr { color: #66d9ef } /* Keyword.Reserved */ .highlight .kt { color: #66d9ef } /* Keyword.Type */ .highlight .ld { color: #e6db74 } /* Literal.Date */ .highlight .m { color: #ae81ff } /* Literal.Number */ .highlight .s { color: #e6db74 } /* Literal.String */ .highlight .na { color: #a6e22e } /* Name.Attribute */ .highlight .nb { color: #f8f8f2 } /* Name.Builtin */ .highlight .nc { color: #a6e22e } /* Name.Class */ .highlight .no { color: #66d9ef } /* Name.Constant */ .highlight .nd { color: #a6e22e } /* Name.Decorator */ .highlight .ni { color: #f8f8f2 } /* Name.Entity */ .highlight .ne { color: #a6e22e } /* Name.Exception */ .highlight .nf { color: #a6e22e } /* Name.Function */ .highlight .nl { color: #f8f8f2 } /* Name.Label */ .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ .highlight .nx { color: #a6e22e } /* Name.Other */ .highlight .py { color: #f8f8f2 } /* Name.Property */ .highlight .nt { color: #f92672 } /* Name.Tag */ .highlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sa { color: #e6db74 } /* Literal.String.Affix */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#
# aglwgt bbclass
#
# Jan-Simon Moeller, jsmoeller@linuxfoundation.org
#
# This class expects a "make package" target in the makefile
# which creates the wgt files in the package/ subfolder.
# The makefile needs to use wgtpkg-pack.
#

# 'wgtpkg-pack' in af-main-native is required.
DEPENDS_append = " af-main-native"

# for bindings af-binder is required.
DEPENDS_append = " af-binder"

# for bindings that use the cmake-apps-module
DEPENDS_append = " cmake-apps-module-native"

# for hal bindings genskel is required.
DEPENDS_append = " af-binder-devtools-native"

# Re-enable strip for qmake based projects (default value is "echo")
OE_QMAKE_STRIP = "${STRIP}"

# Extra build arguments passed to the autobuild script invocations
AGLWGT_EXTRA_BUILD_ARGS ?= 'VERBOSE=TRUE BUILD_ARGS="${PARALLEL_MAKE}"'

# CMake based widgets that inherit cmake.bbclass will have the
# following automatically appended to AGLWGT_EXTRA_BUILD_ARGS as
# the value of CONFIGURE_FLAGS.  This definition may need to be
# extended to include more of what is passed in cmake.bbclass's
# do_configure if it is found insufficient.  Using the generated
# toolchain.cmake file does fix issues with respect to finding the
# Qt5 CMake modules that seem difficult to fix otherwise, so at the
# very minimum it should be present.
AGLWGT_CMAKE_CONFIGURE_ARGS ?= "-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake ${EXTRA_OECMAKE}"

# Only widgets with recipe names starting with agl-service- are
# assumed to have tests by default, set this to "1" to force
# building/packaging of the test widget for other widgets.
AGLWGT_HAVE_TESTS ?= "0"

# Whether the widget should be auto-installed on first boot
AGLWGT_AUTOINSTALL ?= "1"

# Signature keys
# These are default keys for development purposes !
# Change it for production.
WGTPKG_AUTOSIGN_0_agl-sign-wgts ??= "${WORKDIR}/recipe-sysroot-native/usr/share/afm/keys/developer.key.pem:${WORKDIR}/recipe-sysroot-native/usr/share/afm/certs/developer.cert.pem"
WGTPKG_AUTOSIGN_1_agl-sign-wgts ??= "${WORKDIR}/recipe-sysroot-native/usr/share/afm/keys/platform.key.pem:${WORKDIR}/recipe-sysroot-native/usr/share/afm/certs/platform.cert.pem"

export WGTPKG_AUTOSIGN_0
export WGTPKG_AUTOSIGN_1

python __anonymous () {
    # NOTE: AGLWGT_CMAKE_CONFIGURE_ARGS is not updated directly here,
    #       but via the prefunc below to avoid issues around anonymous
    #       python ordering conflicts with e.g. externalsrc.bbclass.
    if bb.data.inherits_class("cmake", d):
        d.appendVarFlag('do_compile', 'prefuncs', ' aglwgt_cmake_configure')
}

python aglwgt_cmake_configure () {
    # Define CONFIGURE_FLAGS appropriately if cmake.bbclass has been
    # inherited, see description of AGLWGT_CMAKE_CONFIGURE_ARGS above
    # for more details.
    cmake_config_args = d.getVar("AGLWGT_CMAKE_CONFIGURE_ARGS")
    if bb.data.inherits_class("cmake", d) and cmake_config_args:
        d.appendVar("AGLWGT_EXTRA_BUILD_ARGS", ' CONFIGURE_ARGS="' + cmake_config_args + '"')
        d.appendVarFlag("AGLWGT_EXTRA_BUILD_ARGS", "vardeps", " AGLWGT_CMAKE_CONFIGURE_ARGS")
}

# Placeholder to keep things like externalsrc that prefunc or append
# do_configure working as expected.
aglwgt_do_configure() {
    true
}

aglwgt_do_compile() {
    bldcmd=${S}/autobuild/agl/autobuild
    if [ ! -x "$bldcmd" ]; then
        bbfatal "Missing autobuild/agl/autobuild script"
    fi

    if [ "${S}" != "${B}" ]; then
        rm -rf ${B}
        mkdir -p ${B}
        cd ${B}
    fi

    $bldcmd package BUILD_DIR=${B}/build-release ${AGLWGT_EXTRA_BUILD_ARGS}
    $bldcmd package-debug BUILD_DIR_DEBUG=${B}/build-debug ${AGLWGT_EXTRA_BUILD_ARGS}

    if echo ${BPN} | grep -q '^agl-service-' || [ "${AGLWGT_HAVE_TESTS}" = "1" ]; then
        # Only try building the test widget if there's source for it, to avoid spurious errors
        if [ -f ${S}/test/CMakeLists.txt ]; then
            $bldcmd package-test BUILD_DIR_TEST=${B}/build-test ${AGLWGT_EXTRA_BUILD_ARGS}
        fi

        # The coverage widget should always build
        $bldcmd package-coverage BUILD_DIR_COVERAGE=${B}/build-coverage ${AGLWGT_EXTRA_BUILD_ARGS}
    fi
}

POST_INSTALL_LEVEL ?= "10"
POST_INSTALL_SCRIPT ?= "${POST_INSTALL_LEVEL}-${PN}.sh"

EXTRA_WGT_POSTINSTALL ?= ""

aglwgt_do_install() {
    DEST=release
    if [ "${AGLWGT_AUTOINSTALL_${PN}}" = "0" ]; then
        DEST=manualinstall
    fi

    if [ "$(find ${B}/build-release -name '*.wgt' -maxdepth 1)" ]; then
        install -d ${D}/usr/AGL/apps/$DEST
        install -m 0644 ${B}/build-release/*.wgt ${D}/usr/AGL/apps/$DEST/
    else
        bbfatal "no package found in widget directory"
    fi

    for t in debug coverage test; do
        if [ "$(find ${B}/build-${t} -name *-${t}.wgt -maxdepth 1)" ]; then
            install -d ${D}/usr/AGL/apps/${t}
            install -m 0644 ${B}/build-${t}/*-${t}.wgt ${D}/usr/AGL/apps/${t}/
        elif [ "$t" = "debug" ]; then
            bbfatal "no package found in ${t} widget directory"
        elif echo ${BPN} | grep -q '^agl-service-' || [ "${AGLWGT_HAVE_TESTS}" = "1" ]; then
            if [ "$t" = "coverage" -o -f ${S}/test/CMakeLists.txt ]; then
                bbfatal "no package found in ${t} widget directory"
            fi
        fi
    done

    if [ "${AGLWGT_AUTOINSTALL}" != "0" ]; then
        # For now assume autoinstall of the release versions
        rm -rf ${D}/usr/AGL/apps/autoinstall
        ln -sf release ${D}/usr/AGL/apps/autoinstall

        APP_FILES=""
        for file in ${D}/usr/AGL/apps/autoinstall/*.wgt; do
            APP_FILES="${APP_FILES} $(basename $file)";
        done
        install -d ${D}/${sysconfdir}/agl-postinsts
        cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} <<EOF
#!/bin/sh -e
for file in ${APP_FILES}; do
    /usr/bin/afm-install install /usr/AGL/apps/autoinstall/\$file
done
sync
${EXTRA_WGT_POSTINSTALL}
EOF
        chmod a+x ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT}
    fi
}

PACKAGES += "${PN}-test ${PN}-debug ${PN}-coverage"

FILES_${PN} += " \
    /usr/AGL/apps/release/*.wgt \
    /usr/AGL/apps/autoinstall \
    /usr/AGL/apps/manualinstall \
    ${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} \
"
FILES_${PN}-test = "/usr/AGL/apps/test/*.wgt"
FILES_${PN}-debug = "/usr/AGL/apps/debug/*.wgt"
FILES_${PN}-coverage = "/usr/AGL/apps/coverage/*.wgt"

# Test widgets need the parent widget and the test framework
RDEPENDS_${PN}-test = "${PN} afb-test"

EXPORT_FUNCTIONS do_configure do_compile do_install