GNU make and Makefile from Scratch
$8.00
Minimum price
$10.00
Suggested price

GNU make and Makefile from Scratch

Learn GNU make and Makefile to automate project build and tasks

About the Book

The GNU make and Makefile from Scratch book helps software engineers for defining the build process for a new product and understanding for maintenance of existing product.

Build process is one of the most important activity in development and support of software product. Software products have grown with unbelievable number of files. Now most of the big software products require separate team for build activity. Similarly there are lot of tasks required for managing the software products. Whether it is a development from scratch or maintenance of existing product, build process has to be defined and understood properly. Makefile and GNU make are used heavily from years for software product build automation.

The complexity of build process and numerous tasks to maintain the software product require efficient automation. Makefile and GNU make in linux/unix provides great features to automate the build process and tasks in efficient way. Use of Makefile in C/C++ projects is very common and GNU make is most favorite tool of developers for building the complex projects.

This GNU make and Makefile from Scratch book explains all the features provided by the GNU make utility. The book explains various activity of building project in Makefile by using the features provided by GNU make.

All the features have been explained with appropriate Makefile examples and other required files. Automation of build process and tasks have been explained and examples are provided for the same.

The book can be referred on any Linux/Unix system or other system for variety of applications for automation of build process and tasks. Makefile examples are taken for small C programs but simple programs of any other language C++ etc can be taken to learn and build automation of projects and tasks.

GNU make and Makefile is used for Docker/Embedded System too because it provides the opportunity for incremental build and lot of automation for Docker/Embedded System.

Why learn GNU make and Makefile

  • Must have skill for Software Development/Maintenance
  • Every Project has Build activity
  • There are separate Build and Release teams
  • Automation of Build is must for big real and complex projects
  • First step to get complex product to release
  • Necessary to understand the working of Product
  • Better management of product
  • Fresh engineers require better understanding of system

About the Author

Suresh Kumar Srivastava
Suresh Kumar Srivastava

Suresh Kumar Srivastava is founder of online learning site CourseGalaxy.com. He is author of popular books C In DepthData Structures Through C In Depth that helped 250,000+ students. He has 20+ years experience in industry and worked on architecture and design of multiple products. He has worked on Compilers, Linker, Debugger, IDE, System Utilities, System Management and Telecom/Mobile/Systems tools development.

Table of Contents

    • 1 Introduction
      • 1.1 Introduction
      • 1.2 Building Project
      • 1.3 Commands of Building Project
      • 1.4 Simple Makefile
      • 1.5 Rules
      • 1.6 Processing of Makefile
      • 1.7 Variables in Makefile
      • 1.8 Tasks other than build in Makefile
      • 1.9 Parts of Makefile
      • 1.10 Including another Makefile
      • 1.11 Running make and Naming of Makefile
    • 2 Rules
      • 2.1 What is Rule
      • 2.2 Rule Syntax
      • 2.3 Types of Prerequisites
      • 2.4 Wildcards
      • 2.5 Wildcard Examples
      • 2.6 wildcard Function
      • 2.7 Automatic Variables
      • 2.8 Building target using automatic variables
      • 2.9 Finding Prerequisites
      • 2.10 VPATH
      • 2.11 vpath directive
      • 2.12 VPATH demo
      • 2.13 Phony Targets 1
      • 2.14 Phony Targets 2
      • 2.15 Rule without Commands and Prerequisites
      • 2.16 Empty Target File
    • 3 Commands
      • 3.1 Commands in Rules
      • 3.2 Command Syntax
      • 3.3 Continuation of Command Line
      • 3.4 How to use variables in command
      • 3.5 Displaying commands
      • 3.6 Command Errors
      • 3.7 Interrupts
      • 3.8 Use of make in command
      • 3.9 Communicating options to a Sub-make
      • 3.10 Displaying the directory information
      • 3.11 Empty Commands

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub