You are on page 1of 1

header file supplied by the system for compilation are stored in /usr/include.

Linking is the process of taking one or more object files generated by a compiler
and combining them into a single executable file, library file, or another object
file. A linker does linking.
Build is the process of converting source code files into standalone software
artifact(secondary product) that can be run on a computer. It consists of :-
(1) compilation of source code. (Language supporting explicit compilation)
(2) Linking of object code. (Language supporting explicit Linking)
(3) producttion of distribution packages(installers).
(4) Generation of documentation.
(5) Execution of automated tests like unit tests, static analysis tests, and
performance tests.
(6) Generation of reports about errors and warnings during build.
(7) Deployment of distribution packages.
We can manually build a program or automate the process.

For C/C++ programs


(1) Building :- The configure program is a shell script which is supplied with the
source tree. Its job is to analyze the build environment. configure also checks to
see that necessary external tools and components are installed. If we are in source
code directory, run configure as :
./configure
configure creates several new files. The most important of them is Makefile. It is
a configuration file that instructs make program how to build the program. Without
it, make will refuse to run.
target is the main executable file and the files on which it is dependent.
The make program takes as input a makefile(normally named Makefile). It is a
build automation tool that automatically build executable programs and libraries by
reading makefiles which specify how to derive the target program. make only builds
what needs building. make keeps the target up to date. It insists that targets be
newer than their dependencies.

(2) Installing :- Well packaged source code will include a special make target
called install. This target will install the final product in a system directory
for use which is usually /usr/local/bin. Ex -
sudo make install

You might also like