cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jackfrye11
Explorer
Explorer
885 Views
Registered: ‎10-19-2017

GNU Make inside of Yocto PetaLinux

I have a petalinux app that looks like this

 

recipes-apps/<app>/files/<main_files>/a/<other_files>

 

I am trying to build the other_files with the main_files.

 

In recipes-apps/<app>/<app>.bb under SRC_URI, I have

SRC_URI =  "file://main_file.cpp \

                      file://a/subfile.h \

                      file://a/subfile.cpp \

                               "

 

By this time the Makefile gets hit to build these, will they all be in the same directory in Bitbake build environment or do I need to set up variables to include files from the parent and child directories for each other to build?

 

 

0 Kudos
2 Replies
sandeepg
Moderator
Moderator
825 Views
Registered: ‎04-24-2017

Hi John,

 

You need to add something like this.

 

# tins contains directories and sub-directories
SRC_URI += "file://tins \ " S = "${WORKDIR}" do_install() { install -d -m 0655 ${D}${includedir}/tins install -d -m 0655 ${D}${includedir}/tins/abc install -d -m 0655 ${D}${includedir}/tins/xyz install -m 0644 ${S}/tins/*.* ${D}${includedir}/tins/ install -m 0644 ${S}/tins/abc/*.* ${D}${includedir}/tins/abc/ install -m 0644 ${S}/tins/xyz/*.* ${D}${includedir}/tins/xyz/ } FILES_${PN} = "${includedir}/*"
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
jackfrye11
Explorer
Explorer
796 Views
Registered: ‎10-19-2017

I was eventually able to get it to work. Had to include all paths with .h in the Makefile in all build recipes with -I and all full paths from the <app>/files/ folder to each source file in the SRC_URI