Refactoring a Go Project Makefile

Refactoring a Go Project Makefile

If you are not familiar with Makefile, I recommend reading Ruanyifeng’s article “Make Command Tutorial[1]“. This article will guide you to write a more elegant Makefile through a refactoring example, so let’s get started! Assuming there is a project named foo, developed in Golang and deployed on Docker, its Makefile is as follows: APP = … Read more

STM32 Bare Metal Programming 04 – Makefile Automation

STM32 Bare Metal Programming 04 - Makefile Automation

Makefile: Build Automation We can use the make command line tool instead of manually typing in “compile”, “link”, and “flash” commands, automating the entire process. The make tool uses a configuration file called Makefile to read the instructions for executing actions. This automation is great because it also documents the process of building firmware and … Read more

In-Depth Analysis of CMake Build Process: From Fundamentals to Complex Projects

In-Depth Analysis of CMake Build Process: From Fundamentals to Complex Projects

1. Analysis of the Project Structure After CMake Build 1.1 Directory Structure After CMake Build After CMake build is complete, a directory named build will be generated in the root directory of the project. This directory is where all intermediate files and final target files generated during the CMake build process are stored. Below, we … Read more

A Concise Guide to Makefile in Chip Design

A Concise Guide to Makefile in Chip Design

What can Makefile do? Makefile can execute commands based on specified dependency rules and whether files have been modified. It is commonly used to compile software source code, only recompiling modified files, which significantly speeds up the compilation process. The Basic Format of Makefile Target: Dependencies Command The target is the result to be generated, … Read more

From 0 to 1: Easily Master Makefile

From 0 to 1: Easily Master Makefile

Click on the above “IT Circle“, select “Top Public Account” Critical moments, delivered first! This article is published by reader Liang Xu from the public account, please do not reprint without authorization! 1. What is Makefile A typical enterprise-level project usually has many source files, sometimes categorized by function, type, or module in different directories, … Read more

Writing Makefiles for Python Projects

Writing Makefiles for Python Projects

As a fan of Makefiles, I use them in almost every hobby project. I also advocate for their use in work projects. For open source projects, Makefiles inform code contributors on how to build, test, and deploy the project. Moreover, if you use Makefiles correctly, they can greatly simplify your CI/CD process scripts, as you … Read more

Key Points for Writing Makefiles in Windows Environment

Key Points for Writing Makefiles in Windows Environment

(Star this for CPP developers to enhance C/C++ skills) Author: Zhu Jincan (This article is submitted by the author) 1. Basic Patterns of Makefiles in Windows Environment From my observation, there is a basic pattern for makefiles in the Windows environment, which is as follows: 1. Set compiler flags 2. If the compiler flags are … Read more

An Overview of Makefile, Kconfig, and .config in the Kernel

An Overview of Makefile, Kconfig, and .config in the Kernel

The Linux kernel source code is extensive, and it can be confusing to understand the relationship between Makefile, Kconfig, and .config. Not knowing how the kernel compilation system works can lead to issues when trying to modify the kernel, integrate your own drivers, or configure the kernel. These problems are all related to Makefile, Kconfig, … Read more

Taskfile vs Makefile: Which Is the Superior Build Tool?

Taskfile vs Makefile: Which Is the Superior Build Tool?

Follow us on WeChat: 「Wonderful Linux World」 Set as a 「Star」 to explore Linux every day! 1. What is Taskfile? Taskfile describes various execution tasks using YAML, and its core is written in Go; compared to Makefile, which uses tab-separated and bash-combined syntax, Taskfile appears more modern and user-friendly (though it may turn you into … Read more

Understanding Makefile, Kconfig, and .config Files

Understanding Makefile, Kconfig, and .config Files

1 We want to add a program (such as a driver) to the kernel and ensure that this driver can be compiled into the kernel, which is fundamentally divided into two main parts. First, we need to tell the kernel, “Please include me in the next compilation,” which requires us to configure the kernel appropriately. … Read more