summaryrefslogtreecommitdiff
path: root/poky/documentation/ref-manual/examples/hello-single
diff options
context:
space:
mode:
Diffstat (limited to 'poky/documentation/ref-manual/examples/hello-single')
-rw-r--r--poky/documentation/ref-manual/examples/hello-single/files/helloworld.c8
-rw-r--r--poky/documentation/ref-manual/examples/hello-single/hello.bb17
2 files changed, 25 insertions, 0 deletions
diff --git a/poky/documentation/ref-manual/examples/hello-single/files/helloworld.c b/poky/documentation/ref-manual/examples/hello-single/files/helloworld.c
new file mode 100644
index 000000000..fc7169b7b
--- /dev/null
+++ b/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/poky/documentation/ref-manual/examples/hello-single/hello.bb b/poky/documentation/ref-manual/examples/hello-single/hello.bb
new file mode 100644
index 000000000..0812743e3
--- /dev/null
+++ b/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}
+}