Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Examples of Makefiles and various make concepts.

License

NotificationsYou must be signed in to change notification settings

bmorcos/make_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a basic overview of somemake concepts including some examples. Forthe most part I didn't use code/compile examples, just simple examples ofcommands with a single code example at the end.

These examples were put together with:

  • Ubuntu 20.04
  • GCC v9.3.0
  • GNU Make v 4.2.1

Resources

TheGNU make docshave detailed documentation and examples. I would also recommend (no affiliation)what I think is a very well organized and written tutorial that explains coreconcepts in detail with examples:Learn Makefilesby Chase Lambert.

What's Inside

Each example directory will have its own README with some details, but roughlythe examples are:

1 Basic

Very simple example showing basic structure of targets and dependencies.

2 Intermediate

This example is similar in behaviour to the basic example but it makes use ofsome variables to make the rules more manageable for updates or long lists.

3 Advanced

This example similarly builds some text files, but makes use of different typesof variable assignments, wildcards, and dependencies.

4 Functions

This example just goes through some common built-in functions and a simpleuser-defined function as an example.

5 Includes

Example of including multiple Makefiles to create a modular build system.

6 Example Project

This is a simple hello_world C/C++ project to show a more real-world example ofMakefile usage. The Makefile is more complex than necessary for the scale ofthe project but hopefully it will highlight some good practices.

About

Examples of Makefiles and various make concepts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2026 Movatter.jp