Search code examples
gccmakefilegnu-toolchain

Is make a part of GNU tool chain?


As far as I understand, GNU tool chain, whose main purpose is to convert source code into executable files consists of gcc compiler collection(.c to .o conversion), linkers and locators(ld). I also understand that a make file contains just a set of instructions for the compiler to read and also that make in itself invokes gcc for compilation. My question is, is make file an alternative to GNU tool chain or is it a part of the tool chain and shipped with it? Also, if one compiles .c files with make, does it still go through the standard five steps(preprocessing, compiling, assembling, linking and locating)?


Solution

  • Read documentation of GNU make. and download its source code, whose copyright is owned by the FSF. So GNU make is definitely (like GCC or GNU binutils or GNU coreutils) part of the GNU project.

    Be aware that (at least on GNU/Linux) make is running GCC compilation commands.

    In some cases, GNU autoconf is also used. Then the Makefile-s could be generated by the (autoconf generated) configure script.

    To understand more, try building some GNU software, such as GNU emacs, from its source code. You might be interested by Linux source distributions such as gentoo or in following linuxfromscratch.

    To understand even more, try contributing some code to some GNU software. Also try running make -p to understand the rules known to GNU make.