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 generate Makefil using Linux Automake

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article to share with you is about how to use Linux Automake to generate Makefil, Xiaobian feel quite practical, so share to everyone to learn, I hope you can read this article after some harvest, not much to say, follow Xiaobian to see it.

As a program developer under Linux, everyone must have encountered Makefile, and it is really convenient to compile the program written by yourself with the make command. In general, everyone is writing a simple Makefile by hand, if you want to write a Makefile that conforms to free software conventions is not so easy.

Here's how to use Linux Automake and Automake to help us automatically generate Makefiles that conform to free software conventions, so that we can use "./" just like common GNU programs. configure","make","make install "can install the program into Linux system. This will be especially useful for developers who want to do open source software, or if you are just writing small Toy programs yourself.

Makefile Introduction

Makefile is used for automatic compilation and linking. A project consists of many files. The change of each file will lead to the re-linking of the project, but not all files need to be recompiled. Makefile records the information of files. When making, it will decide which files need to be recompiled when linking.

The purpose of Makefile is to let the compiler know which files it depends on to compile a file. When those dependencies change, the compiler automatically finds that the final build file is obsolete and recompiles the corresponding module.

The basic structure of Makefile is not very complex, but when a program developer begins to write Makefile, he often doubts whether his writing conforms to the convention, and his Makefile is often associated with his own development environment. When the system environment variables or paths change, Makefile may also be modified. This creates a lot of problems with manual writing Makefile, automake just can help us solve these problems.

With Linux Automake, developers write simple files with predefined macros, Linux Automake generates configuration from one macro file, Linux Automake generates Makefile.in from another macro file, and Linux Automake generates a conventional Makefile from Makefile.in.

The above is how to use Linux Automake to generate Makefil, Xiaobian believes that some knowledge points may be what we see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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

Servers

Wechat

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

12
Report