LinuxQuestions.org
Visit Jeremy's Blog.
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, 09: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, 10: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, 10: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, 02: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, 03: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 03:26 AM
Makefiles deveshs Linux - Software 2 05-02-2005 05:26 AM
Those makefiles... boku Programming 10 03-01-2005 08:19 AM
Makefiles and Me dpottinger Linux - Newbie 5 07-24-2004 11:14 PM
MAKEFILEs shinpadsmt Linux - Newbie 3 02-21-2004 02:52 AM

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

All times are GMT -5. The time now is 01:18 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