Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By : Alex Gonzalez
Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By: Alex Gonzalez

Overview of this book

Table of Contents (13 chapters)
Embedded Linux Projects Using Yocto Project Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with GNU make


GNU make is a make implementation for Linux systems. It is used by a wide variety of open source projects, including the Linux kernel. The build is managed by a Makefile, which tells make how to build the source code.

How to do it...

Yocto recipes inherit base.bbclass and hence their default behavior is to look for a Makefile, makefile, or GNU Makefile and use GNU make to build the package.

If your package already contains a Makefile, then all you need to worry about are the arguments that need to be passed to make. Make arguments can be passed using the EXTRA_OEMAKE variable, and a do_install override that calls the oe_runmake install needs to be provided, otherwise an empty install is run.

For example, the logrotate recipe is based on a Makefile and looks as follows:

SUMMARY = "Rotates, compresses, removes and mails system log files"
SECTION = "console/utils"
HOMEPAGE = "https://fedorahosted.org/logrotate/"
LICENSE = "GPLv2"

DEPENDS="coreutils popt"

LIC_FILES_CHKSUM...