Useful Links
Computer Science
Other Tools and Technologies
Make Build Tool
1. Introduction to Build Automation and Make
2. Getting Started with Makefiles
3. Variables and Macros
4. Rules and Patterns
5. Functions
6. Conditional Processing
7. Managing Complex Projects
8. Advanced Topics and Best Practices
9. Make Beyond Compilation
Getting Started with Makefiles
The Basic Makefile Structure
File Naming Conventions
Makefile
makefile
GNUmakefile
Layout and Indentation Rules
Tab Requirements
Whitespace Handling
Case Sensitivity
Character Encoding
Writing a Simple Rule
Basic Rule Syntax
Target Declaration
Colon Separator
Prerequisites List
Defining a Target
Syntax and Formatting
File vs. Phony Targets
Target Naming Conventions
Listing Prerequisites
Single Prerequisites
Multiple Prerequisites
Order of Prerequisites
Handling Missing Prerequisites
Specifying a Recipe
Command Line Requirements
Tab Indentation
Multiple Command Lines
Shell Command Execution
Running Make
Default Goal Execution
First Target Rule
How Make Selects the Default Target
Running make Without Arguments
Specifying a Target on the Command Line
Single Target Selection
Multiple Target Selection
Target Name Completion
Command Line Syntax
Basic Invocation
Option Placement
Essential Special Targets
The all Target Convention
Purpose and Usage
Aggregating Multiple Targets
Best Practices
The .PHONY Target
Purpose of Phony Targets
Avoiding Filename Conflicts
Ensuring Recipe Execution
Performance Considerations
Common Phony Targets
all
clean
install
test
distclean
The clean Target
Purpose and Implementation
Safe Cleaning Practices
Recursive Cleaning
Comments in Makefiles
Comment Syntax
Inline Comments
Block Comments
Documentation Best Practices
Header Comments
Previous
1. Introduction to Build Automation and Make
Go to top
Next
3. Variables and Macros