Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are makefiles - make install

Tags:

linux

makefile

I see in Linux these things, but what is it?:

./configure  
make  
make install

etc etc.

like image 728
cdxf Avatar asked Oct 12 '10 13:10

cdxf


People also ask

What is make and Makefiles?

The make utility requires a file, Makefile (or makefile ), which defines set of tasks to be executed. You may have used make to compile a program from source code. Most open source projects use make to compile a final executable binary, which can then be installed using make install .

What is the purpose of Makefiles?

Makefile sets a set of rules to determine which parts of a program need to be recompile, and issues command to recompile them. Makefile is a way of automating software building procedure and other complex tasks with dependencies. Makefile contains: dependency rules, macros and suffix(or implicit) rules.

Is make install necessary?

By convention, this may be the all target, but not necessarily. make install builds the special target, install. By convention, this takes the results of make all , and installs them on the current computer. Not everybody needs make install .


2 Answers

configure checks if you have all the prerequisites/dependencies to build the software.

make does the actual compilation.

make install installs the software in the correct location.

like image 115
o0'. Avatar answered Nov 15 '22 00:11

o0'.


make is part of the build system commonly used in unix type systems - binutils.

It looks at make files which hold configuration information and build targets.

Specifically -

  • ./configure - this is a script that sets up the environment for the build
  • make - calls make with the default build target. Normally builds the app.
  • make install - calls make with the install build target. Normally installs the app.
like image 29
Oded Avatar answered Nov 15 '22 00:11

Oded