diff options
Diffstat (limited to 'yocto-poky/documentation/ref-manual/examples/hello-single')
-rw-r--r-- | yocto-poky/documentation/ref-manual/examples/hello-single/files/helloworld.c | 8 | ||||
-rw-r--r-- | yocto-poky/documentation/ref-manual/examples/hello-single/hello.bb | 17 |
2 files changed, 25 insertions, 0 deletions
diff --git a/yocto-poky/documentation/ref-manual/examples/hello-single/files/helloworld.c b/yocto-poky/documentation/ref-manual/examples/hello-single/files/helloworld.c new file mode 100644 index 000000000..fc7169b7b --- /dev/null +++ b/yocto-poky/documentation/ref-manual/examples/hello-single/files/helloworld.c @@ -0,0 +1,8 @@ +#include <stdio.h> + +int main(void) +{ + printf("Hello world!\n"); + + return 0; +} diff --git a/yocto-poky/documentation/ref-manual/examples/hello-single/hello.bb b/yocto-poky/documentation/ref-manual/examples/hello-single/hello.bb new file mode 100644 index 000000000..0812743e3 --- /dev/null +++ b/yocto-poky/documentation/ref-manual/examples/hello-single/hello.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Simple helloworld application" +SECTION = "examples" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://helloworld.c" + +S = "${WORKDIR}" + +do_compile() { + ${CC} helloworld.c -o helloworld +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 helloworld ${D}${bindir} +} |