Linux C Basics: Have You Met the Makefile Master?

Linux C Basics: Have You Met the Makefile Master?

Introduction to Make: Project Manager, as the name suggests, refers to managing multiple files The Make project manager is essentially an “automated compilation manager“. Here, “automated” means it can automatically detect updated files based on file timestamps to reduce compilation workload. It performs a large amount of compilation work by reading the contents of the … Read more

Common Makefile Syntax and Functions in Chip Development

Common Makefile Syntax and Functions in Chip Development

1. Why do Makefiles exist? In software or chip development, Makefile is generally used. It is a text file that contains instructions on how to compile and link programs. Makefile is used by the make tool, which is an automation build tool that can automatically execute the compilation and linking process based on the instructions … Read more

Understanding Makefile: A Tool Language for GNU GCC Compilation

Understanding Makefile: A Tool Language for GNU GCC Compilation

Click aboveLinux Community to follow us Abstract: This article mainly introduces makefile, a commonly used tool language for GNU GCC compilation. LiteOS also uses this file to build project files and generate executable files. In the LiteOS source code, makefile is used for batch processing compilation and linking to generate files. When designing a project … Read more

How to Write an Impressive Makefile from Version 1 to Version 5

How to Write an Impressive Makefile from Version 1 to Version 5

1. The Three Essential Elements of Makefile 2. Working Principle 3. Start Writing First, let’s write our program, taking C language as an example. 1) func.h Define two functions: addition and subtraction: 2) Implementation of the Addition Function 3) Implementation of the Subtraction Function 4) main function 3.1 Version 1 The most basic version: just … Read more

Understanding Makefile from a Different Perspective

Understanding Makefile from a Different Perspective

Source: WeChat Official Account [Programming Gems] Author: Mr. Watcher ID: shouwangxiansheng As a C/C++ developer on Linux, it’s essential to have some exposure to Makefile. Typically, constructing large C/C++ projects relies heavily on Makefile. You might be using cmake or other similar tools, but they are fundamentally similar. As a light user, at the request … Read more

C Compilation: Basics of Makefile

C Compilation: Basics of Makefile

(Click the public account above to quickly follow) Source: Vamei Link: http://www.cnblogs.com/vamei/archive/2013/04/29/3051062.html When compiling a large project, there are often many target files, library files, header files, and the final executable file. There are dependencies between different files. For example, when we compile using the following commands: $gcc -c -o test.o test.c $gcc -o helloworld … Read more

Makefile Supplement: A Comprehensive Guide

Makefile Supplement: A Comprehensive Guide

I looked at my article inventory, and it seems I don’t have an article about Makefile, so this one can fill that gap. Makefile Predefined Variables Predefined variables are system-provided variables. Predefined Variable Function AR Name of the library file maintenance program, default is ar AS Name of the assembler program, default is as CC … Read more

Automated Compilation Script for Keil

Automated Compilation Script for Keil

Follow+Star Public Account, don’t miss exciting content Source | Gitee Author | DinoHaw Although Keil development for microcontrollers is often criticized by many developers, it must be acknowledged that Keil is still one of the preferred tools for many microcontroller developers. Today, I will share an open-source automated compilation script for Keil. 1. Source of … Read more

C++20 Module System and Compilation Time Optimization

C++20 Module System and Compilation Time Optimization

1. The Emergence of the C++20 Module System 1. The Emergence of the C++20 Module System In the world of C++ programming, the traditional header file mechanism has long been a double-edged sword. On one hand, it provides some convenience for code organization and reuse; on the other hand, it brings many tricky problems that … Read more

Practical Raspberry Pi Linux Compilation Guide

Practical Raspberry Pi Linux Compilation Guide

Generally, the Linux protocol for module docking is the USB protocol. The module can be used directly after being plugged into the Linux device via USB, and the system will detect the device’s identifier: PID VID. However, in practical applications, some newcomers often ask: Linux is really not user-friendly for beginners, is there a good … Read more