LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Question about makefile (https://www.linuxquestions.org/questions/programming-9/question-about-makefile-306162/)

taureanyang 03-25-2005 11:28 PM

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

btmiller 03-25-2005 11:57 PM

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).


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