Skip to content

Commit

Permalink
including a recipe using make
Browse files Browse the repository at this point in the history
  • Loading branch information
amamory committed Dec 29, 2021
1 parent 29afdfc commit a886204
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ LAYERSERIES_COMPAT_meta-learning = "dunfell"
# add here the name of the recipes to be included into the image
IMAGE_INSTALL_append = " example"
IMAGE_INSTALL_append = " hello"
#IMAGE_INSTALL_append = " hellomake"
IMAGE_INSTALL_append = " hellomake"
IMAGE_INSTALL_append = " hellocmake"
IMAGE_INSTALL_append = " libhello"
IMAGE_INSTALL_append = " hellodep"
Expand Down
7 changes: 7 additions & 0 deletions recipes-example/hellomake/files/hellomake.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main()
{
printf("Hello Make");
return 0;
}
29 changes: 29 additions & 0 deletions recipes-example/hellomake/hellomake.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
SUMMARY = "Simple Hello World Make application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "\
file://Makefile \
file://hellomake.c \
"

S = "${WORKDIR}"

inherit make

EXTRA_OEMAKE = ""

# in case it's necessary to add more flgas than those already defined inthe Makefile
#CFLAGS_prepend = "-I ${S}/include"

# in case it's necessary to do additional steps before running make ... The waythis the compile task is defined, could be removed since this is the default behaviour.
do_compile() {
oe_runmake
}

# if the makefile does not have a 'install' rule, then it's necessary to specify where the app will be installed.
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/hellomake ${D}${bindir}
}

0 comments on commit a886204

Please sign in to comment.