Question: Consider the following makefile: main: main.o func 1 . o gcc main.o func 1 . o - o main main.o: main.c gcc - c main.c

Consider the following makefile:
main: main.o func1.o gcc main.o func1.o -o main main.o: main.c gcc -c main.c func1.o: func1.h func1.c gcc -c func1.c
Also consider the following directory listing:
-rw-r-----1 skrentny skrentny 84 Dec 609:42 func1.c -rw-r-----1 skrentny skrentny 18 Dec 609:43 func1.h -rw-r-----1 skrentny skrentny 130 Dec 609:44 main.c -rw-r-----1 skrentny skrentny 1608 Dec 610:08 main.o -rw-r-----1 skrentny skrentny 120 Dec 609:40 Makefile
Which one lists the commands that are executed as a result of entering make on the Linux command line?
Hint: check file dates and determine which rules must execute because any file they depend upon has changed, and in which sequence the rules will execute to build the desired target.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!