LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-08-2003, 10:50 AM   #1
parthi4u
LQ Newbie
 
Registered: Mar 2003
Location: India
Distribution: RHL 7.2
Posts: 9

Rep: Reputation: 0
Red face Why makefiles


Hi everybody,
can someone explain me why we need a makefile.When i create small c or c++ pgm am not worrying about this makefiles.What significance does it have ?
 
Old 03-08-2003, 11:04 AM   #2
loke137
Member
 
Registered: Feb 2003
Location: Brasil
Distribution: Debian Etch
Posts: 147

Rep: Reputation: 15
Makefiles are made so you dont have to compile everyyything by hand. Compile gcc and see all the flags going by. Imagine doing that by hand? and adding the right objects and so on....Hours of pointless labor around the world. So a guy takes the job for himself and does a makefile and make your life easier!!!
Also, I didnt understand your post past the first word makefile. What did you want to know?
 
Old 03-08-2003, 11:33 AM   #3
acid2000
Member
 
Registered: Nov 2001
Location: Exeter, UK
Distribution: Gentoo 1.4
Posts: 243

Rep: Reputation: 30
For a simple project there is no point, but when you start writing and distributing programs with a use then you need then.
 
Old 03-08-2003, 03:51 PM   #4
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
Quote:
Originally posted by loke137
Makefiles are made so you dont have to compile everyyything by hand. Compile gcc and see all the flags going by. Imagine doing that by hand? and adding the right objects and so on....Hours of pointless labor around the world. So a guy takes the job for himself and does a makefile and make your life easier!!!
Also, I didnt understand your post past the first word makefile. What did you want to know?
thats right and also they check for avaible liblarys and their places on disk so you do not have to tell them
 
Old 03-08-2003, 04:14 PM   #5
sienarot
Member
 
Registered: Mar 2003
Location: Calgary, Alberta, Canada
Distribution: Gentoo 1.4, Debian Woody, Mandrake 8.1
Posts: 43

Rep: Reputation: 15
Makefiles are nice to have because if you're writing long and complicated programs that require several different files/libraries to compile, you don't have to compile every updated file individually. Instead, the makefile can contain the command to do that with an individual file or a series of them and all you need to do is specify which command.
 
  


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
makefiles wmoti Programming 5 09-21-2005 04:26 AM
Makefiles deveshs Linux - Software 2 05-02-2005 06:26 AM
Those makefiles... boku Programming 10 03-01-2005 09:19 AM
Makefiles and Me dpottinger Linux - Newbie 5 07-25-2004 12:14 AM
MAKEFILEs shinpadsmt Linux - Newbie 3 02-21-2004 03:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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
Open Source Consulting | Domain Registration