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

Understanding Phony Targets in Makefile

Understanding Phony Targets in Makefile

<span>Makefile</span> phony targets are a very important concept. They are used to define targets that do not directly correspond to files, but are used to perform specific operations (such as cleaning files, running tests, etc.). 1. Introduction: What is a Phony Target? 1.1 Definition of Phony Targets A phony target is a target that does … Read more

5 Lesser-Known GDB Debugger Tips

5 Lesser-Known GDB Debugger Tips

Learn how to use some lesser-known features of gdb to inspect and fix your code. — Tim Waugh GNU Debugger (gdb) is a valuable tool for inspecting running processes and troubleshooting while developing programs. You can set breakpoints at specific locations (by function name, line number, etc.), enable and disable these breakpoints, display and change … Read more

In-Depth Study of Makefile

In-Depth Study of Makefile

In-Depth Study of Makefile In previous articles, we analyzed character device drivers together. If we have already written the driver code, what should we do next? First, we need to run make, and upon successful compilation, a globalmem.ko file will be generated. Next, we need to insert this kernel module into the kernel and use … Read more