First of all, what did/configure,make,install do separately?
/configure a shell script that examines the current compilation environment, such as the compiler, the number of machine bits, to generate makefile based on these parameters, to prepare for the next compilation, and to take some parameters to set the installation path or disable or enable some compilation options (important, May make times some of the missing dependencies are errors that can be avoided if these dependent libraries are disabled during the Configure phase.
Subsequent to the Make command call makefile, the compilation command is implemented in makefile, typically a process (for example, to compile a third-party dependency library), Compile multiple. c to become. O, and then put these. o Connect to a. A or. So file (note that the information printed on make is observed), the final goal of the compilation is already generated in the current directory, which is the directory where the installation process is located, at which point the library files can be used, for example, in our The source file contains the header file for the library, which has only the corresponding method declaration, the application that guides the source file to the corresponding dynamic and static libraries to find the specific implementation, but at this time did not execute make install, so the corresponding target file has not been installed to/usr or/usr/ Include, it is necessary to add some of the following parameters to specify the path to find the corresponding header file and static library. -i/home/hello/include indicates that the directory is selected as the first directory to look for header files, looking for the order of/home/hello/include>/usr/include>/usr/local/include-l/ The Home/hello/lib option is to make the corresponding directory to look for the first directory of the library file, looking for the order of/home/hello/lib>/usr/lib>/usr/local/lib-lworld Represents a dynamic library looking for libworld.so and libword.a on the path above specified Lib
Step three, make install
This is equivalent to copy the already compiled target files to the default installation directory, because it involves the system directory, so this step requires sudo to run as root, and then if you need to use the library file does not need to specify the path, but may still need to specify the corresponding library, such as-lpthread,- Lpcap