CMake Compilation Tools and Project Building

CMake Compilation Tools and Project Building

Click on the above“Beginner’s Guide to Vision” to selectStar or “Pin” Important content delivered promptly Article Overview This article starts with the compilation process of C/C++ code, clarifying the relationship between Make and Makefile, CMake and CMakeLists, and finally provides examples from the syntax rules of CMakeLists to help everyone become familiar with how to … Read more

The -n Option of Make Command Does Not Work

The -n Option of Make Command Does Not Work

The make command provides the -n parameter for debugging makefiles. When make is run with the -n parameter, it only prints the commands that would be executed, but does not actually execute them. For example, with the following makefile, running make all -n will print the commands to be executed but will not actually execute … Read more

Master Makefile in 5 Minutes

Master Makefile in 5 Minutes

Photographer: Product Manager This Sichuan restaurant tastes quite good In a previous article titled “Daily Skill: Writing Makefile for Python Projects”, we discussed Makefile. Many students have left messages in the public account backend wanting to further understand how to write a Makefile. Thus, we have today’s article. If you are currently using macOS or … Read more

Using Local Source for Remote Programming in CLion

Using Local Source for Remote Programming in CLion

Local Client Operating System: macOS / Linux / Windows Remote Host Operating System: Linux Source File Location: Local, automatically synchronized to remote host Required Tools on Remote Host: macOS/Linux/Windows client needs rsync, Windows client needs tar Project Model: CMake/Makefile Required Plugins (pre-installed and enabled by default): FTP/SFTP/WebDAV connection This remote mode allows you to use … Read more

Efficiently Manage Linux Projects with Makefile

Efficiently Manage Linux Projects with Makefile

Linux | Red Hat Certified | IT Technology | Operations Engineer 👇 Join the technical exchange QQ group of 1000 people, note “public account” for faster approval Basic Structure A simple Makefile usually includes the following parts: Variable Definitions: You can define compilers, compilation options, source files, etc. Rules: Specify how to build targets. The … Read more

Essential Makefile Guide: Step-by-Step Project Compilation!

Linux | Red Hat Certified | IT Technology | Operations Engineer 👇1000 people technical exchange QQ group, note 【public number】 for faster access 1. Basic Structure of Makefile The Makefile contains a series of “rules”, with the basic structure of each rule as follows: target…: prerequisites… <tab> command Target(target): usually the name of the file … Read more

How to Compile C Programs in Linux

How to Compile C Programs in Linux

Article Word Count: 1400 Practical Index: ⭐⭐⭐⭐⭐ Common IDEs for compiling on Windows, while using gcc directly for compilation in Linux, is the foundation of Linux embedded programming and also a frequently asked question in embedded interviews. Command Line Compilation and Detailed Compilation Process Example code for hello.c: #include <stdio.h> int main(void) { printf("Hello world\n"); … Read more

Understanding U-Boot Makefile

Understanding U-Boot Makefile

1. Compiling U-Boot First, let’s review how to compile U-Boot. (1) Set temporary environment variables export ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- (2) Specify board configuration and generate .config file make xxx_defconfig (3) Compile make -j8 (4) Clean build make distclean Next, we will analyze the top-level Makefile in the U-Boot root directory to explore what happens behind these … Read more

An Overview of Makefile, Kconfig, and .config in Linux Kernel Source

An Overview of Makefile, Kconfig, and .config in Linux Kernel Source

The Linux kernel source code contains numerous files, and understanding the relationships between Makefile, Kconfig, and .config is crucial for navigating the kernel compilation system. Issues arise when trying to compile and modify the kernel, integrate your own drivers, or configure the kernel. All of these problems relate to Makefile, Kconfig, and .config. Below, I … Read more