The role of configure, make and make install in Linux compilation installation

Source: Internet
Author: User
Tags automake

These are typical installation steps for programs that are generated using the GNU autoconf and Automake.

The ./configure is used to detect the target characteristics of your installation platform. For example, it detects if you have CC or GCC, does not need CC or GCC, it is a shell script.

make is used to compile, it reads the instruction from the makefile, and then compiles.

The Make install is used to install, and it also reads instructions from makefile and installs to the specified location.

Automake and autoconf are very useful things to publish C programs.

1, configure

This step is generally used to generate Makefile, to prepare for the next compilation, you can control the installation by adding parameters after configure, such as code:

./configure--PREFIX=/USR

The above means that the software is installed under/usr, the execution file will be installed in/usr/bin (instead of the default/usr/local/bin), the resource files will be installed in the/usr/share (instead of the default/usr/local/share).

At the same time, some software configuration files can be set by specifying the--sys-config= parameter. Some software can also be added--with 、--enable 、--without 、--disable and so on to control the compilation, you can see the detailed instructions by allowing./configure--help.

2. make

This step is compiled, and most of the source code packages are compiled in this step (some perl or Python-written software, of course, needs to call Perl or Python to compile).

If error occurs during the make process, you need to write down the error code (note that it is not just the last line), and then you can submit a bugreport to the developer (usually with a submit address in the INSTALL), or your system will have fewer dependent libraries, which requires careful study of the error code.

The role of make is to start the source code compilation, as well as the provision of some features, which are provided by his Makefile settings file related functions, such as make install general installation, makes uninstall is unloaded, no parameter is the default source code compilation.

Make is a program that automates compilation within the Linux development suite by automating calls to GCC, LD, and programs that run some of the required programs by using the compilation specifications written in Makefile. In general, the Makefile control code that he uses is generated by configure, a setup script that is based on the given parameters and system environment.

3. Make install

This command to install (of course some software needs to run make check or do test to do some testing), this step generally requires you to have root permissions (because to write files to the system)

The role of configure, make and make install in Linux compilation installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.