Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use make in Linux

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to use make in Linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Linux common command make command is the engineering compilation tool of GNU, which is used to compile many interrelated source code files in order to achieve engineering management and improve development efficiency.

Engineering compilation tool of makeGNU

Syntax make (option) (parameter) option-f: specify "makefile" file;-I: ignore the error message returned by command execution;-s: silent mode, do not output corresponding command line information before execution;-r: prohibit the use of build-in rules;-n: non-execution mode, output all execution commands but not execute;-t: update target file The-q:make operation will return "0" or non-"0" status information based on whether the target file has been updated;-p: output all macro definitions and object file descriptions;-d:Debug mode, output detailed information about the file and detection time. The common options under Linux are slightly different from those in Unix systems. Here are the different parts:

-c dir: change to the specified directory dir;-I dir before reading makefile: use this option to specify a search directory when other makefile files are included;-h:help document to display all make options;-w: display the working directory before and after processing makefile. Parameter target: specify the compilation target.

Knowledge extension make is a very important compilation command in both linux and Unix environments. Whether we develop our own projects or install applications, we often use make or make install. Using make tools, we can decompose large development projects into more manageable modules. For an application that includes hundreds of source files, we can use make and makefile tools to straighten out the complicated relationships between source files succinctly and clearly.

And with so many source files, it would be a disaster for programmers to type the gcc command to compile every time. The make tool compiles automatically and compiles only the parts that have been modified by the programmer since the last compilation.

Therefore, the effective use of make and makefile tools can greatly improve the efficiency of project development. After mastering both make and makefile, you will no longer be at a loss in the face of applications under Linux.

This is the end of the article on "how to use make in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report