Newbie needs help: Makefile Dependencies
christopher.chai_at_gmail.com
Date: 05/15/05
- Next message: Zheng Da: "It seems gdb can not work well for c++ program"
- Previous message: Uenal Mutlu: "Re: recursive mutexes"
- Next in thread: T.M. Sommers: "Re: Newbie needs help: Makefile Dependencies"
- Reply: T.M. Sommers: "Re: Newbie needs help: Makefile Dependencies"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 May 2005 23:46:10 -0700
Greetings all,
I am fairly new to Unix (I'm running Fedora Core 3, on an AMD Athlon
2800+), knowing only the basic rudiments of how to navigate around (ls,
cp, pwd, mkdir, ... the basic commands). Currently, I am trying to
figure out how to update an existing makefile. I understand the general
format of
makefiles, ie for each file you want to compile you have the following
format:
TARGET: DEPENDENCIES
<TAB> COMMAND
"COMMAND" for the case of the makefile for the program that I am
working with is usually $(CC) $(LFLAGS) DEPENDENCIES -lm -o TARGET. I
understand this command tells the system to look for the compiler and
flags referenced by the make variables CC and LFLAGS, respectively, -lm
is for math libraries, and -o refers to making this an executable file.
Also, I know how to use the command (cc -MM <file> ) to find out the
immediate file dependencies.
However, what I do not understand is how you determine what other
files that your target is dependent on. ...the confusing thing of the
makefile that I am looking at is that the targets list dependencies
that aren't found by the "cc -MM <file>" command. If you could show me
how to figure out all of the dependencies for a target, I would be
extremely grateful.
Thank you in advance!
Chives
P.S. Would it be easier if I posted up the makefile that I'm looking at?
- Next message: Zheng Da: "It seems gdb can not work well for c++ program"
- Previous message: Uenal Mutlu: "Re: recursive mutexes"
- Next in thread: T.M. Sommers: "Re: Newbie needs help: Makefile Dependencies"
- Reply: T.M. Sommers: "Re: Newbie needs help: Makefile Dependencies"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|