GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.

Make or GNUMake is a build tool that allows developers to perform partial compilation of code based on update. Make uses targets, rules to instruct the build tool-chain to perform code building. If done right, small changes in some code will only trigger compilation of related files only rather than on the whole project.

This was a big deal when computer was slow and with limited memory. But it's still useful not to have to compile the whole project if only one file changes.

Make has been around for a long time, and is still in use heavily with C/C++, Assembly language communities. Linux kernel and many other Unix/Linux projects use Make as their build system.

With the fast move of Java, many other build systems popped up like: ant, maven and gradle, Make is loosing some of its ground. You can see the official documentation is a bit dated on GNU Make Website .

We, The NET SOUP Team, are proud to give GNU Make Documentation a facelift it deserves. Hopefully, you will like the new way to browse Make Documentation

Additional Resources:

  • Amazon Books
  • Make on Wikipedia
  • Make Website

    List of References

    Overview 1 Overview of make
    Reading 1.1 How to Read This Manual
    Bugs 1.2 Problems and Bugs
    Introduction 2 An Introduction to Makefiles
    Rule-Introduction 2.1 What a Rule Looks Like
    Simple-Makefile 2.2 A Simple Makefile
    How-Make-Works 2.3 How make Processes a Makefile
    Variables-Simplify 2.4 Variables Make Makefiles Simpler
    make-Deduces 2.5 Letting make Deduce the Recipes
    Combine-By-Prerequisite 2.6 Another Style of Makefile
    Cleanup 2.7 Rules for Cleaning the Directory
    Makefiles 3 Writing Makefiles
    Makefile-Contents 3.1 What Makefiles Contain
    Splitting-Lines 3.1.1 Splitting Long Lines
    Makefile-Names 3.2 What Name to Give Your Makefile
    Include 3.3 Including Other Makefiles
    MAKEFILES-Variable 3.4 The Variable MAKEFILES
    Remaking-Makefiles 3.5 How Makefiles Are Remade
    Overriding-Makefiles 3.6 Overriding Part of Another Makefile
    Reading-Makefiles 3.7 How make Reads a Makefile
    Secondary-Expansion 3.8 Secondary Expansion
    Rules 4 Writing Rules
    Rule-Example 4.1 Rule Example
    Rule-Syntax 4.2 Rule Syntax
    Prerequisite-Types 4.3 Types of Prerequisites
    Wildcards 4.4 Using Wildcard Characters in File Names
    Wildcard-Examples 4.4.1 Wildcard Examples
    Wildcard-Pitfall 4.4.2 Pitfalls of Using Wildcards
    Wildcard-Function 4.4.3 The Function wildcard
    Directory-Search 4.5 Searching Directories for Prerequisites
    General-Search 4.5.1 VPATH: Search Path for All Prerequisites
    Selective-Search 4.5.2 The vpath Directive
    Search-Algorithm 4.5.3 How Directory Searches are Performed
    Recipes_002fSearch 4.5.4 Writing Recipes with Directory Search
    Implicit_002fSearch 4.5.5 Directory Search and Implicit Rules
    Libraries_002fSearch 4.5.6 Directory Search for Link Libraries
    Phony-Targets 4.6 Phony Targets
    Force-Targets 4.7 Rules without Recipes or Prerequisites
    Empty-Targets 4.8 Empty Target Files to Record Events
    Special-Targets 4.9 Special Built-in Target Names
    Multiple-Targets 4.10 Multiple Targets in a Rule
    Multiple-Rules 4.11 Multiple Rules for One Target
    Static-Pattern 4.12 Static Pattern Rules
    Static-Usage 4.12.1 Syntax of Static Pattern Rules
    Static-versus-Implicit 4.12.2 Static Pattern Rules versus Implicit Rules
    Double_002dColon 4.13 Double-Colon Rules
    Automatic-Prerequisites 4.14 Generating Prerequisites Automatically
    Recipes 5 Writing Recipes in Rules
    Recipe-Syntax 5.1 Recipe Syntax
    Splitting-Recipe-Lines 5.1.1 Splitting Recipe Lines
    Variables-in-Recipes 5.1.2 Using Variables in Recipes
    Echoing 5.2 Recipe Echoing
    Execution 5.3 Recipe Execution
    One-Shell 5.3.1 Using One Shell
    Choosing-the-Shell 5.3.2 Choosing the Shell
    Parallel 5.4 Parallel Execution
    Parallel-Output 5.4.1 Output During Parallel Execution
    Parallel-Input 5.4.2 Input During Parallel Execution
    Errors 5.5 Errors in Recipes
    Interrupts 5.6 Interrupting or Killing make
    Recursion 5.7 Recursive Use of make
    MAKE-Variable 5.7.1 How the MAKE Variable Works
    Variables_002fRecursion 5.7.2 Communicating Variables to a Sub-make
    Options_002fRecursion 5.7.3 Communicating Options to a Sub-make
    _002dw-Option 5.7.4 The ‘--print-directory’ Option
    Canned-Recipes 5.8 Defining Canned Recipes
    Empty-Recipes 5.9 Using Empty Recipes
    Using-Variables 6 How to Use Variables
    Reference 6.1 Basics of Variable References
    Flavors 6.2 The Two Flavors of Variables
    Advanced 6.3 Advanced Features for Reference to Variables
    Substitution-Refs 6.3.1 Substitution References
    Computed-Names 6.3.2 Computed Variable Names
    Values 6.4 How Variables Get Their Values
    Setting 6.5 Setting Variables
    Appending 6.6 Appending More Text to Variables
    Override-Directive 6.7 The override Directive
    Multi_002dLine 6.8 Defining Multi-Line Variables
    Undefine-Directive 6.9 Undefining Variables
    Environment 6.10 Variables from the Environment
    Target_002dspecific 6.11 Target-specific Variable Values
    Pattern_002dspecific 6.12 Pattern-specific Variable Values
    Suppressing-Inheritance 6.13 Suppressing Inheritance
    Special-Variables 6.14 Other Special Variables
    Conditionals 7 Conditional Parts of Makefiles
    Conditional-Example 7.1 Example of a Conditional
    Conditional-Syntax 7.2 Syntax of Conditionals
    Testing-Flags 7.3 Conditionals that Test Flags
    Functions 8 Functions for Transforming Text
    Syntax-of-Functions 8.1 Function Call Syntax
    Text-Functions 8.2 Functions for String Substitution and Analysis
    File-Name-Functions 8.3 Functions for File Names
    Conditional-Functions 8.4 Functions for Conditionals
    Foreach-Function 8.5 The foreach Function
    File-Function 8.6 The file Function
    Call-Function 8.7 The call Function
    Value-Function 8.8 The value Function
    Eval-Function 8.9 The eval Function
    Origin-Function 8.10 The origin Function
    Flavor-Function 8.11 The flavor Function
    Make-Control-Functions 8.12 Functions That Control Make
    Shell-Function 8.13 The shell Function
    Guile-Function 8.14 The guile Function
    Running 9 How to Run make
    Makefile-Arguments 9.1 Arguments to Specify the Makefile
    Goals 9.2 Arguments to Specify the Goals
    Instead-of-Execution 9.3 Instead of Executing Recipes
    Avoiding-Compilation 9.4 Avoiding Recompilation of Some Files
    Overriding 9.5 Overriding Variables
    Testing 9.6 Testing the Compilation of a Program
    Options-Summary 9.7 Summary of Options
    Implicit-Rules 10 Using Implicit Rules
    Using-Implicit 10.1 Using Implicit Rules
    Catalogue-of-Rules 10.2 Catalogue of Built-In Rules
    Implicit-Variables 10.3 Variables Used by Implicit Rules
    Chained-Rules 10.4 Chains of Implicit Rules
    Pattern-Rules 10.5 Defining and Redefining Pattern Rules
    Pattern-Intro 10.5.1 Introduction to Pattern Rules
    Pattern-Examples 10.5.2 Pattern Rule Examples
    Automatic-Variables 10.5.3 Automatic Variables
    Pattern-Match 10.5.4 How Patterns Match
    Match_002dAnything-Rules 10.5.5 Match-Anything Pattern Rules
    Canceling-Rules 10.5.6 Canceling Implicit Rules
    Last-Resort 10.6 Defining Last-Resort Default Rules
    Suffix-Rules 10.7 Old-Fashioned Suffix Rules
    Implicit-Rule-Search 10.8 Implicit Rule Search Algorithm
    Archives 11 Using make to Update Archive Files
    Archive-Members 11.1 Archive Members as Targets
    Archive-Update 11.2 Implicit Rule for Archive Member Targets
    Archive-Symbols 11.2.1 Updating Archive Symbol Directories
    Archive-Pitfalls 11.3 Dangers When Using Archives
    Archive-Suffix-Rules 11.4 Suffix Rules for Archive Files
    Extending-make 12 Extending GNU make
    Guile-Integration 12.1 GNU Guile Integration
    Guile-Types 12.1.1 Conversion of Guile Types
    Guile-Interface 12.1.2 Interfaces from Guile to make
    Guile-Example 12.1.3 Example Using Guile in make
    Loading-Objects 12.2 Loading Dynamic Objects
    load-Directive 12.2.1 The load Directive
    Remaking-Loaded-Objects 12.2.2 How Loaded Objects Are Remade
    Loaded-Object-API 12.2.3 Loaded Object Interface
    Loaded-Object-Example 12.2.4 Example Loaded Object
    Features 13 Features of GNU make
    Missing 14 Incompatibilities and Missing Features
    Makefile-Conventions 15 Makefile Conventions
    Makefile-Basics 15.1 General Conventions for Makefiles
    Utilities-in-Makefiles 15.2 Utilities in Makefiles
    Command-Variables 15.3 Variables for Specifying Commands
    DESTDIR 15.4 DESTDIR: Support for Staged Installs
    Directory-Variables 15.5 Variables for Installation Directories
    Standard-Targets 15.6 Standard Targets for Users
    Install-Command-Categories 15.7 Install Command Categories
    Quick-Reference Appendix A Quick Reference
    Error-Messages Appendix B Errors Generated by Make
    Complex-Makefile Appendix C Complex Makefile Example
    GNU-Free-Documentation-License C.1 GNU Free Documentation License
    Concept-Index Index of Concepts
    Name-Index Index of Functions, Variables, Directives
    Latest Tech News
    Your Notes

    Sign in/Sign up

    Signing in to our system allows you to post your contributions and vote on the contributions of others. It will also allow you to get extra perts like having your favorites in the cloud and having your persistent personal notes wherever you go. More will be added as we scale up our services.

    By signing in to our system, you agree our Member Terms and Conditions

    Sign-in with one of the following services

    Almost finished!

    Please select a screen name for NET SOUP.

     Please send me news and special offers from NET SOUP.

     I have read and accept the Terms of Use.


    We have no example yet for this entry

    Your Name

    Community Contributions and Discussions

    Modify your search

    View Documentation

    Jobs from Indeed