I saw a thread here discussing how to compile sources in yocto. I am using its first method as follows:
yocto-layer create Mylayer
I have the helloworld example created. The location of source file helloworld.c is in a subfolder of the location of the .bb file. I am using makefile with this.
My aim is to add 3 folders(1. build, 2. Include and 3. source) in the location where helloworld.c is located. The build directory will contain the make file, the source diectory contains all .c/.cpp files, and the include folder conatins the include files.
When I add everything at the location of helloworld.c it compiles succesfully but When I arrange the sources as I mentioned above it doesn't compile.
How do I arrange these directories in yocto? Will there be changes in the .bb or .bbalyer files?
add below line in your recipe
FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += "file://hello/* "
Also create a directory hello
where the .bb
present thenafter copy all your data to this hello directory
.
now your hello dir should be like below
hello
|_build
|_include
|_source