Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-23-2003, 07:13 PM   #1
Registered: Nov 2003
Posts: 77

Rep: Reputation: 15
Question about Makefiles

Is Makefile also a compiler or does it just give some instructions on how to compile,to
compiler(for instance to C compiler)?

Reason Im asking this is cos in my book author is saying makefiles can do the compiling,linking and the like

thank you
Old 11-23-2003, 07:17 PM   #2
LQ Guru
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
it is my understanding, and correct me anyone if i'm wrong...please, the makefile gives instructions to the compiler ...i.e. paths,etc. the compiler itself would be a different animal. using the makefile as a source or reference if you will.
hope that helps. good luck.
Old 11-24-2003, 05:16 AM   #3
Registered: Nov 2003
Posts: 33

Rep: Reputation: 15

I think it s make tool that compiles it,but it gets instructions from makefile

Last edited by beginner16; 11-24-2003 at 05:18 AM.
Old 11-24-2003, 08:34 AM   #4
LQ Newbie
Registered: Aug 2003
Posts: 14

Rep: Reputation: 0
makefile (or make) does not compile, but calls the compiler or the linker.

It works in the following way:

You specify in the makefile some dependencies between files (conditions) and the command to execute. Usually this is used to check what code files have been modified and then compile only the right ones. Make only executes the commands that you specify in the makefile (being it compile or link or remove or print or anything you like)
Old 11-24-2003, 09:53 AM   #5
Registered: Nov 2003
Posts: 77

Original Poster
Rep: Reputation: 15
So make program is the one doing the actual compiling?

thank you all

Old 11-24-2003, 11:43 AM   #6
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519

Rep: Reputation: 30
The make utility issues the shell commands to invoke the compiler, yes. It knows what commands to issue from the makefile, which, if it is called Makefile or makefile, will be found automatically when you invoke make. If the makefile has a different name you must specify it using the -f option.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about makefiles evolutionspeak Linux - Newbie 2 11-18-2005 01:08 AM
Makefiles deveshs Linux - Software 2 05-02-2005 06:26 AM
Those makefiles... boku Programming 10 03-01-2005 09:19 AM
MAKEFILEs shinpadsmt Linux - Newbie 3 02-21-2004 03:52 AM
Why makefiles parthi4u Programming 4 03-08-2003 04:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration