0

Hi,

I'm practicing for my test and I'm really confused on this question
This is the content of make file assuming that part1 and part3 has been modified. list the sequence of command activation in the correct order for make to run

I understand it looks at the target then the dependencies and then it does the action, so wouldn't the commands be in the same order as in the make file.. I'm really confused plz help

all: part1.o part2.o
gcc part1.o part2.o -o whole

part1.o: part1.c part3.o
gcc -c part1.c
gcc part1.o part3.o -o part3.out

part2.o: part2.c
gcc -c part2.c

part3.o: part3.c
gcc -c part3.c

2
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by Salem
0

Thank you for your relpy


So your saying it has to look to the object file inside of the dependencies in order to do give the sequence then it going to look in part3.o and do its command

gcc -c part3.c
gcc -c part1.c
gcc part1.o part3.o -o part3.out
gcc -c part2.c
gcc part1.o part2.o -o whole

Is that right??

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.