I am trying to learn C and just started the book "Learn C the Hard Way." In the second lesson the author mentions Makefiles and states that when using the command "make example.c", 'make' will automatically call cc to build the .c file. Out of curiosity, I started to investigate cc since I was only familiar with gcc. According to user Jonathan Leffler on SO's post "Difference between CC, gcc and g++?", cc usually links to gcc in Linux.
So here are my questions:
1) How does cc link to gcc in Linux? It seems like a simple question but I can't tell if it would require a basic answer or an advanced OS answer. (It seems that cc isn't an environmental variable as one user claimed on SO after checking with "env >> env_vars.txt" on Red Hat Linux and then reading the contents of the text file env_vars.txt.)
2) How do we know the internal details of what 'make' will do when it encounters a .c file (or any other file)? For example, in the case of .c files, how exactly can we know or confirm that 'make' will call cc as opposed to directly calling gcc with a .c file (or not)? (Does 'make' reference a default Makefile? If so, how can we read the contents of this default Makefile?)