LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-25-2005, 11:28 PM   #1
taureanyang
LQ Newbie
 
Registered: Mar 2005
Posts: 10

Rep: Reputation: 0
Question about makefile


I'm learning how to use makefile to maintain a project.
But I encounter a problem.
There are three source files: header.h, appendall.c, appendallmain.c
Below is the makefile:
/*****************************************************/
all: appendall

appendall.o: appendall.c header.h
gcc -c appendall.c

appendallmain.o: appendallmain.c header.h
gcc -c appendallmain.c

appendall: appendall.o appendallmain.o
gcc -o appendall appendall.o appendallmain.o

clean:
rm *.o
/*********************************************************/

what's mean of "all: appendall" at line 1?

Thanks

Last edited by taureanyang; 03-25-2005 at 11:30 PM.
 
Old 03-25-2005, 11:57 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
That just means that the all target depends on the apendall target. In this case, it just means that the all target is synonymous to appendall. Note, however, that the first target in the makefile is the default one (the one used when the user just types make with no argument).
 
  


Reply



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
makefile question ashwin.tanugula Programming 2 10-26-2005 03:08 PM
A strange question of Makefile frankli Programming 2 03-01-2005 09:50 PM
makefile question blackzone Programming 2 12-20-2004 07:03 AM
kernel Makefile question feetyouwell Linux - Software 0 11-16-2004 11:36 AM
stupid makefile question drumlix18 Linux - Newbie 5 10-19-2004 10:46 PM

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

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