Question: To write this blog, we need to deepen our understanding and implementation of the detection software.AlgorithmI would like to thank you for your experience and training.
When you execute make, make will search for the makefile (or makefile) text file in a later directory, and The makefile will record the detailed information about how to compile the original code! Make will automatically identify whether the original code has been changed, and update the execution file automatically.
Every day, software developers write a detection programProgramTo detect the user's job environment, and whether the job environment has other functions required by software developers, the rule file of this makefile will be automatically created! The file name of this detection program on weekdays is configure or config.
The data that the detection program detects is roughly the following:
- Is there a proper program for compiling the software?Code;
- Whether the licensed library or other dependent software required by the software already exists;
- Whether the operating system platform is suitable for this software, including the core version of Linux;
- Whether the core header definition file (header include) exists (the driver must detect ).
Tarball file: pack the original code file of the software with tar, and then compress it with compression technology. tarball is a soft
Package. After you decompress the package, the files in the package will usually be:
- Detects the program file (which can be called by configure and config );
- The software's easy description and installation Description (install or Readme ).
The most important two files are the install or readme files.
So how is a software tarball installed? The basic process flow is as follows:
1. Download the tarball from the vendor's webpage;
2. unbind the tarball and many original code files are generated;
3. Start to compile the source code with GCC (object files in the target file will occur );
4. Then, the link of the library, main, and sub-program traveling with GCC is used to form the binary file of the master;
5. Install the preceding binary file and related configuration files under your host.
In steps 3rd and 4 below, we can simplify the command by using the make command function.
A brief example of applying traditional programming language to the traveling Translation
1. Write source code
2. Compilation execution
Main and subprogram links: Translation of subprograms
In Linux, I 'd like to try a lot of GCC usage to get a rough idea of what operations the command has executed:
Run the following command:
GCC thanks_2.c thanks. c
The A. out file is directly generated and can be executed using./A. Out.
Call external External library: Incoming and connected Library
In the C language, the sin letter is written in the library of libm. So.
Smart source softwareOriginal
ArticleI will end by sharing some comments and quotations from programmers:
today's development level of AI: the 8-by-8 international chess board is actually a powerful media that reflects the thinking and creativity. Chess contains astronomical changes. Kasparov pointed out that there are a total of 1040 legitimate chess moves. Every eight steps in the game, the changes in the game have exceeded the stars in the galaxy. Few on the Earth reach this level. Before the financial crisis, the world's total wealth was about 1014 yuan, while the earth's population was only 1010. On the board, the total number of all possible board games reaches 10120, which exceeds the total number of all atoms in the universe! Classic quotations Network