Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make supports macros, also called variables. Some common macros have standardized names: CC is the name of the compiler CFLAGS contains compiler flags, e .

Make supports macros, also called variables. Some common macros have standardized names: CC is the name of the compiler CFLAGS contains compiler flags, e.g. CFLAGS =-Wall-std=c99 LDLIBS contains libraries to be included when linking, e.g. LDLIBS =-lm (links the math library) Special macros begin with a dollar sign and do not need to be surrounded by parentheses. See http://www.cprogramming.com/tutorial/makefiles_continued.html for more information. They can be used to avoid repeating target names and dependencies: $@ is the name of the target, often used after the -o flag. $^ stands for all dependencies, which is useful for linking rules. $< stands for the first dependency, which is useful after the -c flag in compilation rules. Define the CC, CFLAGS, and LDLIBS macros in your makefile with the appropriate values. Comment out the make rules that were added in section 3, and replace them with new rules that use these macros and the listed special macros wherever possible. This final version must be the one that runs when make lab2 is called from the command line.

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

Step: 3

blur-text-image

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

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions