Question: 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

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 Databases Questions!