LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-23-2003, 06:13 PM   #1
xailer
Member
 
Registered: Nov 2003
Posts: 77

Rep: Reputation: 15
Question about Makefiles


hi
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, 06:17 PM   #2
Peacedog
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, 04:16 AM   #3
beginner16
Member
 
Registered: Nov 2003
Posts: 33

Rep: Reputation: 15
hi

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


Last edited by beginner16; 11-24-2003 at 04:18 AM.
 
Old 11-24-2003, 07:34 AM   #4
Gibarian
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, 08:53 AM   #5
xailer
Member
 
Registered: Nov 2003
Posts: 77

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

thank you all

bye
 
Old 11-24-2003, 10:43 AM   #6
vasudevadas
Member
 
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.
 
  


Reply


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 12:08 AM
Makefiles deveshs Linux - Software 2 05-02-2005 05:26 AM
Those makefiles... boku Programming 10 03-01-2005 08:19 AM
MAKEFILEs shinpadsmt Linux - Newbie 3 02-21-2004 02:52 AM
Why makefiles parthi4u Programming 4 03-08-2003 03:14 PM


All times are GMT -5. The time now is 06:49 AM.

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