当前位置:网站首页>./ Functions of configure, make and make install

./ Functions of configure, make and make install

2022-07-07 15:41:00 When can Xiaobai advance to success

1、./configure

Used to detect the target characteristics of your installation platform . For example, it will check whether you have CC or GCC, It's not necessary CC or GCC, It is a shell Script .( You can use autoconf To generate )

This step is generally used to generate Makefile, Prepare for the next compilation step .

  • You can use the configure Add parameters to control the installation , For example code :./configure --prefix=/usr The above means to install the software in /usr below , The executable will be installed in /usr/bin.
  • At the same time, you can specify the configuration file of some software --sys-config= Parameter setting .
  • Some software can be added --with、--enable、--without、--disable--ranlib And other parameters control compilation .
  • You can pass the permission ./configure --help See detailed instructions help .
  • ar The command is used to update , Maintain and manage static library .ranlib The command is used for Update the symbol index table of the library .

    When only ar command ( Used to update the ) when , ld An error will still be reported when connecting , Cannot find updated variable or function , You need to use ranlib To update the symbol index table of the library .

2、make

make It's for compiling , It is from Makefile Read instructions in , Then compile .

Start source code compilation , And the provision of some functions , These functions are controlled by his Makefile Settings file provides related functions , such as make install General indication for installation ,make uninstall Uninstall , Without parameters, the source code is compiled by default .

3、make install 

For installation , It also comes from Makefile Read instructions in , Install to specified location .

原网站

版权声明
本文为[When can Xiaobai advance to success]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130611524642.html