first of all, we summarize some concepts of Linux
1,GCC can be said to be the most powerful C language compiler ever.
The function is to compile the software program's source code (a plain text file) and the existing library of functions through its own GCC into a computer-recognizable binary file.
This process is a universal process for program compilation
2, the Environment Detection program (usually named configuration or config), because each Linux distribution uses the kernel version is different, The different Linux kernel versions use the system calls and the software required by the relevant function library may also be different, so for the software to install on different operating systems and kernel version of the need to pass some kind of environmental monitoring mechanism, and this detection mechanism is our environmental detection program, Configuration or CONFIG.
when we compile and install, we usually unpack through TAR-XZVF and then have a command./configuration This is the environmental monitoring tool.
3,makefile file, the makefile file is generated in the current directory when the Environment detection program finishes running, and the details of how the source code is compiled are documented.
system has included the software required by the function library or other software
operating system and system kernel is suitable for the software version of the
Kernel header definition file exists
4,make program, Make is a very important compilation command, both in Linux and in the UNIX environment. Whether you are developing your own projects or installing applications, we often use make or makes install. With make tools, we can break down large-scale development projects into more manageable modules, and for an application that includes hundreds of source files, using the Make and makefile tools, you can easily and concisely straighten out the intricacies of each source file. And with so many source files, it would be a disaster for programmers to compile a gcc command every time. The Make tool automates the compilation process and compiles only the parts of the programmer that have been modified since the last compilation. Therefore, effective use of make and makefile tools can greatly improve the efficiency of project development. At the same time mastering make and Makefile, you will not face the Linux application software at a loss.
When make is executed, makes will look for the makefile file in the current directory and then automatically update the execution file according to the makefile file to determine whether the source code has been changed.
the entire compilation installation process: 1, the system gets the source code. 2, the system calls the environment detection program configure or config program to find the required function library, compiler and other materials, and actively create makefile files. 3,make generates binary executables based on makefile files, libraries, compilers, and so on. (not yet installed in the development directory) 4,make Install command, make back a makefile file about the Install option to install the completed executable file into the default directory.
Linux Software compilation process