Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skillfulelectro/makefiles
This is code based Tutorial for makefiles
https://github.com/skillfulelectro/makefiles
cmake debian linux makefile
Last synced: about 1 month ago
JSON representation
This is code based Tutorial for makefiles
- Host: GitHub
- URL: https://github.com/skillfulelectro/makefiles
- Owner: SkillfulElectro
- License: apache-2.0
- Created: 2024-03-29T10:34:22.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-02T01:42:07.000Z (9 months ago)
- Last Synced: 2024-04-02T12:42:32.405Z (9 months ago)
- Topics: cmake, debian, linux, makefile
- Language: Makefile
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Makefiles
# Learning Makefiles: A Beginner's GuideMakefiles are essential in the Linux ecosystem for managing program compilation and linking. Let's explore what they are, why they exist, and how to create a basic Makefile.
for running this tutorial in your shell :
```
$ git clone https://github.com/SkillfulElectro/Makefiles.git
$ make
```
the automatated version opens each example for you and then runs it to you see the result .## What Are Makefiles?
Makefiles guide the `make` utility during compilation and linking. They determine which parts of a program need recompilation, making development more efficient.
## Why Do Makefiles Exist?
Makefiles decide which files require recompilation. When files change, Make ensures only necessary parts get recompiled.
## Alternatives to Make
While Make is widely used, other build systems exist:
- **SCons**, **CMake**, **Bazel**, and **Ninja** for C/C++ projects.
- **Ant**, **Maven**, and **Gradle** for Java.
- **Go**, **Rust**, and **TypeScript** have their own build tools.
- Interpreted languages like **Python**, **Ruby**, and raw **JavaScript** don't need Makefiles.## Versions and Types of Make
This guide focuses on **GNU Make**, the standard implementation on Linux and macOS.
## Basic Makefile Example
Create a `Makefile` with the following content:
```makefile
hello:
echo "Hello, World"
```Remember to use TABs for indentation. Run make in the same directory to see the output:
```makefile
$ make
echo "Hello, World"
Hello, World
```For more resources, explore the Makefile Cookbook for templates and detailed comments.
Happy coding! 🛠️🌟
source :
https://www.gnu.org/software/make/manual/html_node/
https://makefiletutorial.com/