Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between make and gcc?

The last sentence in the article caught my eye

[F]or C/C++ developers and students interested in learning to program in C/C++ rather than users of Linux. This is because the compiling of source code is made simple in GNU/Linux by the use of the 'make' command.

I have always used gcc to compile my C/C++ programs, whereas javac to compile my Java programs. I have only used make to install programs to my computer by configure/make/make install.

It seems that you can compile apparently all your programs with the command make.

What is the difference between make and gcc?

like image 822
Léo Léopold Hertz 준영 Avatar asked Apr 20 '09 14:04

Léo Léopold Hertz 준영


People also ask

What is GCC and make?

GNU Compiler Collection (GCC): a compiler suite that supports many languages, such as C/C++ and Objective-C/C++. GNU Make: an automation tool for compiling and building applications.

Which is better GCC or Turbo C?

Turbo C compiler supports far pointers whereas GCC compiler doesn't. Turbo C is a 16bit compiler whereas GCC is a 32 bit compiler. The Gcc compiler can support multiple languages such as C,C++,Java,Fortran,Pascal etc whereas in turbo c compiler ,it doesn't support multiple languages.

Is GCC the best C compiler?

Though there are many compilers available for C, GCC stands out to be one of the best as of now. The winner declaration here lies based on durability, optimization, speed, and code/error/syntax checks. Through this, we can clearly understand that the Compiler is an important pillar to the programming languages.


1 Answers

Well ... gcc is a compiler, make is a tool to help build programs. The difference is huge. You can never build a program purely using make; it's not a compiler. What make does it introduce a separate file of "rules", that describes how to go from source code to finished program. It then interprets this file, figures out what needs to be compiled, and calls gcc for you. This is very useful for larger projects, with hundreds or thousands of source code files, and to keep track of things like compiler options, include paths, and so on.

like image 151
unwind Avatar answered Oct 26 '22 00:10

unwind