Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify Makefile2 using two features. Feature 1) Uses pattern matching rules that it generates .o files using the pattern matching rule below: %.o : %.c

Modify Makefile2 using two features. Feature 1) Uses pattern matching rules that it generates .o files using the pattern matching rule below:

%.o : %.c $(CC) -c $(CFLAGS) $

Feature 2) List the objects in the variable OBJECTS in the prerequisites or runProgram

image text in transcribed

Moba lextEditor File Edit Search View Format Encoding Syntax Special Tools XER -g -Wall Makefile2 1 CFLAGS 2 CC gcc 3 4 all: runProgram longProgram 5 6 # define OBJECTS here by listing all .o file needed in prereq. of runProgram 7 8 9 10 # checks time stamps on all pre-requisites and check if it needs 11 # recompilation 12 # use the variable OBJECT here instead of the .c files. 13 # see link from webpage on how that work. 14 runProgram: runProgram.c statistics.c getInput.c statistics.h 15 $(CC) $(CFLAGS) statistics.c getInput.c runProgram.c -o runProgram 16 17 18 # below add the .o to .c rule 19 # 20 21 longProgram: longProgram.c 22 $(CC) $(CFLAGS) $@.c -o $@ 23 24 clean: 25 rm -f runProgram 26 rm -f longProgram rm -f *.0 28 rm -rf runProgram. dSYM 29 rm -rf longProgram.dSYM 27 30

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago